Skip to content

Commit

Permalink
NPCBots: Fix Sindragosa's Ice Tomb on bots being permanent and withou…
Browse files Browse the repository at this point in the history
…t visual
  • Loading branch information
trickerer committed Oct 25, 2024
1 parent 8eba0fc commit 03def08
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,20 @@ struct npc_ice_tomb : public ScriptedAI
{
me->RemoveAllGameObjects();

//npcbot
if (_trappedPlayerGUID.IsCreature())
{
if (Creature* bot = ObjectAccessor::GetCreature(*me, _trappedPlayerGUID))
{
_trappedPlayerGUID.Clear();
bot->RemoveAurasDueToSpell(SPELL_ICE_TOMB_DAMAGE);
bot->RemoveAurasDueToSpell(SPELL_ASPHYXIATION);
bot->RemoveAurasDueToSpell(SPELL_ICE_TOMB_UNTARGETABLE);
}
return;
}
//end npcbot

if (Player* player = ObjectAccessor::GetPlayer(*me, _trappedPlayerGUID))
{
_trappedPlayerGUID.Clear();
Expand All @@ -625,6 +639,21 @@ struct npc_ice_tomb : public ScriptedAI

if (_existenceCheckTimer <= diff)
{
//npcbot
if (_trappedPlayerGUID.IsCreature())
{
Creature* bot = ObjectAccessor::GetCreature(*me, _trappedPlayerGUID);
if (!bot || !bot->IsAlive() || !bot->HasAura(SPELL_ICE_TOMB_DAMAGE))
{
JustDied(me);
me->DespawnOrUnsummon();
return;
}
_existenceCheckTimer = 1000;
return;
}
//end npcbot

Player* player = ObjectAccessor::GetPlayer(*me, _trappedPlayerGUID);
if (!player || player->isDead() || !player->HasAura(SPELL_ICE_TOMB_DAMAGE))
{
Expand Down

0 comments on commit 03def08

Please sign in to comment.