Fixes issue #214 : infinite loop in Maiden of Grief script
--HG-- branch : trunk
This commit is contained in:
+9
-5
@@ -63,12 +63,7 @@ struct TRINITY_DLL_DECL boss_maiden_of_griefAI : public ScriptedAI
|
||||
AchievTimer = 0;
|
||||
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(DATA_MAIDEN_OF_GRIEF_EVENT, NOT_STARTED);
|
||||
if (GameObject *pDoor = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_MAIDEN_DOOR)))
|
||||
if (pDoor->GetGoState() == GO_STATE_READY)
|
||||
EnterEvadeMode();
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
@@ -76,8 +71,17 @@ struct TRINITY_DLL_DECL boss_maiden_of_griefAI : public ScriptedAI
|
||||
DoScriptText(SAY_AGGRO, m_creature);
|
||||
|
||||
if (pInstance)
|
||||
{
|
||||
if (GameObject *pDoor = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_MAIDEN_DOOR)))
|
||||
if (pDoor->GetGoState() == GO_STATE_READY)
|
||||
{
|
||||
EnterEvadeMode();
|
||||
return;
|
||||
}
|
||||
|
||||
pInstance->SetData(DATA_MAIDEN_OF_GRIEF_EVENT, IN_PROGRESS);
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
|
||||
@@ -114,10 +114,14 @@ struct TRINITY_DLL_DECL boss_sjonnirAI : public ScriptedAI
|
||||
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(DATA_SJONNIR_EVENT, IN_PROGRESS);
|
||||
if (GameObject *pDoor = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_SJONNIR_DOOR)))
|
||||
if (pDoor->GetGoState() == GO_STATE_READY)
|
||||
{
|
||||
EnterEvadeMode();
|
||||
return;
|
||||
}
|
||||
|
||||
pInstance->SetData(DATA_SJONNIR_EVENT, IN_PROGRESS);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user