diff options
| author | Malcrom <malcromdev@gmail.com> | 2013-12-22 11:43:10 -0330 |
|---|---|---|
| committer | Malcrom <malcromdev@gmail.com> | 2013-12-22 11:43:10 -0330 |
| commit | 34ce605a2c14abdf0e81ac1cbe5954cb0893cc70 (patch) | |
| tree | 43ee7a565cd3a9ea56da7fb3d85445fb0adb075a /src/server/scripts/Northrend | |
| parent | ff1773dedf5ae04503a2ee52c8de4c8f2f373e08 (diff) | |
Scripting/DB: Fixed some npcs so they wouldn't have AIName & scriptname.
Diffstat (limited to 'src/server/scripts/Northrend')
| -rw-r--r-- | src/server/scripts/Northrend/zone_wintergrasp.cpp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/server/scripts/Northrend/zone_wintergrasp.cpp b/src/server/scripts/Northrend/zone_wintergrasp.cpp index a27ce0324ff..311b18524b2 100644 --- a/src/server/scripts/Northrend/zone_wintergrasp.cpp +++ b/src/server/scripts/Northrend/zone_wintergrasp.cpp @@ -237,11 +237,47 @@ class npc_wg_spirit_guide : public CreatureScript } }; +enum WGQueue +{ + SPELL_FROST_ARMOR = 12544 +}; + class npc_wg_queue : public CreatureScript { public: npc_wg_queue() : CreatureScript("npc_wg_queue") { } + struct npc_wg_queueAI : public ScriptedAI + { + npc_wg_queueAI(Creature* creature) : ScriptedAI(creature) { } + + uint32 FrostArmor_Timer; + + void Reset() OVERRIDE + { + FrostArmor_Timer = 0; + } + + void EnterCombat(Unit* /*who*/) OVERRIDE { } + + void UpdateAI(uint32 diff) OVERRIDE + { + if (FrostArmor_Timer <= diff) + { + DoCast(me, SPELL_FROST_ARMOR); + FrostArmor_Timer = 180000; + } + else FrostArmor_Timer -= diff; + + DoMeleeAttackIfReady(); + } + }; + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new npc_wg_queueAI(creature); + } + bool OnGossipHello(Player* player, Creature* creature) OVERRIDE { if (creature->IsQuestGiver()) |
