diff options
-rw-r--r-- | src/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp | 17 |
1 files changed, 17 insertions, 0 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 66e2770c615..93473621d80 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 @@ -101,6 +101,11 @@ enum Quests QUEST_HALLS_OF_STONE = 13207 }; +enum Achievements +{ + ACHIEV_BRANN_SPANKIN = 2154 +}; + #define GOSSIP_ITEM_START "Brann, it would be our honor!" #define GOSSIP_ITEM_PROGRESS "Let's move Brann, enough of the history lessons!" @@ -243,6 +248,7 @@ struct npc_brann_hosAI : public npc_escortAI bool bIsBattle; bool bIsLowHP; + bool bHasBeenDamaged; void Reset() { @@ -250,6 +256,7 @@ struct npc_brann_hosAI : public npc_escortAI { bIsLowHP = false; bIsBattle = false; + bHasBeenDamaged = false; uiStep = 0; uiPhaseTimer = 0; uiControllerGUID = 0; @@ -349,6 +356,12 @@ struct npc_brann_hosAI : public npc_escortAI Start(); } + void DamageTaken(Unit* done_by, uint32 &damage) + { + if (!bHasBeenDamaged) + bHasBeenDamaged = true; + } + void UpdateEscortAI(const uint32 uiDiff) { if (uiPhaseTimer <= uiDiff) @@ -510,7 +523,11 @@ struct npc_brann_hosAI : public npc_escortAI case 29: DoScriptText(SAY_EVENT_END_02, m_creature); if (pInstance) + { pInstance->SetData(DATA_BRANN_EVENT, DONE); + if (!bHasBeenDamaged) + pInstance->DoCompleteAchievement(ACHIEV_BRANN_SPANKIN_NEW); + } JumpToNextStep(5500); break; |