aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTartalo <none@none>2010-03-20 13:15:44 +0100
committerTartalo <none@none>2010-03-20 13:15:44 +0100
commit617c94c9dacc4f2ca8957be867b9f1c40f8db5ee (patch)
tree0280a31e3ced26f4737807ad8b61f445dadf0d45 /src
parent3c2d7a4bbae90255b7de454b92a62d9099bc279e (diff)
Halls of Stone: Implement achievement Brann's Spankin' New
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp17
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;