aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Northrend
diff options
context:
space:
mode:
authorDDuarte <dnpd.dd@gmail.com>2014-01-10 03:16:59 +0000
committerDDuarte <dnpd.dd@gmail.com>2014-01-10 03:16:59 +0000
commit86107a0296eedaa783fc8b8f7a2892c606626d0b (patch)
treeaa91d7be5b298465556ec24e1ef676bad77a4d13 /src/server/scripts/Northrend
parent52a5213e462b754079475bad1f4d4edb22b04a2a (diff)
parent6402fa02ac4a4f1d731ed0b6d744328527e2a857 (diff)
Merge branch 'master' into 4.3.4
Diffstat (limited to 'src/server/scripts/Northrend')
-rw-r--r--src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp3
-rw-r--r--src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/obsidian_sanctum.cpp15
-rw-r--r--src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp12
-rw-r--r--src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp4
-rw-r--r--src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp2
-rw-r--r--src/server/scripts/Northrend/zone_storm_peaks.cpp306
-rw-r--r--src/server/scripts/Northrend/zone_wintergrasp.cpp36
7 files changed, 272 insertions, 106 deletions
diff --git a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp
index a212a74df86..bcb68ae5ce3 100644
--- a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp
+++ b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp
@@ -37,9 +37,6 @@ enum Enums
SAY_SARTHARION_SLAY = 8,
WHISPER_LAVA_CHURN = 9,
- WHISPER_SHADRON_DICIPLE = 7,
- WHISPER_VESPERON_DICIPLE = 7,
-
//Sartharion Spells
SPELL_BERSERK = 61632, // Increases the caster's attack speed by 150% and all damage it deals by 500% for 5 min.
SPELL_CLEAVE = 56909, // Inflicts 35% weapon damage to an enemy and its nearest allies, affecting up to 10 targets.
diff --git a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/obsidian_sanctum.cpp b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/obsidian_sanctum.cpp
index 5fc4869c4af..be1c83e185f 100644
--- a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/obsidian_sanctum.cpp
+++ b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/obsidian_sanctum.cpp
@@ -25,9 +25,6 @@
enum Enums
{
- WHISPER_HATCH_EGGS = 6,
- WHISPER_OPEN_PORTAL = 6, // whisper, shared by two dragons
-
//Mini bosses common spells
SPELL_TWILIGHT_RESIDUE = 61885, // makes immune to shadow damage, applied when leave phase
@@ -155,7 +152,9 @@ enum SharedTextIDs
SAY_DEATH = 2,
SAY_BREATH = 3,
SAY_RESPOND = 4,
- SAY_SPECIAL = 5
+ SAY_SPECIAL = 5,
+ WHISPER_OPEN_PORTAL = 6,
+ WHISPER_OPENED_PORTAL = 7
};
enum DummyDragonEvents
@@ -256,8 +255,6 @@ struct dummy_dragonAI : public ScriptedAI
// "opens" the portal and does the "opening" whisper
void OpenPortal()
{
- int32 textId = 0;
-
// there are 4 portal spawn locations, each are expected to be spawned with negative spawntimesecs in database
// using a grid search here seem to be more efficient than caching all four guids
@@ -268,7 +265,6 @@ struct dummy_dragonAI : public ScriptedAI
{
case NPC_TENEBRON:
{
- textId = WHISPER_HATCH_EGGS;
if (instance && !instance->GetBossState(DATA_SARTHARION) == IN_PROGRESS)
{
for (uint32 i = 0; i < 6; ++i)
@@ -283,7 +279,6 @@ struct dummy_dragonAI : public ScriptedAI
}
case NPC_SHADRON:
{
- textId = WHISPER_OPEN_PORTAL;
if (instance && !instance->GetBossState(DATA_SARTHARION) == IN_PROGRESS)
me->SummonCreature(NPC_ACOLYTE_OF_SHADRON, AcolyteofShadron.x, AcolyteofShadron.y, AcolyteofShadron.z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 28000);
else
@@ -293,7 +288,6 @@ struct dummy_dragonAI : public ScriptedAI
}
case NPC_VESPERON:
{
- textId = WHISPER_OPEN_PORTAL;
if (instance && !instance->GetBossState(DATA_SARTHARION) == IN_PROGRESS)
{
if (Creature* acolyte = me->SummonCreature(NPC_ACOLYTE_OF_VESPERON, AcolyteofVesperon.x, AcolyteofVesperon.y, AcolyteofVesperon.z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 20000))
@@ -317,7 +311,8 @@ struct dummy_dragonAI : public ScriptedAI
}
}
- DoRaidWhisper(textId);
+ DoRaidWhisper(WHISPER_OPEN_PORTAL);
+ DoRaidWhisper(WHISPER_OPENED_PORTAL);
// By using SetRespawnTime() we will actually "spawn" the object with our defined time.
// Once time is up, portal will disappear again.
diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp
index fdc4927763e..f05d065ab34 100644
--- a/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp
+++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp
@@ -25,9 +25,9 @@ enum Spells
SPELL_SPARK = 47751,
H_SPELL_SPARK = 57062,
SPELL_RIFT_SHIELD = 47748,
- SPELL_CHARGE_RIFT = 47747, //Works wrong (affect players, not rifts)
- SPELL_CREATE_RIFT = 47743, //Don't work, using WA
- SPELL_ARCANE_ATTRACTION = 57063, //No idea, when it's used
+ SPELL_CHARGE_RIFT = 47747, // Works wrong (affect players, not rifts)
+ SPELL_CREATE_RIFT = 47743, // Don't work, using WA
+ SPELL_ARCANE_ATTRACTION = 57063, // No idea, when it's used
};
enum Adds
@@ -41,14 +41,16 @@ enum Yells
SAY_AGGRO = 0,
SAY_DEATH = 1,
SAY_RIFT = 2,
- SAY_SHIELD = 3
+ SAY_SHIELD = 3,
+ SAY_RIFT_EMOTE = 4, // Needs to be added to script
+ SAY_SHIELD_EMOTE = 5 // Needs to be added to script
};
enum RiftSpells
{
SPELL_CHAOTIC_ENERGY_BURST = 47688,
SPELL_CHARGED_CHAOTIC_ENERGY_BURST = 47737,
- SPELL_ARCANEFORM = 48019, //Chaotic Rift visual
+ SPELL_ARCANEFORM = 48019, // Chaotic Rift visual
};
Position const RiftLocation[6] =
diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp
index ef8f5c2d3c4..455653a136e 100644
--- a/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp
+++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp
@@ -44,7 +44,8 @@ enum Yells
SAY_SLAY = 1,
SAY_ENRAGE = 2,
SAY_DEATH = 3,
- SAY_CRYSTAL_NOVA = 4
+ SAY_CRYSTAL_NOVA = 4,
+ SAY_FRENZY = 5
};
enum Misc
@@ -175,6 +176,7 @@ public:
if (!bEnrage && HealthBelowPct(25))
{
Talk(SAY_ENRAGE);
+ Talk(SAY_FRENZY);
DoCast(me, SPELL_ENRAGE);
bEnrage = true;
}
diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp
index 423937303b5..e2789995ec7 100644
--- a/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp
+++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp
@@ -36,6 +36,7 @@ enum Yells
SAY_REFLECT = 3,
SAY_CRYSTAL_SPIKES = 4,
SAY_KILL = 5,
+ SAY_FRENZY = 6
};
enum Events
@@ -89,6 +90,7 @@ public:
{
if (!frenzy && HealthBelowPct(25))
{
+ Talk(SAY_FRENZY);
DoCast(me, SPELL_FRENZY);
frenzy = true;
}
diff --git a/src/server/scripts/Northrend/zone_storm_peaks.cpp b/src/server/scripts/Northrend/zone_storm_peaks.cpp
index c09c817a2bf..b1ece9b1aec 100644
--- a/src/server/scripts/Northrend/zone_storm_peaks.cpp
+++ b/src/server/scripts/Northrend/zone_storm_peaks.cpp
@@ -339,17 +339,9 @@ public:
}
}
- void WaypointReached(uint32 /*waypointId*/) OVERRIDE
- {
- }
-
- void JustDied(Unit* /*killer*/) OVERRIDE
- {
- }
-
- void OnCharmed(bool /*apply*/) OVERRIDE
- {
- }
+ void WaypointReached(uint32 /*waypointId*/) OVERRIDE { }
+ void JustDied(Unit* /*killer*/) OVERRIDE { }
+ void OnCharmed(bool /*apply*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
{
@@ -414,7 +406,6 @@ class npc_hyldsmeet_protodrake : public CreatureScript
}
};
-
/*#####
# npc_brann_bronzebeard for Quest 13285 "Forging the Keystone"
#####*/
@@ -438,19 +429,19 @@ enum BrannBronzebeard
SAY_VOICE_4 = 3,
SAY_VOICE_5 = 4,
- EVENT_SCRIPT_1 = 1,
- EVENT_SCRIPT_2 = 2,
- EVENT_SCRIPT_3 = 3,
- EVENT_SCRIPT_4 = 4,
- EVENT_SCRIPT_5 = 5,
- EVENT_SCRIPT_6 = 6,
- EVENT_SCRIPT_7 = 7,
- EVENT_SCRIPT_8 = 8,
- EVENT_SCRIPT_9 = 9,
- EVENT_SCRIPT_10 = 10,
- EVENT_SCRIPT_11 = 11,
- EVENT_SCRIPT_12 = 12,
- EVENT_SCRIPT_13 = 13
+ EVENT_SCRIPT_1 = 3,
+ EVENT_SCRIPT_2 = 4,
+ EVENT_SCRIPT_3 = 5,
+ EVENT_SCRIPT_4 = 6,
+ EVENT_SCRIPT_5 = 7,
+ EVENT_SCRIPT_6 = 8,
+ EVENT_SCRIPT_7 = 9,
+ EVENT_SCRIPT_8 = 10,
+ EVENT_SCRIPT_9 = 11,
+ EVENT_SCRIPT_10 = 12,
+ EVENT_SCRIPT_11 = 13,
+ EVENT_SCRIPT_12 = 14,
+ EVENT_SCRIPT_13 = 15
};
class npc_brann_bronzebeard_keystone : public CreatureScript
@@ -588,64 +579,131 @@ public:
}
};
-enum CloseRift
+/*#####
+# Quest 13010 Krolmir, Hammer of Storms
+#####*/
+
+enum JokkumScriptcast
{
- SPELL_DESPAWN_RIFT = 61665
+ NPC_KINGJOKKUM = 30331,
+ NPC_THORIM = 30390,
+ PATH_JOKKUM = 2072200,
+ PATH_JOKKUM_END = 2072201,
+ SAY_HOLD_ON = 0,
+ SAY_JOKKUM_1 = 1,
+ SAY_JOKKUM_2 = 2,
+ SAY_JOKKUM_3 = 3,
+ SAY_JOKKUM_4 = 4,
+ SAY_JOKKUM_5 = 5,
+ SAY_JOKKUM_6 = 6,
+ SAY_JOKKUM_7 = 7,
+ SAY_JOKKUM_8 = 8,
+ SAY_THORIM_1 = 0,
+ SAY_THORIM_2 = 1,
+ SAY_THORIM_3 = 2,
+ SAY_THORIM_4 = 3,
+ SPELL_JOKKUM_SUMMON = 56541,
+ SPELL_JOKKUM_KILL_CREDIT = 56545,
+ SPELL_EJECT_ALL_PASSENGERS = 50630,
+ SPELL_PLAYER_CAST_VERANUS_SUMMON = 56650,
+ SPELL_SUMMON_VERANUS_AND_THORIM = 56649,
+ EVENT_KROLMIR_1 = 16,
+ EVENT_KROLMIR_2 = 17,
+ EVENT_KROLMIR_3 = 18,
+ EVENT_KROLMIR_4 = 19,
+ EVENT_KROLMIR_5 = 20,
+ EVENT_KROLMIR_6 = 21,
+ EVENT_KROLMIR_7 = 22,
+ EVENT_KROLMIR_8 = 23,
+ EVENT_KROLMIR_9 = 24,
};
-class spell_close_rift : public SpellScriptLoader
+class npc_king_jokkum_vehicle : public CreatureScript
{
- public:
- spell_close_rift() : SpellScriptLoader("spell_close_rift") { }
+public:
+ npc_king_jokkum_vehicle() : CreatureScript("npc_king_jokkum_vehicle") { }
- class spell_close_rift_AuraScript : public AuraScript
+ struct npc_king_jokkum_vehicleAI : public VehicleAI
+ {
+ npc_king_jokkum_vehicleAI(Creature* creature) : VehicleAI(creature) { }
+
+ void Reset() OVERRIDE
{
- PrepareAuraScript(spell_close_rift_AuraScript);
+ playerGUID = 0;
+ pathEnd = false;
+ }
- bool Load() OVERRIDE
- {
- _counter = 0;
- return true;
- }
+ void OnCharmed(bool /*apply*/) OVERRIDE { }
- bool Validate(SpellInfo const* /*spell*/) OVERRIDE
+ void PassengerBoarded(Unit* who, int8 /*seat*/, bool apply) OVERRIDE
+ {
+ if (apply)
{
- return sSpellMgr->GetSpellInfo(SPELL_DESPAWN_RIFT);
+ playerGUID = who->GetGUID();
+ Talk(SAY_HOLD_ON, playerGUID);
+ me->CastSpell(who, SPELL_JOKKUM_KILL_CREDIT, true);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC);
+ me->GetMotionMaster()->MovePath(PATH_JOKKUM, false);
}
+ }
- void HandlePeriodic(AuraEffect const* /* aurEff */)
+ void MovementInform(uint32 type, uint32 id) OVERRIDE
+ {
+ if (type != WAYPOINT_MOTION_TYPE)
+ return;
+
+ if (pathEnd)
{
- if (++_counter == 5)
- GetTarget()->CastSpell((Unit*)NULL, SPELL_DESPAWN_RIFT, true);
- }
+ if (id == 4)
+ {
- void Register() OVERRIDE
+ }
+ }
+ else
{
- OnEffectPeriodic += AuraEffectPeriodicFn(spell_close_rift_AuraScript::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
+ if (id == 19)
+ {
+ pathEnd = true;
+ me->SetFacingTo(0.418879f);
+ Talk(SAY_JOKKUM_1);
+ if (Player* player = ObjectAccessor::GetPlayer(*me, playerGUID))
+ me->CastSpell(player, SPELL_PLAYER_CAST_VERANUS_SUMMON);
+ me->CastSpell(me, SPELL_EJECT_ALL_PASSENGERS);
+
+ }
}
+ }
- private:
- uint8 _counter;
+ void UpdateAI(uint32 diff) OVERRIDE
+ {
+ if (!pathEnd)
+ return;
- };
+ events.Update(diff);
- AuraScript* GetAuraScript() const OVERRIDE
- {
- return new spell_close_rift_AuraScript();
+ while (uint32 eventId = events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_KROLMIR_1:
+ Talk(SAY_JOKKUM_2);
+ events.ScheduleEvent(EVENT_KROLMIR_2, 4000);
+ break;
+ }
+ }
}
-};
-/*#####
-# Krolmir, Hammer of Storms
-#####*/
+ private:
+ EventMap events;
+ uint64 playerGUID;
+ bool pathEnd;
-enum JokkumScriptcast
-{
- SPELL_JOKKUM_KILL_CREDIT = 56545,
- SPELL_JOKKUM_SUMMON = 56541,
- NPC_KINGJOKKUM = 30331,
- SAY_HOLD_ON = 0,
- PATH_JOKKUM = 2072200
+ };
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new npc_king_jokkum_vehicleAI(creature);
+ }
};
class spell_jokkum_scriptcast : public SpellScriptLoader
@@ -665,8 +723,8 @@ class spell_jokkum_scriptcast : public SpellScriptLoader
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
- Unit* target = GetTarget();
- target->CastSpell(target, SPELL_JOKKUM_SUMMON, true);
+ if (Unit* target = GetTarget())
+ target->CastSpell(target, SPELL_JOKKUM_SUMMON, true);
}
void Register() OVERRIDE
@@ -681,42 +739,114 @@ class spell_jokkum_scriptcast : public SpellScriptLoader
}
};
-class npc_king_jokkum_vehicle : public CreatureScript
+class spell_veranus_summon : public SpellScriptLoader
+{
+ public: spell_veranus_summon() : SpellScriptLoader("spell_veranus_summon") { }
+
+ class spell_veranus_summon_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_veranus_summon_AuraScript);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_SUMMON_VERANUS_AND_THORIM))
+ return false;
+ return true;
+ }
+
+ void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ if (Unit* target = GetTarget())
+ target->CastSpell(target, SPELL_SUMMON_VERANUS_AND_THORIM, true);
+ }
+
+ void Register() OVERRIDE
+ {
+ OnEffectApply += AuraEffectApplyFn(spell_veranus_summon_AuraScript::OnApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
+ }
+ };
+
+ AuraScript* GetAuraScript() const OVERRIDE
+ {
+ return new spell_veranus_summon_AuraScript();
+ }
+};
+
+/*#####
+# spell_jokkum_eject_all
+#####*/
+
+class spell_jokkum_eject_all : public SpellScriptLoader
+{
+ public: spell_jokkum_eject_all() : SpellScriptLoader("spell_jokkum_eject_all") { }
+
+ class spell_jokkum_eject_all_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_jokkum_eject_all_SpellScript);
+
+ void HandleScriptEffect(SpellEffIndex /* effIndex */)
+ {
+ if (Unit* caster = GetCaster())
+ if (caster->IsVehicle())
+ caster->GetVehicleKit()->RemoveAllPassengers();
+ }
+
+ void Register() OVERRIDE
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_jokkum_eject_all_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+ };
+
+ SpellScript* GetSpellScript() const OVERRIDE
+ {
+ return new spell_jokkum_eject_all_SpellScript();
+ }
+};
+
+enum CloseRift
+{
+ SPELL_DESPAWN_RIFT = 61665
+};
+
+class spell_close_rift : public SpellScriptLoader
{
public:
- npc_king_jokkum_vehicle() : CreatureScript("npc_king_jokkum_vehicle") { }
+ spell_close_rift() : SpellScriptLoader("spell_close_rift") { }
- struct npc_king_jokkum_vehicleAI : public VehicleAI
+ class spell_close_rift_AuraScript : public AuraScript
{
- npc_king_jokkum_vehicleAI(Creature* creature) : VehicleAI(creature) { }
+ PrepareAuraScript(spell_close_rift_AuraScript);
- void OnCharmed(bool /*apply*/) OVERRIDE { }
+ bool Load() OVERRIDE
+ {
+ _counter = 0;
+ return true;
+ }
- void PassengerBoarded(Unit* who, int8 /*seat*/, bool apply) OVERRIDE
+ bool Validate(SpellInfo const* /*spell*/) OVERRIDE
{
- if (apply)
- {
- Talk(SAY_HOLD_ON, who->GetGUID());
- me->CastSpell(who, SPELL_JOKKUM_KILL_CREDIT, true);
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC);
- me->GetMotionMaster()->MovePath(PATH_JOKKUM, false);
- }
+ return sSpellMgr->GetSpellInfo(SPELL_DESPAWN_RIFT);
}
- void MovementInform(uint32 type, uint32 id) OVERRIDE
+ void HandlePeriodic(AuraEffect const* /* aurEff */)
{
- if (type != WAYPOINT_MOTION_TYPE)
- return;
+ if (++_counter == 5)
+ GetTarget()->CastSpell((Unit*)NULL, SPELL_DESPAWN_RIFT, true);
+ }
- // PointId in WaypointMovementGenerator doesn't match with PointId in DB
- if (id == 19)
- me->GetVehicleKit()->RemoveAllPassengers();
+ void Register() OVERRIDE
+ {
+ OnEffectPeriodic += AuraEffectPeriodicFn(spell_close_rift_AuraScript::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
}
+
+ private:
+ uint8 _counter;
+
};
- CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ AuraScript* GetAuraScript() const OVERRIDE
{
- return new npc_king_jokkum_vehicleAI(creature);
+ return new spell_close_rift_AuraScript();
}
};
@@ -729,7 +859,9 @@ void AddSC_storm_peaks()
new npc_icefang();
new npc_hyldsmeet_protodrake();
new npc_brann_bronzebeard_keystone();
- new spell_close_rift();
- new spell_jokkum_scriptcast();
new npc_king_jokkum_vehicle();
+ new spell_jokkum_scriptcast();
+ new spell_veranus_summon();
+ new spell_jokkum_eject_all();
+ new spell_close_rift();
}
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())