mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2025-11-29 17:38:24 +08:00
fixed crash issue is creatures are summoned outside of the instance
This commit is contained in:
@@ -203,9 +203,12 @@ public:
|
||||
summons.DespawnAll();
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
if (pInstance)
|
||||
{
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_KELTHUZAD_GATE)))
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
|
||||
@@ -80,8 +80,12 @@ public:
|
||||
BossAI::Reset();
|
||||
events.Reset();
|
||||
summons.DespawnAll();
|
||||
|
||||
if (pInstance)
|
||||
{
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_MAEXXNA_GATE)))
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user