mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 09:17:36 +01:00
Fixes issue #214 : infinite loop in Maiden of Grief script
--HG-- branch : trunk
This commit is contained in:
@@ -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,7 +71,16 @@ 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