mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-03-16 14:05:28 +00:00
fix(Core/Scripts): apply safety improvements (#24635)
This commit is contained in:
@@ -238,7 +238,8 @@ struct npc_necropolis_health : public ScriptedAI
|
||||
if (spellInfo->Id == SPELL_DESPAWNER_OTHER && target->GetEntry() == NPC_NECROPOLIS)
|
||||
{
|
||||
DespawnNecropolis();
|
||||
dynamic_cast<Creature*>(target)->DespawnOrUnsummon();
|
||||
if (Creature* creature = target->ToCreature())
|
||||
creature->DespawnOrUnsummon();
|
||||
me->DespawnOrUnsummon();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user