diff options
Diffstat (limited to 'src')
56 files changed, 1121 insertions, 481 deletions
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp index 08e3de1941a..ee624c4f6a5 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp @@ -389,7 +389,16 @@ public: struct npc_scarlet_courierAI : public ScriptedAI { - npc_scarlet_courierAI(Creature* creature) : ScriptedAI(creature) { } + npc_scarlet_courierAI(Creature* creature) : ScriptedAI(creature) + { + Initialize(); + } + + void Initialize() + { + uiStage = 1; + uiStage_timer = 3000; + } uint32 uiStage; uint32 uiStage_timer; @@ -397,8 +406,7 @@ public: void Reset() override { me->Mount(14338); // not sure about this id - uiStage = 1; - uiStage_timer = 3000; + Initialize(); } void EnterCombat(Unit* /*who*/) override diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp index e202e55e675..f6757afd5bc 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp @@ -312,6 +312,8 @@ public: npc_highlord_darion_mograineAI(Creature* creature) : npc_escortAI(creature) { uiTirionGUID = 0; + uiAlexandrosGUID = 0; + uiDarionGUID = 0; uiKorfaxGUID = 0; uiMaxwellGUID = 0; uiEligorGUID = 0; diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp index 43dee1338ef..8f61aadb99b 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp @@ -46,7 +46,19 @@ public: struct npc_valkyr_battle_maidenAI : public PassiveAI { - npc_valkyr_battle_maidenAI(Creature* creature) : PassiveAI(creature) { } + npc_valkyr_battle_maidenAI(Creature* creature) : PassiveAI(creature) + { + Initialize(); + } + + void Initialize() + { + FlyBackTimer = 500; + phase = 0; + x = 0.f; + y = 0.f; + z = 0.f; + } uint32 FlyBackTimer; float x, y, z; @@ -58,8 +70,6 @@ public: me->SetVisible(false); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); me->SetCanFly(true); - FlyBackTimer = 500; - phase = 0; me->GetPosition(x, y, z); z += 4.0f; diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp index cad46b84748..307bcd5add6 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp @@ -232,7 +232,20 @@ public: struct npc_headAI : public ScriptedAI { - npc_headAI(Creature* creature) : ScriptedAI(creature) { } + npc_headAI(Creature* creature) : ScriptedAI(creature) + { + Initialize(); + } + + void Initialize() + { + Phase = 0; + bodyGUID = 0; + die = false; + withbody = true; + wait = 1000; + laugh = urand(15000, 30000); + } uint64 bodyGUID; @@ -245,12 +258,7 @@ public: void Reset() override { - Phase = 0; - bodyGUID = 0; - die = false; - withbody = true; - wait = 1000; - laugh = urand(15000, 30000); + Initialize(); } void EnterCombat(Unit* /*who*/) override { } @@ -380,10 +388,29 @@ public: { boss_headless_horsemanAI(Creature* creature) : ScriptedAI(creature) { + Initialize(); instance = creature->GetInstanceScript(); headGUID = 0; } + void Initialize() + { + Phase = 1; + conflagrate = 15000; + summonadds = 15000; + laugh = urand(16000, 20000); + cleave = 2000; + regen = 1000; + burn = 6000; + count = 0; + say_timer = 3000; + + withhead = true; + returned = true; + burned = false; + IsFlying = false; + } + InstanceScript* instance; uint64 headGUID; @@ -410,20 +437,7 @@ public: void Reset() override { - Phase = 1; - conflagrate = 15000; - summonadds = 15000; - laugh = urand(16000, 20000); - cleave = 2000; - regen = 1000; - burn = 6000; - count = 0; - say_timer = 3000; - - withhead = true; - returned = true; - burned = false; - IsFlying = false; + Initialize(); DoCast(me, SPELL_HEAD); if (headGUID) { diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp index a4a3660b360..78a317b216e 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp @@ -51,9 +51,21 @@ public: { boss_high_inquisitor_fairbanksAI(Creature* creature) : ScriptedAI(creature) { + Initialize(); instance = creature->GetInstanceScript(); } + void Initialize() + { + CurseOfBlood_Timer = 10000; + DispelMagic_Timer = 30000; + Fear_Timer = 40000; + Heal_Timer = 30000; + Sleep_Timer = 30000; + Dispel_Timer = 20000; + PowerWordShield = false; + } + uint32 CurseOfBlood_Timer; uint32 DispelMagic_Timer; uint32 Fear_Timer; @@ -65,13 +77,7 @@ public: void Reset() override { - CurseOfBlood_Timer = 10000; - DispelMagic_Timer = 30000; - Fear_Timer = 40000; - Heal_Timer = 30000; - Sleep_Timer = 30000; - Dispel_Timer = 20000; - PowerWordShield = false; + Initialize(); me->SetStandState(UNIT_STAND_STATE_DEAD); me->SetUInt32Value(UNIT_FIELD_BYTES_1, 7); instance->SetBossState(DATA_HIGH_INQUISITOR_FAIRBANKS, NOT_STARTED); diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_interrogator_vishas.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_interrogator_vishas.cpp index a73cf946a7c..c05de1bb800 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_interrogator_vishas.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_interrogator_vishas.cpp @@ -55,9 +55,17 @@ public: { boss_interrogator_vishasAI(Creature* creature) : ScriptedAI(creature) { + Initialize(); instance = me->GetInstanceScript(); } + void Initialize() + { + ShadowWordPain_Timer = 5000; + Yell60 = false; + Yell30 = false; + } + InstanceScript* instance; bool Yell30; @@ -66,9 +74,7 @@ public: void Reset() override { - ShadowWordPain_Timer = 5000; - Yell60 = false; - Yell30 = false; + Initialize(); instance->SetBossState(DATA_INTERROGATOR_VISHAS, NOT_STARTED); } diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp index a9988584edd..02f7c815414 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp @@ -72,9 +72,19 @@ public: { boss_scarlet_commander_mograineAI(Creature* creature) : ScriptedAI(creature) { + Initialize(); instance = creature->GetInstanceScript(); } + void Initialize() + { + CrusaderStrike_Timer = 10000; + HammerOfJustice_Timer = 10000; + _bHasDied = false; + _bHeal = false; + _bFakeDeath = false; + } + InstanceScript* instance; uint32 CrusaderStrike_Timer; @@ -86,8 +96,7 @@ public: void Reset() override { - CrusaderStrike_Timer = 10000; - HammerOfJustice_Timer = 10000; + Initialize(); //Incase wipe during phase that mograine fake death me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); @@ -96,10 +105,6 @@ public: if (me->IsAlive()) instance->SetBossState(DATA_MOGRAINE_AND_WHITE_EVENT, NOT_STARTED); - - _bHasDied = false; - _bHeal = false; - _bFakeDeath = false; } void JustReachedHome() override @@ -230,9 +235,21 @@ public: { boss_high_inquisitor_whitemaneAI(Creature* creature) : ScriptedAI(creature) { + Initialize(); instance = creature->GetInstanceScript(); } + void Initialize() + { + Wait_Timer = 7000; + Heal_Timer = 10000; + PowerWordShield_Timer = 15000; + HolySmite_Timer = 6000; + + _bCanResurrectCheck = false; + _bCanResurrect = false; + } + InstanceScript* instance; uint32 Heal_Timer; @@ -245,13 +262,7 @@ public: void Reset() override { - Wait_Timer = 7000; - Heal_Timer = 10000; - PowerWordShield_Timer = 15000; - HolySmite_Timer = 6000; - - _bCanResurrectCheck = false; - _bCanResurrect = false; + Initialize(); if (me->IsAlive()) instance->SetBossState(DATA_MOGRAINE_AND_WHITE_EVENT, NOT_STARTED); diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp index 84ada04a989..4a9703b509b 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp @@ -50,7 +50,16 @@ class boss_instructor_malicia : public CreatureScript struct boss_instructormaliciaAI : public BossAI { - boss_instructormaliciaAI(Creature* creature) : BossAI(creature, DATA_INSTRUCTORMALICIA) { } + boss_instructormaliciaAI(Creature* creature) : BossAI(creature, DATA_INSTRUCTORMALICIA) + { + Initialize(); + } + + void Initialize() + { + FlashCounter = 0; + TouchCounter = 0; + } uint32 FlashCounter; uint32 TouchCounter; @@ -58,8 +67,7 @@ class boss_instructor_malicia : public CreatureScript void Reset() override { _Reset(); - FlashCounter = 0; - TouchCounter = 0; + Initialize(); } void EnterCombat(Unit* /*who*/) override diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp index 57331d84b82..02c0f70b7c8 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp @@ -47,7 +47,18 @@ public: struct boss_jandicebarovAI : public ScriptedAI { - boss_jandicebarovAI(Creature* creature) : ScriptedAI(creature) { } + boss_jandicebarovAI(Creature* creature) : ScriptedAI(creature) + { + Initialize(); + } + + void Initialize() + { + CurseOfBlood_Timer = 15000; + Illusion_Timer = 30000; + Invisible_Timer = 3000; //Too much too low? + Invisible = false; + } uint32 CurseOfBlood_Timer; uint32 Illusion_Timer; @@ -57,10 +68,7 @@ public: void Reset() override { - CurseOfBlood_Timer = 15000; - Illusion_Timer = 30000; - Invisible_Timer = 3000; //Too much too low? - Invisible = false; + Initialize(); } void EnterCombat(Unit* /*who*/) override @@ -169,13 +177,21 @@ public: struct npc_illusionofjandicebarovAI : public ScriptedAI { - npc_illusionofjandicebarovAI(Creature* creature) : ScriptedAI(creature) { } + npc_illusionofjandicebarovAI(Creature* creature) : ScriptedAI(creature) + { + Initialize(); + } + + void Initialize() + { + Cleave_Timer = urand(2000, 8000); + } uint32 Cleave_Timer; void Reset() override { - Cleave_Timer = urand(2000, 8000); + Initialize(); me->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_MAGIC, true); } diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp index b88954bd1b7..3864c598459 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp @@ -44,7 +44,19 @@ public: struct boss_kormokAI : public ScriptedAI { - boss_kormokAI(Creature* creature) : ScriptedAI(creature) { } + boss_kormokAI(Creature* creature) : ScriptedAI(creature) + { + Initialize(); + } + + void Initialize() + { + ShadowVolley_Timer = 10000; + BoneShield_Timer = 2000; + Minion_Timer = 15000; + Mage_Timer = 0; + Mages = false; + } uint32 ShadowVolley_Timer; uint32 BoneShield_Timer; @@ -54,11 +66,7 @@ public: void Reset() override { - ShadowVolley_Timer = 10000; - BoneShield_Timer = 2000; - Minion_Timer = 15000; - Mage_Timer = 0; - Mages = false; + Initialize(); } void EnterCombat(Unit* /*who*/) override diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_ras_frostwhisper.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_ras_frostwhisper.cpp index 2aecc8bd491..9351224863c 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_ras_frostwhisper.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_ras_frostwhisper.cpp @@ -48,7 +48,20 @@ public: struct boss_rasfrostAI : public ScriptedAI { - boss_rasfrostAI(Creature* creature) : ScriptedAI(creature) { } + boss_rasfrostAI(Creature* creature) : ScriptedAI(creature) + { + Initialize(); + } + + void Initialize() + { + IceArmor_Timer = 2000; + Frostbolt_Timer = 8000; + ChillNova_Timer = 12000; + Freeze_Timer = 18000; + FrostVolley_Timer = 24000; + Fear_Timer = 45000; + } uint32 IceArmor_Timer; uint32 Frostbolt_Timer; @@ -59,12 +72,7 @@ public: void Reset() override { - IceArmor_Timer = 2000; - Frostbolt_Timer = 8000; - ChillNova_Timer = 12000; - Freeze_Timer = 18000; - FrostVolley_Timer = 24000; - Fear_Timer = 45000; + Initialize(); DoCast(me, SPELL_ICEARMOR, true); } diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_vectus.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_vectus.cpp index c111eb103b4..fba5f3faa14 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_vectus.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_vectus.cpp @@ -51,7 +51,17 @@ public: struct boss_vectusAI : public ScriptedAI { - boss_vectusAI(Creature* creature) : ScriptedAI(creature) { } + boss_vectusAI(Creature* creature) : ScriptedAI(creature) + { + Initialize(); + } + + void Initialize() + { + m_uiFireShield_Timer = 2000; + m_uiBlastWave_Timer = 14000; + m_uiFrenzy_Timer = 0; + } uint32 m_uiFireShield_Timer; uint32 m_uiBlastWave_Timer; @@ -59,9 +69,7 @@ public: void Reset() override { - m_uiFireShield_Timer = 2000; - m_uiBlastWave_Timer = 14000; - m_uiFrenzy_Timer = 0; + Initialize(); } void UpdateAI(uint32 uiDiff) override diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp index fb839650b86..a6e77a234c6 100644 --- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp +++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp @@ -164,16 +164,22 @@ public: { npc_arugal_voidwalkerAI(Creature* creature) : ScriptedAI(creature) { + Initialize(); instance = creature->GetInstanceScript(); } + void Initialize() + { + uiDarkOffering = urand(200, 1000); + } + InstanceScript* instance; uint32 uiDarkOffering; void Reset() override { - uiDarkOffering = urand(200, 1000); + Initialize(); } void UpdateAI(uint32 uiDiff) override diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_baron_rivendare.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_baron_rivendare.cpp index de54e87fc97..85f5b51b52e 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_baron_rivendare.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_baron_rivendare.cpp @@ -75,9 +75,19 @@ public: { boss_baron_rivendareAI(Creature* creature) : ScriptedAI(creature) { + Initialize(); instance = me->GetInstanceScript(); } + void Initialize() + { + ShadowBolt_Timer = 5000; + Cleave_Timer = 8000; + MortalStrike_Timer = 12000; + // RaiseDead_Timer = 30000; + SummonSkeletons_Timer = 34000; + } + InstanceScript* instance; uint32 ShadowBolt_Timer; @@ -88,11 +98,7 @@ public: void Reset() override { - ShadowBolt_Timer = 5000; - Cleave_Timer = 8000; - MortalStrike_Timer = 12000; - // RaiseDead_Timer = 30000; - SummonSkeletons_Timer = 34000; + Initialize(); if (instance->GetData(TYPE_RAMSTEIN) == DONE) instance->SetData(TYPE_BARON, NOT_STARTED); } diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_baroness_anastari.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_baroness_anastari.cpp index a3eb66ac23c..fa8f0f39563 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_baroness_anastari.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_baroness_anastari.cpp @@ -49,9 +49,18 @@ public: { boss_baroness_anastariAI(Creature* creature) : ScriptedAI(creature) { + Initialize(); instance = me->GetInstanceScript(); } + void Initialize() + { + BansheeWail_Timer = 1000; + BansheeCurse_Timer = 11000; + Silence_Timer = 13000; + //Possess_Timer = 35000; + } + InstanceScript* instance; uint32 BansheeWail_Timer; @@ -61,10 +70,7 @@ public: void Reset() override { - BansheeWail_Timer = 1000; - BansheeCurse_Timer = 11000; - Silence_Timer = 13000; - //Possess_Timer = 35000; + Initialize(); } void EnterCombat(Unit* /*who*/) override diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_cannon_master_willey.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_cannon_master_willey.cpp index 14d2a9a9f26..063081021fd 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_cannon_master_willey.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_cannon_master_willey.cpp @@ -92,7 +92,18 @@ public: struct boss_cannon_master_willeyAI : public ScriptedAI { - boss_cannon_master_willeyAI(Creature* creature) : ScriptedAI(creature) { } + boss_cannon_master_willeyAI(Creature* creature) : ScriptedAI(creature) + { + Initialize(); + } + + void Initialize() + { + Shoot_Timer = 1000; + Pummel_Timer = 7000; + KnockAway_Timer = 11000; + SummonRifleman_Timer = 15000; + } uint32 KnockAway_Timer; uint32 Pummel_Timer; @@ -101,10 +112,7 @@ public: void Reset() override { - Shoot_Timer = 1000; - Pummel_Timer = 7000; - KnockAway_Timer = 11000; - SummonRifleman_Timer = 15000; + Initialize(); } void JustDied(Unit* /*killer*/) override diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_dathrohan_balnazzar.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_dathrohan_balnazzar.cpp index f0a8c5c418f..1c7af67190f 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_dathrohan_balnazzar.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_dathrohan_balnazzar.cpp @@ -81,7 +81,23 @@ public: struct boss_dathrohan_balnazzarAI : public ScriptedAI { - boss_dathrohan_balnazzarAI(Creature* creature) : ScriptedAI(creature) { } + boss_dathrohan_balnazzarAI(Creature* creature) : ScriptedAI(creature) + { + Initialize(); + } + + void Initialize() + { + m_uiCrusadersHammer_Timer = 8000; + m_uiCrusaderStrike_Timer = 12000; + m_uiMindBlast_Timer = 6000; + m_uiHolyStrike_Timer = 18000; + m_uiShadowShock_Timer = 4000; + m_uiPsychicScream_Timer = 16000; + m_uiDeepSleep_Timer = 20000; + m_uiMindControl_Timer = 10000; + m_bTransformed = false; + } uint32 m_uiCrusadersHammer_Timer; uint32 m_uiCrusaderStrike_Timer; @@ -95,15 +111,7 @@ public: void Reset() override { - m_uiCrusadersHammer_Timer = 8000; - m_uiCrusaderStrike_Timer = 12000; - m_uiMindBlast_Timer = 6000; - m_uiHolyStrike_Timer = 18000; - m_uiShadowShock_Timer = 4000; - m_uiPsychicScream_Timer = 16000; - m_uiDeepSleep_Timer = 20000; - m_uiMindControl_Timer = 10000; - m_bTransformed = false; + Initialize(); if (me->GetEntry() == NPC_BALNAZZAR) me->UpdateEntry(NPC_DATHROHAN); diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_magistrate_barthilas.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_magistrate_barthilas.cpp index 8b6f2da87e4..ddd51320b1c 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_magistrate_barthilas.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_magistrate_barthilas.cpp @@ -53,7 +53,19 @@ public: struct boss_magistrate_barthilasAI : public ScriptedAI { - boss_magistrate_barthilasAI(Creature* creature) : ScriptedAI(creature) { } + boss_magistrate_barthilasAI(Creature* creature) : ScriptedAI(creature) + { + Initialize(); + } + + void Initialize() + { + DrainingBlow_Timer = 20000; + CrowdPummel_Timer = 15000; + MightyBlow_Timer = 10000; + FuriousAnger_Timer = 5000; + AngerCount = 0; + } uint32 DrainingBlow_Timer; uint32 CrowdPummel_Timer; @@ -63,11 +75,7 @@ public: void Reset() override { - DrainingBlow_Timer = 20000; - CrowdPummel_Timer = 15000; - MightyBlow_Timer = 10000; - FuriousAnger_Timer = 5000; - AngerCount = 0; + Initialize(); if (me->IsAlive()) me->SetDisplayId(MODEL_NORMAL); diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_maleki_the_pallid.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_maleki_the_pallid.cpp index b3fae9821aa..68193ffd0c2 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_maleki_the_pallid.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_maleki_the_pallid.cpp @@ -50,9 +50,17 @@ public: { boss_maleki_the_pallidAI(Creature* creature) : ScriptedAI(creature) { + Initialize(); instance = me->GetInstanceScript(); } + void Initialize() + { + Frostbolt_Timer = 1000; + IceTomb_Timer = 16000; + DrainLife_Timer = 31000; + } + InstanceScript* instance; uint32 Frostbolt_Timer; @@ -61,9 +69,7 @@ public: void Reset() override { - Frostbolt_Timer = 1000; - IceTomb_Timer = 16000; - DrainLife_Timer = 31000; + Initialize(); } void EnterCombat(Unit* /*who*/) override diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_nerubenkan.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_nerubenkan.cpp index 1b5127a5e1c..1d3e28946be 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_nerubenkan.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_nerubenkan.cpp @@ -49,9 +49,18 @@ public: { boss_nerubenkanAI(Creature* creature) : ScriptedAI(creature) { + Initialize(); instance = me->GetInstanceScript(); } + void Initialize() + { + CryptScarabs_Timer = 3000; + EncasingWebs_Timer = 7000; + PierceArmor_Timer = 19000; + RaiseUndeadScarab_Timer = 3000; + } + InstanceScript* instance; uint32 EncasingWebs_Timer; @@ -61,10 +70,7 @@ public: void Reset() override { - CryptScarabs_Timer = 3000; - EncasingWebs_Timer = 7000; - PierceArmor_Timer = 19000; - RaiseUndeadScarab_Timer = 3000; + Initialize(); } void EnterCombat(Unit* /*who*/) override diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_order_of_silver_hand.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_order_of_silver_hand.cpp index dfc3e570e1b..0a09bc85ea3 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_order_of_silver_hand.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_order_of_silver_hand.cpp @@ -65,9 +65,16 @@ public: { boss_silver_hand_bossesAI(Creature* creature) : ScriptedAI(creature) { + Initialize(); instance = creature->GetInstanceScript(); } + void Initialize() + { + HolyLight_Timer = 20000; + DivineShield_Timer = 20000; + } + InstanceScript* instance; uint32 HolyLight_Timer; @@ -75,8 +82,7 @@ public: void Reset() override { - HolyLight_Timer = 20000; - DivineShield_Timer = 20000; + Initialize(); switch (me->GetEntry()) { diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_ramstein_the_gorger.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_ramstein_the_gorger.cpp index df9b6a04af4..531a4f3887a 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_ramstein_the_gorger.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_ramstein_the_gorger.cpp @@ -52,9 +52,16 @@ public: { boss_ramstein_the_gorgerAI(Creature* creature) : ScriptedAI(creature) { + Initialize(); instance = me->GetInstanceScript(); } + void Initialize() + { + Trample_Timer = 3000; + Knockout_Timer = 12000; + } + InstanceScript* instance; uint32 Trample_Timer; @@ -62,8 +69,7 @@ public: void Reset() override { - Trample_Timer = 3000; - Knockout_Timer = 12000; + Initialize(); } void EnterCombat(Unit* /*who*/) override diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_timmy_the_cruel.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_timmy_the_cruel.cpp index a45b3594da0..f721fca8aab 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_timmy_the_cruel.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_timmy_the_cruel.cpp @@ -48,15 +48,23 @@ public: struct boss_timmy_the_cruelAI : public ScriptedAI { - boss_timmy_the_cruelAI(Creature* creature) : ScriptedAI(creature) { } + boss_timmy_the_cruelAI(Creature* creature) : ScriptedAI(creature) + { + Initialize(); + } + + void Initialize() + { + RavenousClaw_Timer = 10000; + HasYelled = false; + } uint32 RavenousClaw_Timer; bool HasYelled; void Reset() override { - RavenousClaw_Timer = 10000; - HasYelled = false; + Initialize(); } void EnterCombat(Unit* /*who*/) override diff --git a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp index 4109328afda..01ee7139ae5 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp @@ -142,7 +142,17 @@ public: struct npc_restless_soulAI : public ScriptedAI { - npc_restless_soulAI(Creature* creature) : ScriptedAI(creature) { } + npc_restless_soulAI(Creature* creature) : ScriptedAI(creature) + { + Initialize(); + } + + void Initialize() + { + Tagger = 0; + Die_Timer = 5000; + Tagged = false; + } uint64 Tagger; uint32 Die_Timer; @@ -150,9 +160,7 @@ public: void Reset() override { - Tagger = 0; - Die_Timer = 5000; - Tagged = false; + Initialize(); } void EnterCombat(Unit* /*who*/) override { } @@ -224,15 +232,23 @@ public: struct npc_spectral_ghostly_citizenAI : public ScriptedAI { - npc_spectral_ghostly_citizenAI(Creature* creature) : ScriptedAI(creature) { } + npc_spectral_ghostly_citizenAI(Creature* creature) : ScriptedAI(creature) + { + Initialize(); + } + + void Initialize() + { + Die_Timer = 5000; + Tagged = false; + } uint32 Die_Timer; bool Tagged; void Reset() override { - Die_Timer = 5000; - Tagged = false; + Initialize(); } void EnterCombat(Unit* /*who*/) override { } diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp index eb9b6c2a1df..4e401be7df3 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp @@ -70,10 +70,26 @@ public: { boss_brutallusAI(Creature* creature) : ScriptedAI(creature) { + Initialize(); instance = creature->GetInstanceScript(); Intro = true; } + void Initialize() + { + SlashTimer = 11000; + StompTimer = 30000; + BurnTimer = 60000; + BerserkTimer = 360000; + + IntroPhase = 0; + IntroPhaseTimer = 0; + IntroFrostBoltTimer = 0; + + IsIntro = false; + Enraged = false; + } + InstanceScript* instance; uint32 SlashTimer; @@ -91,17 +107,7 @@ public: void Reset() override { - SlashTimer = 11000; - StompTimer = 30000; - BurnTimer = 60000; - BerserkTimer = 360000; - - IntroPhase = 0; - IntroPhaseTimer = 0; - IntroFrostBoltTimer = 0; - - IsIntro = false; - Enraged = false; + Initialize(); DoCast(me, SPELL_DUAL_WIELD, true); diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp index 3701d37ed7f..d2382cda37d 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp @@ -82,9 +82,22 @@ public: { boss_sacrolashAI(Creature* creature) : ScriptedAI(creature) { + Initialize(); instance = creature->GetInstanceScript(); } + void Initialize() + { + ShadowbladesTimer = 10000; + ShadownovaTimer = 30000; + ConfoundingblowTimer = 25000; + ShadowimageTimer = 20000; + ConflagrationTimer = 30000; + EnrageTimer = 360000; + SisterDeath = false; + Enraged = false; + } + InstanceScript* instance; bool SisterDeath; @@ -111,13 +124,7 @@ public: if (!me->IsInCombat()) { - ShadowbladesTimer = 10000; - ShadownovaTimer = 30000; - ConfoundingblowTimer = 25000; - ShadowimageTimer = 20000; - ConflagrationTimer = 30000; - EnrageTimer = 360000; - SisterDeath = false; + Initialize(); } instance->SetBossState(DATA_EREDAR_TWINS, NOT_STARTED); @@ -319,12 +326,27 @@ public: { boss_alythessAI(Creature* creature) : ScriptedAI(creature) { + Initialize(); SetCombatMovement(false); instance = creature->GetInstanceScript(); IntroStepCounter = 10; } + void Initialize() + { + ConflagrationTimer = 45000; + BlazeTimer = 100; + PyrogenicsTimer = 15000; + ShadownovaTimer = 40000; + EnrageTimer = 360000; + FlamesearTimer = 15000; + IntroYellTimer = 10000; + + SisterDeath = false; + Enraged = false; + } + InstanceScript* instance; bool SisterDeath; @@ -354,15 +376,7 @@ public: if (!me->IsInCombat()) { - ConflagrationTimer = 45000; - BlazeTimer = 100; - PyrogenicsTimer = 15000; - ShadownovaTimer = 40000; - EnrageTimer = 360000; - FlamesearTimer = 15000; - IntroYellTimer = 10000; - - SisterDeath = false; + Initialize(); } instance->SetBossState(DATA_EREDAR_TWINS, NOT_STARTED); @@ -635,7 +649,17 @@ public: struct npc_shadow_imageAI : public ScriptedAI { - npc_shadow_imageAI(Creature* creature) : ScriptedAI(creature) { } + npc_shadow_imageAI(Creature* creature) : ScriptedAI(creature) + { + Initialize(); + } + + void Initialize() + { + ShadowfuryTimer = 5000 + (rand32() % 15000); + DarkstrikeTimer = 3000; + KillTimer = 15000; + } uint32 ShadowfuryTimer; uint32 KillTimer; @@ -644,9 +668,7 @@ public: void Reset() override { me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - ShadowfuryTimer = 5000 + (rand32() % 15000); - DarkstrikeTimer = 3000; - KillTimer = 15000; + Initialize(); } void EnterCombat(Unit* /*who*/) override { } diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp index 120d3a0b231..4b17f698553 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp @@ -116,7 +116,17 @@ public: { boss_felmystAI(Creature* creature) : ScriptedAI(creature) { + Initialize(); instance = creature->GetInstanceScript(); + uiBreathCount = 0; + breathX = 0.f; + breathY = 0.f; + } + + void Initialize() + { + phase = PHASE_NONE; + uiFlightCount = 0; } InstanceScript* instance; @@ -130,12 +140,10 @@ public: void Reset() override { - phase = PHASE_NONE; + Initialize(); events.Reset(); - uiFlightCount = 0; - me->SetDisableGravity(true); me->SetFloatValue(UNIT_FIELD_BOUNDINGRADIUS, 10); me->SetFloatValue(UNIT_FIELD_COMBATREACH, 10); diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp index b7e03fe0459..3284febb9f3 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp @@ -107,13 +107,30 @@ public: { boss_kalecgosAI(Creature* creature) : ScriptedAI(creature) { + Initialize(); instance = creature->GetInstanceScript(); - SathGUID = 0; - DoorGUID = 0; bJustReset = false; me->setActive(true); } + void Initialize() + { + SathGUID = 0; + ArcaneBuffetTimer = 8000; + FrostBreathTimer = 15000; + WildMagicTimer = 10000; + TailLashTimer = 25000; + SpectralBlastTimer = urand(20000, 25000); + CheckTimer = 1000; + ResetTimer = 30000; + + TalkTimer = 0; + TalkSequence = 0; + isFriendly = false; + isEnraged = false; + isBanished = false; + } + InstanceScript* instance; uint32 ArcaneBuffetTimer; @@ -132,7 +149,6 @@ public: bool bJustReset; uint64 SathGUID; - uint64 DoorGUID; void Reset() override { @@ -151,19 +167,6 @@ public: me->SetStandState(UNIT_STAND_STATE_SLEEP); } me->SetFullHealth(); //dunno why it does not resets health at evade.. - ArcaneBuffetTimer = 8000; - FrostBreathTimer = 15000; - WildMagicTimer = 10000; - TailLashTimer = 25000; - SpectralBlastTimer = urand(20000, 25000); - CheckTimer = 1000; - ResetTimer = 30000; - - TalkTimer = 0; - TalkSequence = 0; - isFriendly = false; - isEnraged = false; - isBanished = false; } void EnterEvadeMode() override @@ -459,13 +462,13 @@ public: boss_kalecAI(Creature* creature) : ScriptedAI(creature) { + Initialize(); instance = creature->GetInstanceScript(); + SathGUID = 0; } - void Reset() override + void Initialize() { - SathGUID = instance->GetData64(DATA_SATHROVARR); - RevitalizeTimer = 5000; HeroicStrikeTimer = 3000; YellTimer = 5000; @@ -474,6 +477,13 @@ public: isEnraged = false; } + void Reset() override + { + SathGUID = instance->GetData64(DATA_SATHROVARR); + + Initialize(); + } + void DamageTaken(Unit* done_by, uint32 &damage) override { if (done_by->GetGUID() != SathGUID) @@ -581,11 +591,23 @@ public: { boss_sathrovarrAI(Creature* creature) : ScriptedAI(creature) { + Initialize(); instance = creature->GetInstanceScript(); KalecGUID = 0; KalecgosGUID = 0; } + void Initialize() + { + ShadowBoltTimer = urand(7, 10) * 1000; + AgonyCurseTimer = 20000; + CorruptionStrikeTimer = 13000; + CheckTimer = 1000; + ResetThreat = 1000; + isEnraged = false; + isBanished = false; + } + InstanceScript* instance; uint32 CorruptionStrikeTimer; @@ -613,13 +635,7 @@ public: KalecGUID = 0; } - ShadowBoltTimer = urand(7, 10) * 1000; - AgonyCurseTimer = 20000; - CorruptionStrikeTimer = 13000; - CheckTimer = 1000; - ResetThreat = 1000; - isEnraged = false; - isBanished = false; + Initialize(); me->CastSpell(me, AURA_DEMONIC_VISUAL, true); TeleportAllPlayersBack(); diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp index 1f66f834b28..5df2d683e21 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp @@ -243,17 +243,23 @@ public: { boss_kalecgos_kjAI(Creature* creature) : ScriptedAI(creature) { + Initialize(); instance = creature->GetInstanceScript(); } + void Initialize() + { + OrbsEmpowered = 0; + EmpowerCount = 0; + } + InstanceScript* instance; uint8 OrbsEmpowered; uint8 EmpowerCount; void Reset() override { - OrbsEmpowered = 0; - EmpowerCount = 0; + Initialize(); me->SetDisableGravity(true); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); me->setActive(true); @@ -393,11 +399,21 @@ public: { npc_kiljaeden_controllerAI(Creature* creature) : ScriptedAI(creature), summons(me) { + Initialize(); instance = creature->GetInstanceScript(); SetCombatMovement(false); } + void Initialize() + { + phase = PHASE_DECEIVERS; + deceiverDeathCount = 0; + bSummonedDeceivers = false; + bKiljaedenDeath = false; + uiRandomSayTimer = 30000; + } + InstanceScript* instance; SummonList summons; @@ -419,14 +435,10 @@ public: void Reset() override { - phase = PHASE_DECEIVERS; + Initialize(); if (Creature* pKalecKJ = ObjectAccessor::GetCreature((*me), instance->GetData64(DATA_KALECGOS_KJ))) ENSURE_AI(boss_kalecgos_kj::boss_kalecgos_kjAI, pKalecKJ->AI())->ResetOrbs(); - deceiverDeathCount = 0; - bSummonedDeceivers = false; - bKiljaedenDeath = false; - uiRandomSayTimer = 30000; summons.DespawnAll(); } @@ -489,11 +501,47 @@ public: { boss_kiljaedenAI(Creature* creature) : ScriptedAI(creature), summons(me) { + Initialize(); instance = creature->GetInstanceScript(); SetCombatMovement(false); } + void Initialize() + { + TimerIsDeactivated[TIMER_SPEECH] = false; + Timer[TIMER_SPEECH] = 0; + + //Phase 2 Timer + Timer[TIMER_SOUL_FLAY] = 11000; + Timer[TIMER_LEGION_LIGHTNING] = 30000; + Timer[TIMER_FIRE_BLOOM] = 20000; + Timer[TIMER_SUMMON_SHILEDORB] = 35000; + + //Phase 3 Timer + Timer[TIMER_SHADOW_SPIKE] = 4000; + Timer[TIMER_FLAME_DART] = 3000; + Timer[TIMER_DARKNESS] = 45000; + Timer[TIMER_ORBS_EMPOWER] = 35000; + + //Phase 4 Timer + Timer[TIMER_ARMAGEDDON] = 2000; + + ActiveTimers = 5; + WaitTimer = 0; + speechCount = 0; + SpeechTimer = 0; + + Phase = PHASE_NORMAL; + + IsInDarkness = false; + IsWaiting = false; + OrbActivated = false; + SpeechBegins = true; + + ChangeTimers(false, 0); + } + InstanceScript* instance; SummonList summons; @@ -520,41 +568,12 @@ public: void Reset() override { - TimerIsDeactivated[TIMER_SPEECH] = false; - Timer[TIMER_SPEECH] = 0; - - //Phase 2 Timer - Timer[TIMER_SOUL_FLAY] = 11000; - Timer[TIMER_LEGION_LIGHTNING] = 30000; - Timer[TIMER_FIRE_BLOOM] = 20000; - Timer[TIMER_SUMMON_SHILEDORB] = 35000; - - //Phase 3 Timer - Timer[TIMER_SHADOW_SPIKE] = 4000; - Timer[TIMER_FLAME_DART] = 3000; - Timer[TIMER_DARKNESS] = 45000; - Timer[TIMER_ORBS_EMPOWER] = 35000; - - //Phase 4 Timer - Timer[TIMER_ARMAGEDDON] = 2000; - - ActiveTimers = 5; - WaitTimer = 0; - speechCount = 0; - SpeechTimer = 0; - - Phase = PHASE_NORMAL; - - IsInDarkness = false; - IsWaiting = false; - OrbActivated = false; - SpeechBegins = true; + Initialize(); if (Creature* pKalec = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_KALECGOS_KJ))) pKalec->RemoveDynObject(SPELL_RING_OF_BLUE_FLAMES); me->SetFloatValue(UNIT_FIELD_COMBATREACH, 12); - ChangeTimers(false, 0); summons.DespawnAll(); } @@ -890,9 +909,17 @@ public: { npc_hand_of_the_deceiverAI(Creature* creature) : ScriptedAI(creature) { + Initialize(); instance = creature->GetInstanceScript(); } + void Initialize() + { + /// @todo Timers! + ShadowBoltVolleyTimer = urand(8000, 14000); // So they don't all cast it in the same moment. + FelfirePortalTimer = 20000; + } + InstanceScript* instance; uint32 ShadowBoltVolleyTimer; @@ -900,9 +927,7 @@ public: void Reset() override { - /// @todo Timers! - ShadowBoltVolleyTimer = urand(8000, 14000); // So they don't all cast it in the same moment. - FelfirePortalTimer = 20000; + Initialize(); instance->SetBossState(DATA_KILJAEDEN, NOT_STARTED); } @@ -989,14 +1014,20 @@ public: { npc_felfire_portalAI(Creature* creature) : ScriptedAI(creature) { + Initialize(); SetCombatMovement(false); } + void Initialize() + { + uiSpawnFiendTimer = 5000; + } + uint32 uiSpawnFiendTimer; void Reset() override { - uiSpawnFiendTimer = 5000; + Initialize(); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_NON_ATTACKABLE); } @@ -1034,7 +1065,16 @@ public: struct npc_volatile_felfire_fiendAI : public ScriptedAI { - npc_volatile_felfire_fiendAI(Creature* creature) : ScriptedAI(creature) { } + npc_volatile_felfire_fiendAI(Creature* creature) : ScriptedAI(creature) + { + Initialize(); + } + + void Initialize() + { + uiExplodeTimer = 2000; + bLockedTarget = false; + } uint32 uiExplodeTimer; @@ -1042,8 +1082,7 @@ public: void Reset() override { - uiExplodeTimer = 2000; - bLockedTarget = false; + Initialize(); } void DamageTaken(Unit* /*done_by*/, uint32 &damage) override @@ -1093,16 +1132,22 @@ public: { npc_armageddonAI(Creature* creature) : ScriptedAI(creature) { + Initialize(); SetCombatMovement(false); } + void Initialize() + { + spell = 0; + uiTimer = 0; + } + uint8 spell; uint32 uiTimer; void Reset() override { - spell = 0; - uiTimer = 0; + Initialize(); } void UpdateAI(uint32 diff) override @@ -1150,7 +1195,22 @@ public: { npc_shield_orbAI(Creature* creature) : ScriptedAI(creature) { + Initialize(); instance = creature->GetInstanceScript(); + x = 0.f; + y = 0.f; + } + + void Initialize() + { + bPointReached = true; + uiTimer = urand(500, 1000); + uiCheckTimer = 1000; + r = 17; + c = 0; + mx = ShieldOrbLocations[0][0]; + my = ShieldOrbLocations[0][1]; + bClockwise = roll_chance_i(50); } InstanceScript* instance; @@ -1164,14 +1224,7 @@ public: void Reset() override { me->SetDisableGravity(true); - bPointReached = true; - uiTimer = urand(500, 1000); - uiCheckTimer = 1000; - r = 17; - c = 0; - mx = ShieldOrbLocations[0][0]; - my = ShieldOrbLocations[0][1]; - bClockwise = roll_chance_i(50); + Initialize(); } void UpdateAI(uint32 diff) override @@ -1235,12 +1288,12 @@ public: struct npc_sinster_reflectionAI : public ScriptedAI { - npc_sinster_reflectionAI(Creature* creature) : ScriptedAI(creature) { } - - uint8 victimClass; - uint32 uiTimer[3]; + npc_sinster_reflectionAI(Creature* creature) : ScriptedAI(creature) + { + Initialize(); + } - void Reset() override + void Initialize() { uiTimer[0] = 0; uiTimer[1] = 0; @@ -1248,6 +1301,14 @@ public: victimClass = 0; } + uint8 victimClass; + uint32 uiTimer[3]; + + void Reset() override + { + Initialize(); + } + void UpdateAI(uint32 diff) override { if (!UpdateVictim()) diff --git a/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp b/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp index f06dc247883..f82d71901ac 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp +++ b/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp @@ -64,9 +64,21 @@ class boss_archaedas : public CreatureScript { boss_archaedasAI(Creature* creature) : ScriptedAI(creature) { + Initialize(); instance = me->GetInstanceScript(); } + void Initialize() + { + uiTremorTimer = 60000; + iAwakenTimer = 0; + uiWallMinionTimer = 10000; + + bWakingUp = false; + bGuardiansAwake = false; + bVaultWalkersAwake = false; + } + uint32 uiTremorTimer; int32 iAwakenTimer; uint32 uiWallMinionTimer; @@ -78,13 +90,7 @@ class boss_archaedas : public CreatureScript void Reset() override { - uiTremorTimer = 60000; - iAwakenTimer = 0; - uiWallMinionTimer = 10000; - - bWakingUp = false; - bGuardiansAwake = false; - bVaultWalkersAwake = false; + Initialize(); instance->SetData(0, 5); // respawn any dead minions me->setFaction(35); @@ -224,9 +230,19 @@ class npc_archaedas_minions : public CreatureScript { npc_archaedas_minionsAI(Creature* creature) : ScriptedAI(creature) { + Initialize(); instance = me->GetInstanceScript(); } + void Initialize() + { + uiArcing_Timer = 3000; + iAwakenTimer = 0; + + bWakingUp = false; + bAmIAwake = false; + } + uint32 uiArcing_Timer; int32 iAwakenTimer; bool bWakingUp; @@ -236,11 +252,7 @@ class npc_archaedas_minions : public CreatureScript void Reset() override { - uiArcing_Timer = 3000; - iAwakenTimer = 0; - - bWakingUp = false; - bAmIAwake = false; + Initialize(); me->setFaction(35); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); diff --git a/src/server/scripts/EasternKingdoms/Uldaman/boss_ironaya.cpp b/src/server/scripts/EasternKingdoms/Uldaman/boss_ironaya.cpp index 13a475604a7..6062f01691c 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/boss_ironaya.cpp +++ b/src/server/scripts/EasternKingdoms/Uldaman/boss_ironaya.cpp @@ -45,7 +45,17 @@ class boss_ironaya : public CreatureScript struct boss_ironayaAI : public ScriptedAI { - boss_ironayaAI(Creature* creature) : ScriptedAI(creature) { } + boss_ironayaAI(Creature* creature) : ScriptedAI(creature) + { + Initialize(); + } + + void Initialize() + { + uiArcingTimer = 3000; + bHasCastKnockaway = false; + bHasCastWstomp = false; + } uint32 uiArcingTimer; bool bHasCastWstomp; @@ -53,9 +63,7 @@ class boss_ironaya : public CreatureScript void Reset() override { - uiArcingTimer = 3000; - bHasCastKnockaway = false; - bHasCastWstomp = false; + Initialize(); } void EnterCombat(Unit* /*who*/) override diff --git a/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp b/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp index fdb71cbbf83..236cc55eee8 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp +++ b/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp @@ -54,13 +54,21 @@ class npc_jadespine_basilisk : public CreatureScript struct npc_jadespine_basiliskAI : public ScriptedAI { - npc_jadespine_basiliskAI(Creature* creature) : ScriptedAI(creature) { } + npc_jadespine_basiliskAI(Creature* creature) : ScriptedAI(creature) + { + Initialize(); + } + + void Initialize() + { + uiCslumberTimer = 2000; + } uint32 uiCslumberTimer; void Reset() override { - uiCslumberTimer = 2000; + Initialize(); } void EnterCombat(Unit* /*who*/) override diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp index b55a9cc74d6..b15fdd85a00 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp @@ -88,19 +88,24 @@ class boss_akilzon : public CreatureScript { boss_akilzonAI(Creature* creature) : BossAI(creature, DATA_AKILZONEVENT) { - memset(BirdGUIDs, 0, sizeof(BirdGUIDs)); + Initialize(); } - void Reset() override + void Initialize() { - _Reset(); - TargetGUID = 0; CloudGUID = 0; CycloneGUID = 0; memset(BirdGUIDs, 0, sizeof(BirdGUIDs)); StormCount = 0; isRaining = false; + } + + void Reset() override + { + _Reset(); + + Initialize(); SetWeather(WEATHER_STATE_FINE, 0.0f); } @@ -380,7 +385,17 @@ class npc_akilzon_eagle : public CreatureScript struct npc_akilzon_eagleAI : public ScriptedAI { - npc_akilzon_eagleAI(Creature* creature) : ScriptedAI(creature) { } + npc_akilzon_eagleAI(Creature* creature) : ScriptedAI(creature) + { + Initialize(); + } + + void Initialize() + { + EagleSwoop_Timer = urand(5000, 10000); + arrived = true; + TargetGUID = 0; + } uint32 EagleSwoop_Timer; bool arrived; @@ -388,9 +403,7 @@ class npc_akilzon_eagle : public CreatureScript void Reset() override { - EagleSwoop_Timer = urand(5000, 10000); - arrived = true; - TargetGUID = 0; + Initialize(); me->SetDisableGravity(true); } diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp index 74ce267441f..0cf1f932f10 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp @@ -74,7 +74,21 @@ class boss_halazzi : public CreatureScript { boss_halazziAI(Creature* creature) : ScriptedAI(creature), summons(me) { + Initialize(); instance = creature->GetInstanceScript(); + Phase = PHASE_NONE; + FrenzyTimer = 0; + SaberlashTimer = 0; + ShockTimer = 0; + TotemTimer = 0; + } + + void Initialize() + { + LynxGUID = 0; + TransformCount = 0; + BerserkTimer = 600000; + CheckTimer = 1000; } InstanceScript* instance; @@ -96,10 +110,7 @@ class boss_halazzi : public CreatureScript instance->SetData(DATA_HALAZZIEVENT, NOT_STARTED); summons.DespawnAll(); - LynxGUID = 0; - TransformCount = 0; - BerserkTimer = 600000; - CheckTimer = 1000; + Initialize(); DoCast(me, SPELL_DUAL_WIELD, true); @@ -321,15 +332,23 @@ class npc_halazzi_lynx : public CreatureScript struct npc_halazzi_lynxAI : public ScriptedAI { - npc_halazzi_lynxAI(Creature* creature) : ScriptedAI(creature) { } + npc_halazzi_lynxAI(Creature* creature) : ScriptedAI(creature) + { + Initialize(); + } + + void Initialize() + { + FrenzyTimer = urand(30000, 50000); //frenzy every 30-50 seconds + shredder_timer = 4000; + } uint32 FrenzyTimer; uint32 shredder_timer; void Reset() override { - FrenzyTimer = urand(30000, 50000); //frenzy every 30-50 seconds - shredder_timer = 4000; + Initialize(); } void DamageTaken(Unit* /*done_by*/, uint32 &damage) override diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp index 0fee04f0d20..3c9d4397d24 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp @@ -254,10 +254,23 @@ class boss_hexlord_malacrass : public CreatureScript { boss_hex_lord_malacrassAI(Creature* creature) : ScriptedAI(creature) { + Initialize(); instance = creature->GetInstanceScript(); SelectAddEntry(); for (uint8 i = 0; i < 4; ++i) AddGUID[i] = 0; + PlayerGUID = 0; + PlayerClass = CLASS_NONE; + } + + void Initialize() + { + SpiritBolts_Timer = 20000; + DrainPower_Timer = 60000; + SiphonSoul_Timer = 100000; + PlayerAbility_Timer = 99999; + CheckAddState_Timer = 5000; + ResetTimer = 5000; } InstanceScript* instance; @@ -280,12 +293,7 @@ class boss_hexlord_malacrass : public CreatureScript { instance->SetData(DATA_HEXLORDEVENT, NOT_STARTED); - SpiritBolts_Timer = 20000; - DrainPower_Timer = 60000; - SiphonSoul_Timer = 100000; - PlayerAbility_Timer = 99999; - CheckAddState_Timer = 5000; - ResetTimer = 5000; + Initialize(); SpawnAdds(); @@ -523,15 +531,23 @@ class boss_thurg : public CreatureScript struct boss_thurgAI : public boss_hexlord_addAI { - boss_thurgAI(Creature* creature) : boss_hexlord_addAI(creature) { } + boss_thurgAI(Creature* creature) : boss_hexlord_addAI(creature) + { + Initialize(); + } + + void Initialize() + { + bloodlust_timer = 15000; + cleave_timer = 10000; + } uint32 bloodlust_timer; uint32 cleave_timer; void Reset() override { - bloodlust_timer = 15000; - cleave_timer = 10000; + Initialize(); boss_hexlord_addAI::Reset(); } @@ -580,15 +596,23 @@ class boss_alyson_antille : public CreatureScript struct boss_alyson_antilleAI : public boss_hexlord_addAI { //Holy Priest - boss_alyson_antilleAI(Creature* creature) : boss_hexlord_addAI(creature) { } + boss_alyson_antilleAI(Creature* creature) : boss_hexlord_addAI(creature) + { + Initialize(); + } + + void Initialize() + { + flashheal_timer = 2500; + dispelmagic_timer = 10000; + } uint32 flashheal_timer; uint32 dispelmagic_timer; void Reset() override { - flashheal_timer = 2500; - dispelmagic_timer = 10000; + Initialize(); //AcquireGUID(); @@ -667,13 +691,21 @@ class boss_alyson_antille : public CreatureScript struct boss_gazakrothAI : public boss_hexlord_addAI { - boss_gazakrothAI(Creature* creature) : boss_hexlord_addAI(creature) { } + boss_gazakrothAI(Creature* creature) : boss_hexlord_addAI(creature) + { + Initialize(); + } + + void Initialize() + { + firebolt_timer = 2000; + } uint32 firebolt_timer; void Reset() override { - firebolt_timer = 2000; + Initialize(); boss_hexlord_addAI::Reset(); } @@ -718,15 +750,23 @@ class boss_lord_raadan : public CreatureScript struct boss_lord_raadanAI : public boss_hexlord_addAI { - boss_lord_raadanAI(Creature* creature) : boss_hexlord_addAI(creature) { } + boss_lord_raadanAI(Creature* creature) : boss_hexlord_addAI(creature) + { + Initialize(); + } + + void Initialize() + { + flamebreath_timer = 8000; + thunderclap_timer = 13000; + } uint32 flamebreath_timer; uint32 thunderclap_timer; void Reset() override { - flamebreath_timer = 8000; - thunderclap_timer = 13000; + Initialize(); boss_hexlord_addAI::Reset(); @@ -769,13 +809,21 @@ class boss_darkheart : public CreatureScript struct boss_darkheartAI : public boss_hexlord_addAI { - boss_darkheartAI(Creature* creature) : boss_hexlord_addAI(creature) { } + boss_darkheartAI(Creature* creature) : boss_hexlord_addAI(creature) + { + Initialize(); + } + + void Initialize() + { + psychicwail_timer = 8000; + } uint32 psychicwail_timer; void Reset() override { - psychicwail_timer = 8000; + Initialize(); boss_hexlord_addAI::Reset(); } void UpdateAI(uint32 diff) override @@ -811,13 +859,21 @@ class boss_slither : public CreatureScript struct boss_slitherAI : public boss_hexlord_addAI { - boss_slitherAI(Creature* creature) : boss_hexlord_addAI(creature) { } + boss_slitherAI(Creature* creature) : boss_hexlord_addAI(creature) + { + Initialize(); + } + + void Initialize() + { + venomspit_timer = 5000; + } uint32 venomspit_timer; void Reset() override { - venomspit_timer = 5000; + Initialize(); boss_hexlord_addAI::Reset(); } @@ -869,13 +925,21 @@ class boss_fenstalker : public CreatureScript struct boss_fenstalkerAI : public boss_hexlord_addAI { - boss_fenstalkerAI(Creature* creature) : boss_hexlord_addAI(creature) { } + boss_fenstalkerAI(Creature* creature) : boss_hexlord_addAI(creature) + { + Initialize(); + } + + void Initialize() + { + volatileinf_timer = 15000; + } uint32 volatileinf_timer; void Reset() override { - volatileinf_timer = 15000; + Initialize(); boss_hexlord_addAI::Reset(); } @@ -913,15 +977,23 @@ class boss_koragg : public CreatureScript struct boss_koraggAI : public boss_hexlord_addAI { - boss_koraggAI(Creature* creature) : boss_hexlord_addAI(creature) { } + boss_koraggAI(Creature* creature) : boss_hexlord_addAI(creature) + { + Initialize(); + } + + void Initialize() + { + coldstare_timer = 15000; + mightyblow_timer = 10000; + } uint32 coldstare_timer; uint32 mightyblow_timer; void Reset() override { - coldstare_timer = 15000; - mightyblow_timer = 10000; + Initialize(); boss_hexlord_addAI::Reset(); } diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp index d5260c18add..2e434ed6ab5 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp @@ -121,9 +121,29 @@ class boss_janalai : public CreatureScript { boss_janalaiAI(Creature* creature) : ScriptedAI(creature) { + Initialize(); instance = creature->GetInstanceScript(); } + void Initialize() + { + FireBreathTimer = 8000; + BombTimer = 30000; + BombSequenceTimer = 1000; + BombCount = 0; + HatcherTimer = 10000; + EnrageTimer = MINUTE * 5 * IN_MILLISECONDS; + + noeggs = false; + isBombing = false; + enraged = false; + + isFlameBreathing = false; + + for (uint8 i = 0; i < 40; ++i) + FireBombGUIDs[i] = 0; + } + InstanceScript* instance; uint32 FireBreathTimer; @@ -145,21 +165,7 @@ class boss_janalai : public CreatureScript { instance->SetData(DATA_JANALAIEVENT, NOT_STARTED); - FireBreathTimer = 8000; - BombTimer = 30000; - BombSequenceTimer = 1000; - BombCount = 0; - HatcherTimer = 10000; - EnrageTimer = MINUTE*5*IN_MILLISECONDS; - - noeggs = false; - isBombing =false; - enraged = false; - - isFlameBreathing = false; - - for (uint8 i = 0; i < 40; ++i) - FireBombGUIDs[i] = 0; + Initialize(); HatchAllEggs(1); } @@ -493,9 +499,20 @@ class npc_janalai_hatcher : public CreatureScript { npc_janalai_hatcherAI(Creature* creature) : ScriptedAI(creature) { + Initialize(); instance = creature->GetInstanceScript(); } + void Initialize() + { + waypoint = 0; + isHatching = false; + hasChangedSide = false; + WaitTimer = 1; + HatchNum = 0; + side = false; + } + InstanceScript* instance; uint32 waypoint; @@ -509,12 +526,8 @@ class npc_janalai_hatcher : public CreatureScript void Reset() override { me->SetWalk(true); + Initialize(); side =(me->GetPositionY() < 1150); - waypoint = 0; - isHatching = false; - hasChangedSide = false; - WaitTimer = 1; - HatchNum = 0; } bool HatchEggs(uint32 num) @@ -626,15 +639,21 @@ class npc_janalai_hatchling : public CreatureScript { npc_janalai_hatchlingAI(Creature* creature) : ScriptedAI(creature) { + Initialize(); instance = creature->GetInstanceScript(); } + void Initialize() + { + BuffetTimer = 7000; + } + InstanceScript* instance; uint32 BuffetTimer; void Reset() override { - BuffetTimer = 7000; + Initialize(); if (me->GetPositionY() > 1150) me->GetMotionMaster()->MovePoint(0, hatcherway[0][3][0] + rand32() % 4 - 2, 1150.0f + rand32() % 4 - 2, hatcherway[0][3][2]); else diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp index 4909074b059..c9c028021f1 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp @@ -109,11 +109,28 @@ class boss_nalorakk : public CreatureScript { boss_nalorakkAI(Creature* creature) : ScriptedAI(creature) { + Initialize(); + inMove = false; MoveEvent = true; MovePhase = 0; + waitTimer = 0; + LaceratingSlash_Timer = 0; + RendFlesh_Timer = 0; + DeafeningRoar_Timer = 0; instance = creature->GetInstanceScript(); } + void Initialize() + { + Surge_Timer = urand(15000, 20000); + BrutalSwipe_Timer = urand(7000, 12000); + Mangle_Timer = urand(10000, 15000); + ShapeShift_Timer = urand(45000, 50000); + Berserk_Timer = 600000; + + inBearForm = false; + } + InstanceScript* instance; uint32 BrutalSwipe_Timer; @@ -150,13 +167,7 @@ class boss_nalorakk : public CreatureScript instance->SetData(DATA_NALORAKKEVENT, NOT_STARTED); - Surge_Timer = urand(15000, 20000); - BrutalSwipe_Timer = urand(7000, 12000); - Mangle_Timer = urand(10000, 15000); - ShapeShift_Timer = urand(45000, 50000); - Berserk_Timer = 600000; - - inBearForm = false; + Initialize(); // me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 1, 5122); /// @todo find the correct equipment id } diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp index 6b0fc05ba3d..5b9957cb94d 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp @@ -136,8 +136,38 @@ class boss_zuljin : public CreatureScript { boss_zuljinAI(Creature* creature) : ScriptedAI(creature), Summons(me) { + Initialize(); instance = creature->GetInstanceScript(); + memset(SpiritGUID, 0, sizeof(SpiritGUID)); + health_20 = 0; } + + void Initialize() + { + Phase = 0; + + Intro_Timer = 37000; + Berserk_Timer = 600000; + + Whirlwind_Timer = 7000; + Grievous_Throw_Timer = 8000; + + Creeping_Paralysis_Timer = 7000; + Overpower_Timer = 0; + + Claw_Rage_Timer = 5000; + Lynx_Rush_Timer = 14000; + Claw_Loop_Timer = 0; + Claw_Counter = 0; + + Flame_Whirl_Timer = 5000; + Flame_Breath_Timer = 6000; + Pillar_Of_Fire_Timer = 7000; + + ClawTargetGUID = 0; + TankGUID = 0; + } + InstanceScript* instance; uint64 SpiritGUID[4]; @@ -171,30 +201,9 @@ class boss_zuljin : public CreatureScript { instance->SetData(DATA_ZULJINEVENT, NOT_STARTED); - Phase = 0; - health_20 = me->CountPctFromMaxHealth(20); - Intro_Timer = 37000; - Berserk_Timer = 600000; - - Whirlwind_Timer = 7000; - Grievous_Throw_Timer = 8000; - - Creeping_Paralysis_Timer = 7000; - Overpower_Timer = 0; - - Claw_Rage_Timer = 5000; - Lynx_Rush_Timer = 14000; - Claw_Loop_Timer = 0; - Claw_Counter = 0; - - Flame_Whirl_Timer = 5000; - Flame_Breath_Timer = 6000; - Pillar_Of_Fire_Timer = 7000; - - ClawTargetGUID = 0; - TankGUID = 0; + Initialize(); Summons.DespawnAll(); diff --git a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp index 5561ed3c2dd..6784ff086c7 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp @@ -131,38 +131,6 @@ class npc_zulaman_hostage : public CreatureScript public: npc_zulaman_hostage() : CreatureScript("npc_zulaman_hostage") { } - struct npc_zulaman_hostageAI : public ScriptedAI - { - npc_zulaman_hostageAI(Creature* creature) : ScriptedAI(creature) - { - IsLoot = false; - } - - bool IsLoot; - uint64 PlayerGUID; - - void Reset() override { } - - void EnterCombat(Unit* /*who*/) override { } - - void JustDied(Unit* /*killer*/) override - { - if (Player* player = ObjectAccessor::GetPlayer(*me, PlayerGUID)) - player->SendLoot(me->GetGUID(), LOOT_CORPSE); - } - - void UpdateAI(uint32 /*diff*/) override - { - if (IsLoot) - DoCast(me, 7, false); - } - }; - - CreatureAI* GetAI(Creature* creature) const override - { - return new npc_zulaman_hostageAI(creature); - } - bool OnGossipHello(Player* player, Creature* creature) override { player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HOSTAGE1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); @@ -276,9 +244,17 @@ class npc_harrison_jones : public CreatureScript { npc_harrison_jonesAI(Creature* creature) : ScriptedAI(creature) { + Initialize(); instance = creature->GetInstanceScript(); } + void Initialize() + { + _gongEvent = 0; + _gongTimer = 0; + uiTargetGUID = 0; + } + InstanceScript* instance; uint8 _gongEvent; @@ -287,9 +263,7 @@ class npc_harrison_jones : public CreatureScript void Reset() override { - _gongEvent = 0; - _gongTimer = 0; - uiTargetGUID = 0; + Initialize(); } void EnterCombat(Unit* /*who*/) override { } diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp index 4ac34615498..0d780da6560 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp @@ -92,15 +92,25 @@ class boss_arlokk : public CreatureScript struct boss_arlokkAI : public BossAI { - boss_arlokkAI(Creature* creature) : BossAI(creature, DATA_ARLOKK) { } + boss_arlokkAI(Creature* creature) : BossAI(creature, DATA_ARLOKK) + { + Initialize(); + memset(_triggersSideAGUID, 0, sizeof(_triggersSideAGUID)); + memset(_triggersSideBGUID, 0, sizeof(_triggersSideBGUID)); + } + + void Initialize() + { + _summonCountA = 0; + _summonCountB = 0; + } void Reset() override { if (events.IsInPhase(PHASE_TWO)) me->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND, TOTAL_PCT, 35.0f, false); // hack _Reset(); - _summonCountA = 0; - _summonCountB = 0; + Initialize(); me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 0, uint32(WEAPON_DAGGER)); me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 1, uint32(WEAPON_DAGGER)); me->SetWalk(false); @@ -332,7 +342,10 @@ class npc_zulian_prowler : public CreatureScript struct npc_zulian_prowlerAI : public ScriptedAI { - npc_zulian_prowlerAI(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()) { } + npc_zulian_prowlerAI(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()) + { + _sideData = 0; + } void Reset() override { diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp index 7a16f670afe..f31477e8e35 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp @@ -212,13 +212,21 @@ class npc_batrider : public CreatureScript struct npc_batriderAI : public ScriptedAI { - npc_batriderAI(Creature* creature) : ScriptedAI(creature) { } + npc_batriderAI(Creature* creature) : ScriptedAI(creature) + { + Initialize(); + } + + void Initialize() + { + Bomb_Timer = 2000; + } uint32 Bomb_Timer; void Reset() override { - Bomb_Timer = 2000; + Initialize(); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp index f766a795658..d1c9579c027 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp @@ -175,15 +175,21 @@ class npc_healing_ward : public CreatureScript { npc_healing_wardAI(Creature* creature) : ScriptedAI(creature) { + Initialize(); instance = creature->GetInstanceScript(); } + void Initialize() + { + Heal_Timer = 2000; + } + uint32 Heal_Timer; InstanceScript* instance; void Reset() override { - Heal_Timer = 2000; + Initialize(); } void EnterCombat(Unit* /*who*/) override { } @@ -216,13 +222,21 @@ class npc_shade_of_jindo : public CreatureScript struct npc_shade_of_jindoAI : public ScriptedAI { - npc_shade_of_jindoAI(Creature* creature) : ScriptedAI(creature) { } + npc_shade_of_jindoAI(Creature* creature) : ScriptedAI(creature) + { + Initialize(); + } + + void Initialize() + { + ShadowShock_Timer = 1000; + } uint32 ShadowShock_Timer; void Reset() override { - ShadowShock_Timer = 1000; + Initialize(); DoCast(me, SPELL_INVISIBLE, true); } diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp index 72ba9db3637..6244d2b72b1 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp @@ -112,14 +112,23 @@ class boss_mandokir : public CreatureScript struct boss_mandokirAI : public BossAI { - boss_mandokirAI(Creature* creature) : BossAI(creature, DATA_MANDOKIR) { } + boss_mandokirAI(Creature* creature) : BossAI(creature, DATA_MANDOKIR) + { + Initialize(); + memset(chainedSpirtGUIDs, 0, sizeof(chainedSpirtGUIDs)); + } + + void Initialize() + { + killCount = 0; + } void Reset() override { if (me->GetPositionZ() > 140.0f) { _Reset(); - killCount = 0; + Initialize(); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC); events.ScheduleEvent(EVENT_CHECK_START, 1000); if (Creature* speaker = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_VILEBRANCH_SPEAKER))) @@ -300,13 +309,21 @@ class npc_ohgan : public CreatureScript struct npc_ohganAI : public ScriptedAI { - npc_ohganAI(Creature* creature) : ScriptedAI(creature), instance(creature->GetInstanceScript()) { } + npc_ohganAI(Creature* creature) : ScriptedAI(creature), instance(creature->GetInstanceScript()) + { + Initialize(); + } - void Reset() override + void Initialize() { SunderArmor_Timer = 5000; } + void Reset() override + { + Initialize(); + } + void EnterCombat(Unit* /*who*/) override { } void JustDied(Unit* /*killer*/) override @@ -353,14 +370,22 @@ class npc_vilebranch_speaker : public CreatureScript struct npc_vilebranch_speakerAI : public ScriptedAI { - npc_vilebranch_speakerAI(Creature* creature) : ScriptedAI(creature), instance(creature->GetInstanceScript()) { } + npc_vilebranch_speakerAI(Creature* creature) : ScriptedAI(creature), instance(creature->GetInstanceScript()) + { + Initialize(); + } - void Reset() override + void Initialize() { demoralizing_Shout_Timer = urand(2000, 4000); cleave_Timer = urand(5000, 8000); } + void Reset() override + { + Initialize(); + } + void EnterCombat(Unit* /*who*/) override { } void JustDied(Unit* /*killer*/) override diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp index bbc1fb6c90e..8020bced16b 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp @@ -217,13 +217,21 @@ class npc_spawn_of_marli : public CreatureScript struct npc_spawn_of_marliAI : public ScriptedAI { - npc_spawn_of_marliAI(Creature* creature) : ScriptedAI(creature) { } + npc_spawn_of_marliAI(Creature* creature) : ScriptedAI(creature) + { + Initialize(); + } + + void Initialize() + { + LevelUp_Timer = 3000; + } uint32 LevelUp_Timer; void Reset() override { - LevelUp_Timer = 3000; + Initialize(); } void EnterCombat(Unit* /*who*/) override { } diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp index 015a2840a9c..4f907098ff4 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp @@ -45,7 +45,22 @@ class boss_renataki : public CreatureScript struct boss_renatakiAI : public BossAI { - boss_renatakiAI(Creature* creature) : BossAI(creature, DATA_EDGE_OF_MADNESS) { } + boss_renatakiAI(Creature* creature) : BossAI(creature, DATA_EDGE_OF_MADNESS) + { + Initialize(); + } + + void Initialize() + { + Invisible_Timer = urand(8000, 18000); + Ambush_Timer = 3000; + Visible_Timer = 4000; + Aggro_Timer = urand(15000, 25000); + ThousandBlades_Timer = urand(4000, 8000); + + Invisible = false; + Ambushed = false; + } uint32 Invisible_Timer; uint32 Ambush_Timer; @@ -59,14 +74,7 @@ class boss_renataki : public CreatureScript void Reset() override { _Reset(); - Invisible_Timer = urand(8000, 18000); - Ambush_Timer = 3000; - Visible_Timer = 4000; - Aggro_Timer = urand(15000, 25000); - ThousandBlades_Timer = urand(4000, 8000); - - Invisible = false; - Ambushed = false; + Initialize(); } void JustDied(Unit* /*killer*/) override diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp index 997818aced2..57a286c1e58 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp @@ -83,7 +83,16 @@ class boss_thekal : public CreatureScript struct boss_thekalAI : public BossAI { - boss_thekalAI(Creature* creature) : BossAI(creature, DATA_THEKAL) { } + boss_thekalAI(Creature* creature) : BossAI(creature, DATA_THEKAL) + { + Initialize(); + } + + void Initialize() + { + Enraged = false; + WasDead = false; + } bool Enraged; bool WasDead; @@ -93,8 +102,7 @@ class boss_thekal : public CreatureScript if (events.IsInPhase(PHASE_TWO)) me->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND, TOTAL_PCT, 35.0f, false); // hack _Reset(); - Enraged = false; - WasDead = false; + Initialize(); } void JustDied(Unit* /*killer*/) override @@ -264,9 +272,21 @@ class npc_zealot_lorkhan : public CreatureScript { npc_zealot_lorkhanAI(Creature* creature) : ScriptedAI(creature) { + Initialize(); instance = creature->GetInstanceScript(); } + void Initialize() + { + Shield_Timer = 1000; + BloodLust_Timer = 16000; + GreaterHeal_Timer = 32000; + Disarm_Timer = 6000; + Check_Timer = 10000; + + FakeDeath = false; + } + uint32 Shield_Timer; uint32 BloodLust_Timer; uint32 GreaterHeal_Timer; @@ -279,13 +299,7 @@ class npc_zealot_lorkhan : public CreatureScript void Reset() override { - Shield_Timer = 1000; - BloodLust_Timer = 16000; - GreaterHeal_Timer = 32000; - Disarm_Timer = 6000; - Check_Timer = 10000; - - FakeDeath = false; + Initialize(); instance->SetBossState(DATA_LORKHAN, NOT_STARTED); @@ -412,9 +426,22 @@ class npc_zealot_zath : public CreatureScript { npc_zealot_zathAI(Creature* creature) : ScriptedAI(creature) { + Initialize(); instance = creature->GetInstanceScript(); } + void Initialize() + { + SweepingStrikes_Timer = 13000; + SinisterStrike_Timer = 8000; + Gouge_Timer = 25000; + Kick_Timer = 18000; + Blind_Timer = 5000; + Check_Timer = 10000; + + FakeDeath = false; + } + uint32 SweepingStrikes_Timer; uint32 SinisterStrike_Timer; uint32 Gouge_Timer; @@ -428,14 +455,7 @@ class npc_zealot_zath : public CreatureScript void Reset() override { - SweepingStrikes_Timer = 13000; - SinisterStrike_Timer = 8000; - Gouge_Timer = 25000; - Kick_Timer = 18000; - Blind_Timer = 5000; - Check_Timer = 10000; - - FakeDeath = false; + Initialize(); instance->SetBossState(DATA_ZATH, NOT_STARTED); diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp index 7047d22c970..c7b8a16fae1 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp @@ -90,7 +90,17 @@ class boss_venoxis : public CreatureScript struct boss_venoxisAI : public BossAI { - boss_venoxisAI(Creature* creature) : BossAI(creature, DATA_VENOXIS) { } + boss_venoxisAI(Creature* creature) : BossAI(creature, DATA_VENOXIS) + { + Initialize(); + } + + void Initialize() + { + _inMeleeRange = 0; + _transformed = false; + _frenzied = false; + } void Reset() override { @@ -99,9 +109,7 @@ class boss_venoxis : public CreatureScript me->RemoveAllAuras(); me->SetReactState(REACT_PASSIVE); // set some internally used variables to their defaults - _inMeleeRange = 0; - _transformed = false; - _frenzied = false; + Initialize(); events.SetPhase(PHASE_ONE); } diff --git a/src/server/scripts/EasternKingdoms/zone_duskwood.cpp b/src/server/scripts/EasternKingdoms/zone_duskwood.cpp index 4eaf98d0a0e..b42f09b009e 100644 --- a/src/server/scripts/EasternKingdoms/zone_duskwood.cpp +++ b/src/server/scripts/EasternKingdoms/zone_duskwood.cpp @@ -55,12 +55,20 @@ public: struct boss_twilight_corrupterAI : public ScriptedAI { - boss_twilight_corrupterAI(Creature* creature) : ScriptedAI(creature) { } + boss_twilight_corrupterAI(Creature* creature) : ScriptedAI(creature) + { + Initialize(); + } + + void Initialize() + { + KillCount = 0; + } void Reset() override { _events.Reset(); - KillCount = 0; + Initialize(); } void EnterCombat(Unit* /*who*/) override diff --git a/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp b/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp index 86ddf33f2fd..268a78bb491 100644 --- a/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp +++ b/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp @@ -178,16 +178,22 @@ public: { npc_rinjiAI(Creature* creature) : npc_escortAI(creature) { + Initialize(); _IsByOutrunner = false; spawnId = 0; } - void Reset() override + void Initialize() { postEventCount = 0; postEventTimer = 3000; } + void Reset() override + { + Initialize(); + } + void JustRespawned() override { _IsByOutrunner = false; diff --git a/src/server/scripts/EasternKingdoms/zone_isle_of_queldanas.cpp b/src/server/scripts/EasternKingdoms/zone_isle_of_queldanas.cpp index fc8fdf41f51..4ce30bd5834 100644 --- a/src/server/scripts/EasternKingdoms/zone_isle_of_queldanas.cpp +++ b/src/server/scripts/EasternKingdoms/zone_isle_of_queldanas.cpp @@ -57,15 +57,23 @@ public: struct npc_converted_sentryAI : public ScriptedAI { - npc_converted_sentryAI(Creature* creature) : ScriptedAI(creature) { } + npc_converted_sentryAI(Creature* creature) : ScriptedAI(creature) + { + Initialize(); + } + + void Initialize() + { + Credit = false; + Timer = 2500; + } bool Credit; uint32 Timer; void Reset() override { - Credit = false; - Timer = 2500; + Initialize(); } void MoveInLineOfSight(Unit* /*who*/) override { } diff --git a/src/server/scripts/EasternKingdoms/zone_redridge_mountains.cpp b/src/server/scripts/EasternKingdoms/zone_redridge_mountains.cpp index 342bba3b729..5907b0b155f 100644 --- a/src/server/scripts/EasternKingdoms/zone_redridge_mountains.cpp +++ b/src/server/scripts/EasternKingdoms/zone_redridge_mountains.cpp @@ -45,14 +45,22 @@ public: struct npc_corporal_keeshanAI : public npc_escortAI { - npc_corporal_keeshanAI(Creature* creature) : npc_escortAI(creature) { } + npc_corporal_keeshanAI(Creature* creature) : npc_escortAI(creature) + { + Initialize(); + } - void Reset() override + void Initialize() { timer = 0; phase = 0; mockingBlowTimer = 5000; - shieldBashTimer = 8000; + shieldBashTimer = 8000; + } + + void Reset() override + { + Initialize(); } void sQuestAccept(Player* player, Quest const* quest) diff --git a/src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp b/src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp index 6bdf43c3305..84f650ec9f4 100644 --- a/src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp +++ b/src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp @@ -188,7 +188,16 @@ public: { pyrewood_ambushAI(Creature* creature) : ScriptedAI(creature), Summons(me) { - QuestInProgress = false; + Initialize(); + WaitTimer = WAIT_SECS; + QuestInProgress = false; + } + + void Initialize() + { + Phase = 0; + KillCount = 0; + PlayerGUID = 0; } uint32 Phase; @@ -205,9 +214,7 @@ public: if (!QuestInProgress) //fix reset values (see UpdateVictim) { - Phase = 0; - KillCount = 0; - PlayerGUID = 0; + Initialize(); Summons.DespawnAll(); } } diff --git a/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp b/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp index 16c66c5e4e3..ee29c0a7b6e 100644 --- a/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp +++ b/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp @@ -233,7 +233,18 @@ public: struct npc_lord_gregor_lescovarAI : public npc_escortAI { - npc_lord_gregor_lescovarAI(Creature* creature) : npc_escortAI(creature) { } + npc_lord_gregor_lescovarAI(Creature* creature) : npc_escortAI(creature) + { + Initialize(); + } + + void Initialize() + { + uiTimer = 0; + uiPhase = 0; + + MarzonGUID = 0; + } uint32 uiTimer; uint32 uiPhase; @@ -242,10 +253,7 @@ public: void Reset() override { - uiTimer = 0; - uiPhase = 0; - - MarzonGUID = 0; + Initialize(); } void EnterEvadeMode() override @@ -486,15 +494,23 @@ public: struct npc_tyrion_spybotAI : public npc_escortAI { - npc_tyrion_spybotAI(Creature* creature) : npc_escortAI(creature) { } + npc_tyrion_spybotAI(Creature* creature) : npc_escortAI(creature) + { + Initialize(); + } + + void Initialize() + { + uiTimer = 0; + uiPhase = 0; + } uint32 uiTimer; uint32 uiPhase; void Reset() override { - uiTimer = 0; - uiPhase = 0; + Initialize(); } void WaypointReached(uint32 waypointId) override diff --git a/src/server/scripts/EasternKingdoms/zone_stranglethorn_vale.cpp b/src/server/scripts/EasternKingdoms/zone_stranglethorn_vale.cpp index b52cb9fa1bf..d1bb7ae3c6a 100644 --- a/src/server/scripts/EasternKingdoms/zone_stranglethorn_vale.cpp +++ b/src/server/scripts/EasternKingdoms/zone_stranglethorn_vale.cpp @@ -50,15 +50,21 @@ public: { npc_yennikuAI(Creature* creature) : ScriptedAI(creature) { + Initialize(); bReset = false; } + void Initialize() + { + Reset_Timer = 0; + } + uint32 Reset_Timer; bool bReset; void Reset() override { - Reset_Timer = 0; + Initialize(); me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE); } diff --git a/src/server/scripts/EasternKingdoms/zone_tirisfal_glades.cpp b/src/server/scripts/EasternKingdoms/zone_tirisfal_glades.cpp index 4d19256e5a1..f953742b864 100644 --- a/src/server/scripts/EasternKingdoms/zone_tirisfal_glades.cpp +++ b/src/server/scripts/EasternKingdoms/zone_tirisfal_glades.cpp @@ -68,7 +68,17 @@ public: struct npc_calvin_montagueAI : public ScriptedAI { - npc_calvin_montagueAI(Creature* creature) : ScriptedAI(creature) { } + npc_calvin_montagueAI(Creature* creature) : ScriptedAI(creature) + { + Initialize(); + } + + void Initialize() + { + m_uiPhase = 0; + m_uiPhaseTimer = 5000; + m_uiPlayerGUID = 0; + } uint32 m_uiPhase; uint32 m_uiPhaseTimer; @@ -76,9 +86,7 @@ public: void Reset() override { - m_uiPhase = 0; - m_uiPhaseTimer = 5000; - m_uiPlayerGUID = 0; + Initialize(); me->RestoreFaction(); diff --git a/src/server/scripts/EasternKingdoms/zone_undercity.cpp b/src/server/scripts/EasternKingdoms/zone_undercity.cpp index 41e6bafd4a7..ea997c5563f 100644 --- a/src/server/scripts/EasternKingdoms/zone_undercity.cpp +++ b/src/server/scripts/EasternKingdoms/zone_undercity.cpp @@ -99,7 +99,23 @@ public: struct npc_lady_sylvanas_windrunnerAI : public ScriptedAI { - npc_lady_sylvanas_windrunnerAI(Creature* creature) : ScriptedAI(creature) { } + npc_lady_sylvanas_windrunnerAI(Creature* creature) : ScriptedAI(creature) + { + Initialize(); + } + + void Initialize() + { + LamentEventTimer = 5000; + LamentEvent = false; + targetGUID = 0; + + FadeTimer = 30000; + SummonSkeletonTimer = 20000; + BlackArrowTimer = 15000; + ShotTimer = 8000; + MultiShotTimer = 10000; + } uint32 LamentEventTimer; bool LamentEvent; @@ -113,15 +129,7 @@ public: void Reset() override { - LamentEventTimer = 5000; - LamentEvent = false; - targetGUID = 0; - - FadeTimer = 30000; - SummonSkeletonTimer = 20000; - BlackArrowTimer = 15000; - ShotTimer = 8000; - MultiShotTimer = 10000; + Initialize(); } void EnterCombat(Unit* /*who*/) override { } @@ -231,7 +239,18 @@ public: struct npc_highborne_lamenterAI : public ScriptedAI { - npc_highborne_lamenterAI(Creature* creature) : ScriptedAI(creature) { } + npc_highborne_lamenterAI(Creature* creature) : ScriptedAI(creature) + { + Initialize(); + } + + void Initialize() + { + EventMoveTimer = 10000; + EventCastTimer = 17500; + EventMove = true; + EventCast = true; + } uint32 EventMoveTimer; uint32 EventCastTimer; @@ -240,10 +259,7 @@ public: void Reset() override { - EventMoveTimer = 10000; - EventCastTimer = 17500; - EventMove = true; - EventCast = true; + Initialize(); } void EnterCombat(Unit* /*who*/) override { } |
