From 617c94c9dacc4f2ca8957be867b9f1c40f8db5ee Mon Sep 17 00:00:00 2001 From: Tartalo Date: Sat, 20 Mar 2010 13:15:44 +0100 Subject: Halls of Stone: Implement achievement Brann's Spankin' New --HG-- branch : trunk --- .../northrend/ulduar/halls_of_stone/halls_of_stone.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/scripts') 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; -- cgit v1.2.3