diff options
author | Tartalo <none@none> | 2010-02-24 16:20:01 +0100 |
---|---|---|
committer | Tartalo <none@none> | 2010-02-24 16:20:01 +0100 |
commit | 2ae4291442889923a4ecf63e3240dd4f029b848c (patch) | |
tree | de75c5b8cc0be488e6863b9daf48afa5b8a42ab9 /src | |
parent | b598127ebf69e7c7f7d48ead1d6ac9105db7d4d6 (diff) |
Borean Tundra: Support for quest 11653
Hah... You're Not So Big Now!
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/scripts/northrend/borean_tundra.cpp | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/scripts/northrend/borean_tundra.cpp b/src/scripts/northrend/borean_tundra.cpp index 6396b58c1ac..7b34286ba14 100644 --- a/src/scripts/northrend/borean_tundra.cpp +++ b/src/scripts/northrend/borean_tundra.cpp @@ -2116,6 +2116,42 @@ CreatureAI* GetAI_npc_trapped_mammoth_calf(Creature* pCreature) return new npc_trapped_mammoth_calfAI(pCreature); } +/*###### +## Quest 11653: Hah... You're Not So Big Now! +######*/ + +enum eNotSoBig +{ + QUEST_YOU_RE_NOT_SO_BIG_NOW = 11653, + SPELL_AURA_NOTSOBIG_1 = 45672, + SPELL_AURA_NOTSOBIG_2 = 45673, + SPELL_AURA_NOTSOBIG_3 = 45677, + SPELL_AURA_NOTSOBIG_4 = 45681 +}; + +struct npc_magmoth_crusherAI : public ScriptedAI +{ + npc_magmoth_crusherAI(Creature* c) : ScriptedAI(c) {} + + void JustDied(Unit *pKiller) + { + if (pKiller->GetTypeId() == TYPEID_PLAYER && + CAST_PLR(pKiller)->GetQuestStatus(QUEST_YOU_RE_NOT_SO_BIG_NOW) == QUEST_STATUS_INCOMPLETE && + (m_creature->HasAura(SPELL_AURA_NOTSOBIG_1) || m_creature->HasAura(SPELL_AURA_NOTSOBIG_2) || + m_creature->HasAura(SPELL_AURA_NOTSOBIG_3) || m_creature->HasAura(SPELL_AURA_NOTSOBIG_4))) + { + Quest const* qInfo = objmgr.GetQuestTemplate(QUEST_YOU_RE_NOT_SO_BIG_NOW); + if (qInfo) + CAST_PLR(pKiller)->KilledMonsterCredit(qInfo->ReqCreatureOrGOId[0],0); + } + } +}; + +CreatureAI* GetAI_npc_magmoth_crusher(Creature* pCreature) +{ + return new npc_magmoth_crusherAI(pCreature); +} + void AddSC_borean_tundra() { Script *newscript; @@ -2256,4 +2292,9 @@ void AddSC_borean_tundra() newscript->Name = "npc_trapped_mammoth_calf"; newscript->GetAI = &GetAI_npc_trapped_mammoth_calf; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_magmoth_crusher"; + newscript->GetAI = &GetAI_npc_magmoth_crusher; + newscript->RegisterSelf(); } |