Halls of Stone: Implement achievement Brann's Spankin' New

--HG--
branch : trunk
This commit is contained in:
Tartalo
2010-03-20 13:15:44 +01:00
parent 3c2d7a4bba
commit 617c94c9da

View File

@@ -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;