diff options
author | Trazom62 <none@none> | 2010-02-08 19:26:45 +0100 |
---|---|---|
committer | Trazom62 <none@none> | 2010-02-08 19:26:45 +0100 |
commit | 1e4684826e2e5dac2ebb660b2043d80973c4a266 (patch) | |
tree | fc8b7988126daf051098e07327326fcd7b866cd2 /src | |
parent | 8344eea132c0b85d61ed82b1052dcec246fc9449 (diff) |
Fix Script HoS/Tribunal Event. Thanks beberlescaraber.
Fixes issue #58.
- fix brann defending when he should not.
- fix reset of gossip flag.
- fix reset of GO at end of event.
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/src/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp b/src/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp index dc581610f38..20f3b275d72 100644 --- a/src/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp +++ b/src/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp @@ -145,6 +145,14 @@ struct mob_tribuna_controllerAI : public ScriptedAI bMarnakActivated = false; bAbedneumActivated = false; + if (pInstance) + { + pInstance->HandleGameObject(pInstance->GetData64(DATA_GO_KADDRAK),false); + pInstance->HandleGameObject(pInstance->GetData64(DATA_GO_MARNAK),false); + pInstance->HandleGameObject(pInstance->GetData64(DATA_GO_ABEDNEUM),false); + pInstance->HandleGameObject(pInstance->GetData64(DATA_GO_SKY_FLOOR),false); + } + lKaddrakGUIDList.clear(); } @@ -393,6 +401,7 @@ struct npc_brann_hosAI : public npc_escortAI JumpToNextStep(5000); break; case 9: + m_creature->SetReactState(REACT_PASSIVE); SpawnDwarf(1); JumpToNextStep(20000); break; @@ -492,6 +501,7 @@ struct npc_brann_hosAI : public npc_escortAI JumpToNextStep(10000); break; case 28: + m_creature->SetReactState(REACT_DEFENSIVE); DoScriptText(SAY_EVENT_END_01, m_creature); m_creature->SetStandState(UNIT_STAND_STATE_STAND); if (pInstance) @@ -606,17 +616,16 @@ struct npc_brann_hosAI : public npc_escortAI { if (pInstance) { - pInstance->HandleGameObject(pInstance->GetData64(DATA_GO_KADDRAK),true); - pInstance->HandleGameObject(pInstance->GetData64(DATA_GO_MARNAK),true); - pInstance->HandleGameObject(pInstance->GetData64(DATA_GO_ABEDNEUM),true); - pInstance->HandleGameObject(pInstance->GetData64(DATA_GO_SKY_FLOOR),true); + pInstance->HandleGameObject(pInstance->GetData64(DATA_GO_KADDRAK),false); + pInstance->HandleGameObject(pInstance->GetData64(DATA_GO_MARNAK),false); + pInstance->HandleGameObject(pInstance->GetData64(DATA_GO_ABEDNEUM),false); + pInstance->HandleGameObject(pInstance->GetData64(DATA_GO_SKY_FLOOR),false); pInstance->SetData(DATA_BRANN_EVENT, DONE); } Player* pPlayer = GetPlayerForEscort(); if (pPlayer) pPlayer->GroupEventHappens(QUEST_HALLS_OF_STONE, m_creature); - m_creature->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - m_creature->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); JumpToNextStep(180000); break; } @@ -626,11 +635,12 @@ struct npc_brann_hosAI : public npc_escortAI } } else uiPhaseTimer -= uiDiff; - if (!bIsLowHP && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) <= 30) + if (!bIsLowHP && HealthBelowPct(30)) { DoScriptText(SAY_LOW_HEALTH, m_creature); bIsLowHP = true; - } else if (bIsLowHP && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) > 30) + } + else if (bIsLowHP && !HealthBelowPct(30)) bIsLowHP = false; if (!UpdateVictim()) |