diff options
| author | Shauren <shauren.trinity@gmail.com> | 2024-01-08 22:23:12 +0100 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2024-01-08 22:23:12 +0100 |
| commit | 605e5f94c0d71cad8e83fa5a07eaec4e6bed9cc3 (patch) | |
| tree | 5cad677458a22ef0dd187fa86d1cd574282384dd /src/server/scripts/EasternKingdoms | |
| parent | eeb4407f077bf567361becdbe5083c2790f00313 (diff) | |
Core/Creatures: Moved autoattack handling from scripts to game
Diffstat (limited to 'src/server/scripts/EasternKingdoms')
131 files changed, 29 insertions, 424 deletions
diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/alterac_valley.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/alterac_valley.cpp index b189434b495..19837a66ba9 100644 --- a/src/server/scripts/EasternKingdoms/AlteracValley/alterac_valley.cpp +++ b/src/server/scripts/EasternKingdoms/AlteracValley/alterac_valley.cpp @@ -124,8 +124,6 @@ struct npc_av_marshal_or_warmaster : public ScriptedAI if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - - DoMeleeAttackIfReady(); } private: diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp index 7aa746954dd..38987c82428 100644 --- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp +++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp @@ -169,8 +169,6 @@ struct boss_balinda : public ScriptedAI if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - - DoMeleeAttackIfReady(); } private: diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp index fdf3663b396..f7ec0bb3da9 100644 --- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp +++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp @@ -125,8 +125,6 @@ struct boss_drekthar : public ScriptedAI if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - - DoMeleeAttackIfReady(); } private: diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp index a693a980846..741387ec033 100644 --- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp +++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp @@ -126,8 +126,6 @@ struct boss_galvangar : public ScriptedAI if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - - DoMeleeAttackIfReady(); } private: diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp index fa811e709c3..83c1fcc813e 100644 --- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp +++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp @@ -85,10 +85,7 @@ struct boss_vanndar : public ScriptedAI if (!UpdateVictim()) return; - _scheduler.Update(diff, [this] - { - DoMeleeAttackIfReady(); - }); + _scheduler.Update(diff); } private: diff --git a/src/server/scripts/EasternKingdoms/BaradinHold/boss_alizabal.cpp b/src/server/scripts/EasternKingdoms/BaradinHold/boss_alizabal.cpp index a69a0eb6bbf..1db8fdf370a 100644 --- a/src/server/scripts/EasternKingdoms/BaradinHold/boss_alizabal.cpp +++ b/src/server/scripts/EasternKingdoms/BaradinHold/boss_alizabal.cpp @@ -245,8 +245,6 @@ class boss_alizabal : public CreatureScript break; } } - - DoMeleeAttackIfReady(); } private: diff --git a/src/server/scripts/EasternKingdoms/BaradinHold/boss_occuthar.cpp b/src/server/scripts/EasternKingdoms/BaradinHold/boss_occuthar.cpp index 2e95e41e96f..1123128e158 100644 --- a/src/server/scripts/EasternKingdoms/BaradinHold/boss_occuthar.cpp +++ b/src/server/scripts/EasternKingdoms/BaradinHold/boss_occuthar.cpp @@ -140,8 +140,6 @@ class boss_occuthar : public CreatureScript break; } } - - DoMeleeAttackIfReady(); } private: diff --git a/src/server/scripts/EasternKingdoms/BaradinHold/boss_pit_lord_argaloth.cpp b/src/server/scripts/EasternKingdoms/BaradinHold/boss_pit_lord_argaloth.cpp index 1c42ea4184f..83fda21f9d9 100644 --- a/src/server/scripts/EasternKingdoms/BaradinHold/boss_pit_lord_argaloth.cpp +++ b/src/server/scripts/EasternKingdoms/BaradinHold/boss_pit_lord_argaloth.cpp @@ -111,8 +111,6 @@ class boss_pit_lord_argaloth : public CreatureScript break; } } - - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/blackrock_caverns.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/blackrock_caverns.cpp index 40d5d9d5cee..f5373e7b413 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/blackrock_caverns.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/blackrock_caverns.cpp @@ -202,8 +202,6 @@ public: npc_twilight_flame_caller() : CreatureScript("npc_twilight_flame_caller" break; } } - - DoMeleeAttackIfReady(); } private: @@ -313,8 +311,6 @@ class npc_twilight_torturer : public CreatureScript break; } } - - DoMeleeAttackIfReady(); } private: @@ -414,8 +410,6 @@ class npc_twilight_sadist : public CreatureScript break; } } - - DoMeleeAttackIfReady(); } private: @@ -489,7 +483,6 @@ class npc_mad_prisoner : public CreatureScript break; } } - DoMeleeAttackIfReady(); } private: @@ -559,8 +552,6 @@ class npc_crazed_mage : public CreatureScript break; } } - - DoMeleeAttackIfReady(); } private: @@ -653,8 +644,6 @@ class npc_raz_the_crazed : public CreatureScript break; } } - - DoMeleeAttackIfReady(); } private: diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/boss_ascendant_lord_obsidius.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/boss_ascendant_lord_obsidius.cpp index 2984565cf58..38a4eb6f515 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/boss_ascendant_lord_obsidius.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/boss_ascendant_lord_obsidius.cpp @@ -95,8 +95,6 @@ class boss_ascendant_lord_obsidius : public CreatureScript break; } } - - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/boss_beauty.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/boss_beauty.cpp index f2ed2d1411d..40364df63f2 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/boss_beauty.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/boss_beauty.cpp @@ -102,8 +102,6 @@ class boss_beauty : public CreatureScript break; } } - - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/boss_corla.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/boss_corla.cpp index 771125d57c0..88ce3101be9 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/boss_corla.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/boss_corla.cpp @@ -109,8 +109,6 @@ class boss_corla : public CreatureScript } return; } - - DoMeleeAttackIfReady(); } private: diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/boss_karsh_steelbender.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/boss_karsh_steelbender.cpp index 25ed1ee9c09..22a7caef73f 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/boss_karsh_steelbender.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/boss_karsh_steelbender.cpp @@ -97,8 +97,6 @@ class boss_karsh_steelbender : public CreatureScript break; } } - - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/boss_romogg_bonecrusher.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/boss_romogg_bonecrusher.cpp index ec5ccac6bff..2915f04a156 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/boss_romogg_bonecrusher.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/boss_romogg_bonecrusher.cpp @@ -122,8 +122,6 @@ class boss_romogg_bonecrusher : public CreatureScript break; } } - - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp index 23ae53ad34f..8b337da6ec0 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp @@ -425,8 +425,6 @@ public: DoCastVictim(SPELL_MIGHTYBLOW); MightyBlow_Timer = 10000; } else MightyBlow_Timer -= diff; - - DoMeleeAttackIfReady(); } }; }; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_ambassador_flamelash.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_ambassador_flamelash.cpp index e6b303c9e21..bdf31e4b9b9 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_ambassador_flamelash.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_ambassador_flamelash.cpp @@ -76,8 +76,6 @@ class boss_ambassador_flamelash : public CreatureScript break; } } - - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_coren_direbrew.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_coren_direbrew.cpp index c2bb6d3c599..618a73e744c 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_coren_direbrew.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_coren_direbrew.cpp @@ -279,8 +279,6 @@ struct boss_coren_direbrew : public BossAI if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - - DoMeleeAttackIfReady(); } }; @@ -326,10 +324,7 @@ struct npc_coren_direbrew_sisters : public ScriptedAI void UpdateAI(uint32 diff) override { - _scheduler.Update(diff, [this] - { - DoMeleeAttackIfReady(); - }); + _scheduler.Update(diff); } private: diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp index f2a381924f4..effdb58230e 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp @@ -105,8 +105,6 @@ class boss_emperor_dagran_thaurissan : public CreatureScript break; } } - - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_general_angerforge.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_general_angerforge.cpp index ffb6229f919..591a637e2ee 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_general_angerforge.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_general_angerforge.cpp @@ -117,8 +117,6 @@ class boss_general_angerforge : public CreatureScript break; } } - - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_high_interrogator_gerstahn.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_high_interrogator_gerstahn.cpp index 3037205af3d..4c575400b1b 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_high_interrogator_gerstahn.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_high_interrogator_gerstahn.cpp @@ -86,8 +86,6 @@ class boss_high_interrogator_gerstahn : public CreatureScript break; } } - - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_magmus.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_magmus.cpp index f66ff800698..3af8b1ae887 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_magmus.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_magmus.cpp @@ -86,8 +86,6 @@ class boss_magmus : public CreatureScript break; } } - - DoMeleeAttackIfReady(); } void JustDied(Unit* /*killer*/) override diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_tomb_of_seven.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_tomb_of_seven.cpp index 2933b5a3997..4d2c526af97 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_tomb_of_seven.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_tomb_of_seven.cpp @@ -225,8 +225,6 @@ class boss_doomrel : public CreatureScript break; } } - - DoMeleeAttackIfReady(); } bool OnGossipSelect(Player* player, uint32 /*menuId*/, uint32 gossipListId) override diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_drakkisath.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_drakkisath.cpp index 5a919367ed1..5f1801f747f 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_drakkisath.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_drakkisath.cpp @@ -93,7 +93,6 @@ struct boss_drakkisath : public BossAI if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gizrul_the_slavener.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gizrul_the_slavener.cpp index 26da4e9054d..015f00eb2fe 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gizrul_the_slavener.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gizrul_the_slavener.cpp @@ -95,7 +95,6 @@ struct boss_gizrul_the_slavener : public BossAI if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gyth.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gyth.cpp index ad3f9a32ddc..38a2c618636 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gyth.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gyth.cpp @@ -168,7 +168,6 @@ struct boss_gyth : public BossAI if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_halycon.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_halycon.cpp index e53093eb601..f085837864e 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_halycon.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_halycon.cpp @@ -99,7 +99,6 @@ struct boss_halycon : public BossAI if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - DoMeleeAttackIfReady(); } private: bool Summoned; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_highlord_omokk.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_highlord_omokk.cpp index 05f0502ec42..3bbe365186d 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_highlord_omokk.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_highlord_omokk.cpp @@ -81,7 +81,6 @@ struct boss_highlord_omokk : public BossAI if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_lord_valthalak.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_lord_valthalak.cpp index 8484b0e7e04..26a952f570c 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_lord_valthalak.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_lord_valthalak.cpp @@ -124,8 +124,6 @@ struct boss_lord_valthalak : public BossAI frenzy15 = true; } } - - DoMeleeAttackIfReady(); } private: bool frenzy40; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_mother_smolderweb.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_mother_smolderweb.cpp index 787174d54d9..c77c3c66045 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_mother_smolderweb.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_mother_smolderweb.cpp @@ -86,7 +86,6 @@ struct boss_mother_smolderweb : public BossAI if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_overlord_wyrmthalak.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_overlord_wyrmthalak.cpp index 5eb1eedb157..b201320dd3f 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_overlord_wyrmthalak.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_overlord_wyrmthalak.cpp @@ -126,7 +126,6 @@ struct boss_overlord_wyrmthalak : public BossAI if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_pyroguard_emberseer.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_pyroguard_emberseer.cpp index 826cc63dfaf..c5994387a79 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_pyroguard_emberseer.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_pyroguard_emberseer.cpp @@ -273,7 +273,6 @@ struct boss_pyroguard_emberseer : public BossAI if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - DoMeleeAttackIfReady(); } }; @@ -344,8 +343,6 @@ struct npc_blackhand_incarcerator : public ScriptedAI break; } } - - DoMeleeAttackIfReady(); } private: diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_quartermaster_zigris.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_quartermaster_zigris.cpp index 2a9e6109781..787b9884528 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_quartermaster_zigris.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_quartermaster_zigris.cpp @@ -81,7 +81,6 @@ struct quartermaster_zigris : public BossAI if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_rend_blackhand.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_rend_blackhand.cpp index 905140b967e..73d84d4aa2d 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_rend_blackhand.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_rend_blackhand.cpp @@ -438,7 +438,6 @@ struct boss_rend_blackhand : public BossAI if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - DoMeleeAttackIfReady(); } private: diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp index d4f2bd9423b..02fddfecb48 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp @@ -88,7 +88,6 @@ struct boss_shadow_hunter_voshgajin : public BossAI if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_the_beast.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_the_beast.cpp index 4c0cbab7061..b3e87bb4766 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_the_beast.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_the_beast.cpp @@ -97,7 +97,6 @@ public: if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - DoMeleeAttackIfReady(); } }; }; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_urok_doomhowl.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_urok_doomhowl.cpp index 5315c022b15..86e97e67547 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_urok_doomhowl.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_urok_doomhowl.cpp @@ -90,7 +90,6 @@ struct boss_urok_doomhowl : public BossAI if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_warmaster_voone.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_warmaster_voone.cpp index 0228cf81485..961c858bd32 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_warmaster_voone.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_warmaster_voone.cpp @@ -107,7 +107,6 @@ struct boss_warmaster_voone : public BossAI if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_broodlord_lashlayer.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_broodlord_lashlayer.cpp index 4756ad281b5..38c397db1f4 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_broodlord_lashlayer.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_broodlord_lashlayer.cpp @@ -119,8 +119,6 @@ struct boss_broodlord : public BossAI break; } } - - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_chromaggus.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_chromaggus.cpp index 8cc58f8dba2..d11b3be9262 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_chromaggus.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_chromaggus.cpp @@ -171,9 +171,7 @@ struct boss_chromaggus : public BossAI Breath1_Spell = SPELL_FROSTBURN; Breath2_Spell = SPELL_IGNITEFLESH; break; - }; - - EnterEvadeMode(); + } } void Initialize() @@ -275,8 +273,6 @@ struct boss_chromaggus : public BossAI DoCast(me, SPELL_ENRAGE); Enraged = true; } - - DoMeleeAttackIfReady(); } private: diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_ebonroc.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_ebonroc.cpp index 3b62dc50691..8c8d9c3455f 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_ebonroc.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_ebonroc.cpp @@ -77,8 +77,6 @@ struct boss_ebonroc : public BossAI if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_firemaw.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_firemaw.cpp index d74574de642..0aff94af4f6 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_firemaw.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_firemaw.cpp @@ -79,8 +79,6 @@ struct boss_firemaw : public BossAI if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_flamegor.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_flamegor.cpp index 33061d520b5..8fbf62c38e3 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_flamegor.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_flamegor.cpp @@ -85,8 +85,6 @@ struct boss_flamegor : public BossAI if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp index 0084e493e50..865c288fab0 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp @@ -568,8 +568,6 @@ struct boss_nefarian : public BossAI Phase3 = true; Talk(SAY_RAISE_SKELETONS); } - - DoMeleeAttackIfReady(); } private: diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_razorgore.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_razorgore.cpp index c0c5c49cd8a..dd953ab2465 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_razorgore.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_razorgore.cpp @@ -152,7 +152,6 @@ struct boss_razorgore : public BossAI if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - DoMeleeAttackIfReady(); } private: diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_vaelastrasz.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_vaelastrasz.cpp index 1822ed1ff56..ee9e3cb1d07 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_vaelastrasz.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_vaelastrasz.cpp @@ -213,8 +213,6 @@ struct boss_vaelastrasz : public BossAI Talk(SAY_HALFLIFE); HasYelled = true; } - - DoMeleeAttackIfReady(); } bool OnGossipSelect(Player* player, uint32 menuId, uint32 gossipListId) override diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_baron_geddon.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_baron_geddon.cpp index b57ffcc1072..ad77ea3da8a 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_baron_geddon.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_baron_geddon.cpp @@ -107,8 +107,6 @@ struct boss_baron_geddon : public BossAI if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_garr.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_garr.cpp index 8df147209ec..557b1100ae5 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_garr.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_garr.cpp @@ -85,8 +85,6 @@ struct boss_garr : public BossAI if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - - DoMeleeAttackIfReady(); } }; @@ -145,10 +143,7 @@ struct npc_firesworn : public ScriptedAI if (!UpdateVictim()) return; - _scheduler.Update(diff, [this] - { - DoMeleeAttackIfReady(); - }); + _scheduler.Update(diff); } private: diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_gehennas.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_gehennas.cpp index f55df0eb24e..6b9952c87d0 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_gehennas.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_gehennas.cpp @@ -89,8 +89,6 @@ struct boss_gehennas : public BossAI if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_golemagg.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_golemagg.cpp index febe22cd777..4ac429ce704 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_golemagg.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_golemagg.cpp @@ -107,8 +107,6 @@ struct boss_golemagg : public BossAI if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - - DoMeleeAttackIfReady(); } }; @@ -154,10 +152,7 @@ struct npc_core_rager : public ScriptedAI if (!UpdateVictim()) return; - _scheduler.Update(diff, [this] - { - DoMeleeAttackIfReady(); - }); + _scheduler.Update(diff); } private: diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_lucifron.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_lucifron.cpp index f1a3699db70..a0fe27bc40f 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_lucifron.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_lucifron.cpp @@ -87,8 +87,6 @@ struct boss_lucifron : public BossAI if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_magmadar.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_magmadar.cpp index 9d6a0bab5be..09e59435d68 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_magmadar.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_magmadar.cpp @@ -101,8 +101,6 @@ struct boss_magmadar : public BossAI if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_majordomo_executus.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_majordomo_executus.cpp index fe41d2608ca..2ba6f532b64 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_majordomo_executus.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_majordomo_executus.cpp @@ -145,8 +145,6 @@ struct boss_majordomo : public BossAI if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - - DoMeleeAttackIfReady(); } else { diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp index 5ba5854d984..db5539a6fc0 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp @@ -292,8 +292,6 @@ struct boss_ragnaros : public BossAI break; } } - - DoMeleeAttackIfReady(); } } @@ -317,14 +315,6 @@ struct npc_son_of_flame : public ScriptedAI //didnt work correctly in EAI for me instance->SetData(DATA_RAGNAROS_ADDS, 1); } - void UpdateAI(uint32 /*diff*/) override - { - if (!UpdateVictim()) - return; - - DoMeleeAttackIfReady(); - } - private: InstanceScript* instance; }; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_shazzrah.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_shazzrah.cpp index c87e3661a12..c88342baf6b 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_shazzrah.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_shazzrah.cpp @@ -104,8 +104,6 @@ struct boss_shazzrah : public BossAI if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_sulfuron_harbinger.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_sulfuron_harbinger.cpp index 667a6af0144..c319245ca0a 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_sulfuron_harbinger.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_sulfuron_harbinger.cpp @@ -119,8 +119,6 @@ struct boss_sulfuron : public BossAI if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - - DoMeleeAttackIfReady(); } }; @@ -184,8 +182,6 @@ struct npc_flamewaker_priest : public ScriptedAI if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - - DoMeleeAttackIfReady(); } private: diff --git a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp index 3b501ca29d1..1b220d3ddc2 100644 --- a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp +++ b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp @@ -488,10 +488,7 @@ public: } else uiTimer -= uiDiff; } - if (!UpdateVictim()) - return; - - DoMeleeAttackIfReady(); + UpdateVictim(); } void JustSummoned(Creature* summon) override @@ -530,14 +527,6 @@ public: creature->AI()->SetData(2, 1); } - void UpdateAI(uint32 /*diff*/) override - { - if (!UpdateVictim()) - return; - - DoMeleeAttackIfReady(); - } - void JustDied(Unit* /*killer*/) override { if (!me->IsSummon()) diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_maiden_of_virtue.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_maiden_of_virtue.cpp index a1848abb7c8..5d1145bdfbc 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_maiden_of_virtue.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_maiden_of_virtue.cpp @@ -116,8 +116,6 @@ public: if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp index 89616f3566a..4a71fd3c4a1 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp @@ -219,10 +219,7 @@ public: if (!UpdateVictim() && _phase != PHASE_NONE) return; - scheduler.Update(diff, [this] - { - DoMeleeAttackIfReady(); - }); + scheduler.Update(diff); } void SpellHit(WorldObject* /*caster*/, SpellInfo const* spellInfo) override @@ -370,10 +367,7 @@ public: if (!UpdateVictim() || _phase == PHASE_MOUNTED) return; - scheduler.Update(diff, [this] - { - DoMeleeAttackIfReady(); - }); + scheduler.Update(diff); } private: diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp index 98b3b7452fe..3deb60aa30a 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp @@ -287,6 +287,7 @@ public: if (Vanish_Timer <= diff) { DoCast(me, SPELL_VANISH); + me->SetCanMelee(false); InVanish = true; Vanish_Timer = 30000; Wait_Timer = 5000; @@ -316,11 +317,9 @@ public: target->CastSpell(target, SPELL_GARROTE, true); InVanish = false; + me->SetCanMelee(true); } else Wait_Timer -= diff; } - - if (!InVanish) - DoMeleeAttackIfReady(); } }; }; @@ -371,8 +370,6 @@ struct boss_moroes_guestAI : public ScriptedAI { if (instance->GetBossState(DATA_MOROES) != IN_PROGRESS) EnterEvadeMode(); - - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp index 2ad49885338..307d00f534b 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp @@ -345,8 +345,6 @@ public: } } else PhaseTimer -= diff; } - - DoMeleeAttackIfReady(); } }; }; diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp index 1f0044a137c..830580eaaf1 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp @@ -370,8 +370,6 @@ public: if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - - DoMeleeAttackIfReady(); } private: diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp index ec383112be7..08844a5ac48 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp @@ -550,8 +550,6 @@ public: EnfeebleResetTimer = 9000; } else EnfeebleTimer -= diff; } - - DoMeleeAttackIfReady(); } void Cleanup(Creature* infernal, InfernalPoint *point) diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp index b2e71646759..3939f8d4505 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp @@ -173,6 +173,7 @@ public: void Reset() override { Initialize(); + me->SetCanMelee(true); // Not in progress instance->SetBossState(DATA_ARAN, NOT_STARTED); @@ -488,8 +489,7 @@ public: } else FlameWreathCheckTime -= diff; } - if (ArcaneCooldown && FireCooldown && FrostCooldown) - DoMeleeAttackIfReady(); + me->SetCanMelee(ArcaneCooldown && FireCooldown && FrostCooldown); } void DamageTaken(Unit* /*pAttacker*/, uint32& damage, DamageEffectType /*damageType*/, SpellInfo const* /*spellInfo = nullptr*/) override diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp index 6ca698e307d..a70f2022ae4 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp @@ -185,10 +185,7 @@ public: if (!UpdateVictim()) return; - _scheduler.Update(diff, [this] - { - DoMeleeAttackIfReady(); - }); + _scheduler.Update(diff); } private: @@ -303,10 +300,7 @@ public: if (!UpdateVictim()) return; - _scheduler.Update(diff, [this] - { - DoMeleeAttackIfReady(); - }); + _scheduler.Update(diff); } private: diff --git a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp index 6e515066112..63a43c286fe 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp @@ -229,8 +229,6 @@ public: SummonTito(); else SummonTitoTimer -= diff; } - - DoMeleeAttackIfReady(); } }; }; @@ -291,8 +289,6 @@ public: DoCastVictim(SPELL_YIPPING); YipTimer = 10000; } else YipTimer -= diff; - - DoMeleeAttackIfReady(); } }; }; @@ -423,8 +419,6 @@ public: DoCast(target, SPELL_BRAIN_WIPE); BrainWipeTimer = 20000; } else BrainWipeTimer -= diff; - - DoMeleeAttackIfReady(); } }; }; @@ -538,8 +532,6 @@ public: RustTimer = 6000; } else RustTimer -= diff; } - - DoMeleeAttackIfReady(); } }; }; @@ -652,8 +644,6 @@ public: DoCastVictim(SPELL_FRIGHTENED_SCREAM); ScreamTimer = urand(20000, 30000); } else ScreamTimer -= diff; - - DoMeleeAttackIfReady(); } }; }; @@ -737,8 +727,6 @@ public: DoCastVictim(SPELL_CHAIN_LIGHTNING); ChainLightningTimer = 15000; } else ChainLightningTimer -= diff; - - DoMeleeAttackIfReady(); } }; }; @@ -914,8 +902,6 @@ public: if (!UpdateVictim()) return; - DoMeleeAttackIfReady(); - if (ChaseTimer <= diff) { if (!IsChasing) @@ -1358,8 +1344,6 @@ public: DoCastVictim(SPELL_POISON_THRUST); PoisonThrustTimer = urand(10000, 20000); } else PoisonThrustTimer -= diff; - - DoMeleeAttackIfReady(); } }; }; @@ -1480,8 +1464,6 @@ void boss_julianne::boss_julianneAI::UpdateAI(uint32 diff) EternalAffectionTimer = urand(45000, 60000); } else EternalAffectionTimer -= diff; - - DoMeleeAttackIfReady(); } void boss_julianne::boss_julianneAI::DamageTaken(Unit* /*done_by*/, uint32& damage, DamageEffectType /*damageType*/, SpellInfo const* /*spellInfo = nullptr*/) diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp index e5a48916459..5e082828cb5 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp @@ -474,8 +474,6 @@ struct npc_felblood_kaelthas_phoenix : public ScriptedAI break; } } - - DoMeleeAttackIfReady(); } private: InstanceScript* _instance; diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp index 1747d99f3db..47b26341b9d 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp @@ -334,8 +334,6 @@ public: SWPainTimer = 10000; } else SWPainTimer -= diff; - - DoMeleeAttackIfReady(); } }; }; @@ -508,6 +506,7 @@ public: { Initialize(); me->SetVisible(true); + me->SetCanMelee(true); boss_priestess_lackey_commonAI::Reset(); } @@ -531,6 +530,7 @@ public: AddThreat(unit, 1000.0f); InVanish = true; + me->SetCanMelee(false); Vanish_Timer = 30000; Wait_Timer = 10000; } else Vanish_Timer -= diff; @@ -543,6 +543,7 @@ public: DoCastVictim(SPELL_KIDNEY_SHOT, true); me->SetVisible(true); // ...? Hacklike InVanish = false; + me->SetCanMelee(true); } else Wait_Timer -= diff; } @@ -563,9 +564,6 @@ public: DoCastVictim(SPELL_EVISCERATE); Eviscerate_Timer = 4000; } else Eviscerate_Timer -= diff; - - if (!InVanish) - DoMeleeAttackIfReady(); } }; }; @@ -668,8 +666,6 @@ public: Fear_Timer = 10000; } else Fear_Timer -= diff; - - DoMeleeAttackIfReady(); } }; }; @@ -732,8 +728,6 @@ public: DoCastVictim(SPELL_SNAP_KICK); Snap_Kick_Timer = 4500; } else Snap_Kick_Timer -= diff; - - DoMeleeAttackIfReady(); } }; }; @@ -865,8 +859,6 @@ public: Blink_Timer = 8000; } else Blink_Timer -= diff; - - DoMeleeAttackIfReady(); } }; }; @@ -987,8 +979,6 @@ public: DoCastVictim(SPELL_FRIGHTENING_SHOUT); Frightening_Shout_Timer = 18000; } else Frightening_Shout_Timer -= diff; - - DoMeleeAttackIfReady(); } }; }; @@ -1088,8 +1078,6 @@ public: Freezing_Trap_Timer = 15000; } } else Freezing_Trap_Timer -= diff; - - DoMeleeAttackIfReady(); } else { @@ -1202,8 +1190,6 @@ public: DoCast(me, SPELL_LESSER_HEALING_WAVE); Healing_Wave_Timer = 5000; } else Healing_Wave_Timer -= diff; - - DoMeleeAttackIfReady(); } }; }; @@ -1304,8 +1290,6 @@ public: DoCast(me, SPELL_HIGH_EXPLOSIVE_SHEEP); High_Explosive_Sheep_Timer = 65000; } else High_Explosive_Sheep_Timer -= diff; - - DoMeleeAttackIfReady(); } }; }; diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp index 787cf45c59f..723b0e36fd0 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp @@ -239,8 +239,6 @@ class boss_selin_fireheart : public CreatureScript events.ScheduleEvent(EVENT_DRAIN_CRYSTAL, 20s, 25s, 0, PHASE_NORMAL); } } - - DoMeleeAttackIfReady(); } private: diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp index ccad5296b58..e0f929f122c 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp @@ -167,8 +167,6 @@ class boss_vexallus : public CreatureScript if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - - DoMeleeAttackIfReady(); } private: diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp index f93716612a9..fe9054503a9 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp @@ -282,8 +282,6 @@ public: break; } } - - DoMeleeAttackIfReady(); break; default: break; @@ -1069,31 +1067,22 @@ struct npc_scarlet_ghoul : public ScriptedAI Player* plrOwner = owner->ToPlayer(); if (plrOwner && plrOwner->IsInCombat()) { - if (plrOwner->getAttackerForHelper() && plrOwner->getAttackerForHelper()->GetEntry() == NPC_GHOSTS) - AttackStart(plrOwner->getAttackerForHelper()); + Unit* newTarget = plrOwner->getAttackerForHelper(); + if (newTarget && newTarget->GetEntry() == NPC_GHOSTS) + AttackStart(newTarget); else FindMinions(owner); } } } - if (!UpdateVictim() || !me->GetVictim()) + if (!UpdateVictim()) return; + } - //ScriptedAI::UpdateAI(diff); - //Check if we have a current target - if (me->EnsureVictim()->GetEntry() == NPC_GHOSTS) - { - if (me->isAttackReady()) - { - //If we are within range melee the target - if (me->IsWithinMeleeRange(me->GetVictim())) - { - me->AttackerStateUpdate(me->GetVictim()); - me->resetAttackTimer(); - } - } - } + bool CanAIAttack(Unit const* target) const override + { + return target->GetEntry() == NPC_GHOSTS; } }; @@ -1259,8 +1248,6 @@ struct npc_hearthglen_crusader : public ScriptedAI if (!me->IsWithinCombatRange(me->GetVictim(), _minimumRange)) DoSpellAttackIfReady(me->m_spells[0]); - else - DoMeleeAttackIfReady(); } void WaypointPathEnded(uint32 /*nodeId*/, uint32 pathId) override diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp index b93c1646e46..60afdb38ba9 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp @@ -416,8 +416,6 @@ public: if (!UpdateVictim()) return; - - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp index 083dcf24eb8..f6a442910cd 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp @@ -1465,8 +1465,6 @@ public: SetHoldState(false); } else uiFight_duration -= diff; - - DoMeleeAttackIfReady(); } } diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp index 239bdfb87c8..432266947d1 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp @@ -107,8 +107,6 @@ struct boss_arcanist_doan : public BossAI DoCastSelf(SPELL_ARCANE_BUBBLE); DoCastAOE(SPELL_DETONATION); } - - DoMeleeAttackIfReady(); } private: diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_azshir_the_sleepless.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_azshir_the_sleepless.cpp index e7c3471c5dc..78ebaf3741f 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_azshir_the_sleepless.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_azshir_the_sleepless.cpp @@ -96,8 +96,6 @@ struct boss_azshir_the_sleepless : public BossAI if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - - DoMeleeAttackIfReady(); } private: diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp index 8a16c962d0a..44688f980e5 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp @@ -605,8 +605,6 @@ struct boss_headless_horseman : public ScriptedAI if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - - DoMeleeAttackIfReady(); } private: @@ -663,8 +661,6 @@ struct npc_pulsing_pumpkin : public ScriptedAI return; _scheduler.Update(diff); - - DoMeleeAttackIfReady(); } private: 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 3ac6ec3bb60..baf7aa22d83 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp @@ -120,8 +120,6 @@ struct boss_high_inquisitor_fairbanks : public BossAI if (!_healTimer.Passed()) _healTimer.Update(diff); - - DoMeleeAttackIfReady(); } void ExecuteEvent(uint32 eventId) override 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 f054558afcf..13e82f35c67 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp @@ -228,8 +228,6 @@ public: if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - - DoMeleeAttackIfReady(); } private: @@ -343,9 +341,6 @@ public: if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - - if (me->HasReactState(REACT_AGGRESSIVE)) - DoMeleeAttackIfReady(); } void DamageTaken(Unit* /*who*/, uint32& damage, DamageEffectType /*damageType*/, SpellInfo const* /*spellInfo = nullptr*/) override diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp index f32f4e29111..22b89f2225c 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp @@ -131,7 +131,6 @@ class boss_darkmaster_gandling : public CreatureScript if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_doctor_theolen_krastinov.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_doctor_theolen_krastinov.cpp index f058d2ac3d6..5a5012adee7 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_doctor_theolen_krastinov.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_doctor_theolen_krastinov.cpp @@ -95,8 +95,6 @@ class boss_doctor_theolen_krastinov : public CreatureScript if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_illucia_barov.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_illucia_barov.cpp index 1efb043fd00..e5388fe69ab 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_illucia_barov.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_illucia_barov.cpp @@ -97,8 +97,6 @@ class boss_illucia_barov : public CreatureScript if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp index 7318f05150e..5299ae2bf49 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp @@ -141,8 +141,6 @@ class boss_instructor_malicia : public CreatureScript if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp index 8bf0b8a9311..0fba33cff26 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp @@ -102,8 +102,6 @@ public: if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_kirtonos_the_herald.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_kirtonos_the_herald.cpp index a4f8cea844e..d1f4a292e71 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_kirtonos_the_herald.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_kirtonos_the_herald.cpp @@ -252,8 +252,6 @@ class boss_kirtonos_the_herald : public CreatureScript if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp index e58ac8b67c5..ca837001eb3 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp @@ -119,8 +119,6 @@ public: if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - - DoMeleeAttackIfReady(); } private: diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_lord_alexei_barov.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_lord_alexei_barov.cpp index 20be79069ed..8bb1c5dc1ba 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_lord_alexei_barov.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_lord_alexei_barov.cpp @@ -91,8 +91,6 @@ class boss_lord_alexei_barov : public CreatureScript if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_lorekeeper_polkelt.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_lorekeeper_polkelt.cpp index 8ae50697d9b..8c3d7c58344 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_lorekeeper_polkelt.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_lorekeeper_polkelt.cpp @@ -96,8 +96,6 @@ class boss_lorekeeper_polkelt : public CreatureScript if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_ras_frostwhisper.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_ras_frostwhisper.cpp index 8da1b37206a..cb7ae140ae0 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_ras_frostwhisper.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_ras_frostwhisper.cpp @@ -110,8 +110,6 @@ public: if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_the_ravenian.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_the_ravenian.cpp index 63050b56ab5..bc4dacad9fc 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_the_ravenian.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_the_ravenian.cpp @@ -96,8 +96,6 @@ class boss_the_ravenian : public CreatureScript if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_vectus.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_vectus.cpp index 9d652f8f5de..fb7c760b893 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_vectus.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_vectus.cpp @@ -111,8 +111,6 @@ public: if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - - DoMeleeAttackIfReady(); } void WaypointReached(uint32 waypointId, uint32 pathId) override diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp index fba6f227cb6..31298d59e99 100644 --- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp +++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp @@ -256,8 +256,6 @@ struct boss_apothecary_hummel : public BossAI if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - - DoMeleeAttackIfReady(); } void OnQuestReward(Player* /*player*/, Quest const* quest, LootItemType /*type*/, uint32 /*opt*/) override @@ -354,8 +352,6 @@ struct npc_apothecary_baxter : public npc_apothecary_genericAI break; } } - - DoMeleeAttackIfReady(); } private: diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_baron_rivendare.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_baron_rivendare.cpp index 4d67e50144e..0a1d7c4539a 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_baron_rivendare.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_baron_rivendare.cpp @@ -122,7 +122,6 @@ public: if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - DoMeleeAttackIfReady(); } private: diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_baroness_anastari.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_baroness_anastari.cpp index dd2a0214de8..2b8bbdb5499 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_baroness_anastari.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_baroness_anastari.cpp @@ -127,8 +127,6 @@ struct boss_baroness_anastari : public BossAI if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - - DoMeleeAttackIfReady(); } }; 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 56fa89e24de..5c74e358502 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_cannon_master_willey.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_cannon_master_willey.cpp @@ -224,8 +224,6 @@ public: //30 seconds until we should cast this again SummonRifleman_Timer = 30000; } else SummonRifleman_Timer -= diff; - - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_dathrohan_balnazzar.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_dathrohan_balnazzar.cpp index ca7bb764917..4e63634ed44 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_dathrohan_balnazzar.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_dathrohan_balnazzar.cpp @@ -216,8 +216,6 @@ public: m_uiMindControl_Timer = 15000; } else m_uiMindControl_Timer -= uiDiff; } - - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_magistrate_barthilas.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_magistrate_barthilas.cpp index b8860a5b27d..2012fcea4b2 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_magistrate_barthilas.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_magistrate_barthilas.cpp @@ -127,8 +127,6 @@ public: DoCastVictim(SPELL_MIGHTYBLOW); MightyBlow_Timer = 20000; } else MightyBlow_Timer -= diff; - - DoMeleeAttackIfReady(); } }; 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 a79ca0cee98..6d1a3233ae0 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_maleki_the_pallid.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_maleki_the_pallid.cpp @@ -96,8 +96,6 @@ public: break; } } - - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_nerubenkan.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_nerubenkan.cpp index f9d76231d61..e9d40865655 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_nerubenkan.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_nerubenkan.cpp @@ -110,8 +110,6 @@ public: RaiseUndeadScarab(me->GetVictim()); RaiseUndeadScarab_Timer = 16000; } else RaiseUndeadScarab_Timer -= diff; - - DoMeleeAttackIfReady(); } }; 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 49457a30244..5f950d6e566 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 @@ -159,8 +159,6 @@ public: DivineShield_Timer = 40000; } } else DivineShield_Timer -= diff; - - DoMeleeAttackIfReady(); } }; }; diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_postmaster_malown.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_postmaster_malown.cpp index 8c7ecfca87a..691a77346d4 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_postmaster_malown.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_postmaster_malown.cpp @@ -123,8 +123,6 @@ class boss_postmaster_malown : public CreatureScript if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - - DoMeleeAttackIfReady(); } }; 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 7245d066a28..b5abd3092e1 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_ramstein_the_gorger.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_ramstein_the_gorger.cpp @@ -101,8 +101,6 @@ public: DoCastVictim(SPELL_KNOCKOUT); Knockout_Timer = 10000; } else Knockout_Timer -= diff; - - DoMeleeAttackIfReady(); } }; }; 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 ca1123c4c13..0b8c15866e9 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_timmy_the_cruel.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_timmy_the_cruel.cpp @@ -94,8 +94,6 @@ public: //15 seconds until we should cast this again RavenousClaw_Timer = 15000; } else RavenousClaw_Timer -= diff; - - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp index ae665d2b2d1..0d092af1082 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp @@ -290,8 +290,6 @@ public: TouchTimer = 7000; } else TouchTimer -= diff; - - DoMeleeAttackIfReady(); } void ReceiveEmote(Player* player, uint32 emote) override diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp index a2d27715662..c6afdce1818 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp @@ -291,8 +291,6 @@ struct boss_brutallus : public BossAI if (!UpdateVictim()) return; - - DoMeleeAttackIfReady(); } if (!UpdateVictim() || IsIntro) @@ -324,8 +322,6 @@ struct boss_brutallus : public BossAI DoCast(me, SPELL_BERSERK); Enraged = true; } else BerserkTimer -= diff; - - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp index 4a40289eb12..e4b53573046 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp @@ -309,8 +309,6 @@ public: if (me->IsWithinMeleeRange(me->GetVictim())) { HandleTouchedSpells(me->GetVictim(), SPELL_DARK_TOUCHED); - me->AttackerStateUpdate(me->GetVictim()); - me->resetAttackTimer(); } } } diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp index 07b9282f17d..14210bbe5ee 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp @@ -276,6 +276,7 @@ struct boss_felmyst : public BossAI break; } phase = NextPhase; + me->SetCanMelee(phase == PHASE_GROUND); } void HandleFlightSequence() @@ -454,7 +455,6 @@ struct boss_felmyst : public BossAI EnterPhase(PHASE_FLIGHT); break; default: - DoMeleeAttackIfReady(); break; } } diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp index 1e7d9b13b84..68717bdb57f 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp @@ -339,8 +339,6 @@ struct boss_kalecgos : public BossAI if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - - DoMeleeAttackIfReady(); } private: @@ -420,8 +418,6 @@ struct boss_kalecgos_human : public ScriptedAI if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - - DoMeleeAttackIfReady(); } private: diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp index 65dfebf49f2..678b3d70ff3 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp @@ -864,7 +864,6 @@ public: } } } - DoMeleeAttackIfReady(); //Time runs over! for (uint8 i = 0; i < ActiveTimers; ++i) if (!TimerIsDeactivated[i]) @@ -998,8 +997,6 @@ public: AddThreat(ref->GetVictim(), 1.0f, pPortal); FelfirePortalTimer = 20000; } else FelfirePortalTimer -= diff; - - DoMeleeAttackIfReady(); } }; @@ -1361,7 +1358,6 @@ public: DoCastVictim(SPELL_SR_MOONFIRE, false); uiTimer[1] = urand(2000, 4000); } - DoMeleeAttackIfReady(); break; case CLASS_HUNTER: if (uiTimer[1] <= diff) @@ -1381,7 +1377,6 @@ public: DoCastVictim(SPELL_SR_MULTI_SHOT, false); uiTimer[0] = urand(6000, 8000); } - DoMeleeAttackIfReady(); } break; case CLASS_MAGE: @@ -1390,7 +1385,6 @@ public: DoCastVictim(SPELL_SR_FIREBALL, false); uiTimer[1] = urand(2000, 4000); } - DoMeleeAttackIfReady(); break; case CLASS_WARLOCK: if (uiTimer[1] <= diff) @@ -1403,7 +1397,6 @@ public: DoCast(SelectTarget(SelectTargetMethod::Random, 0, 100, true), SPELL_SR_CURSE_OF_AGONY, true); uiTimer[2] = urand(2000, 4000); } - DoMeleeAttackIfReady(); break; case CLASS_WARRIOR: if (uiTimer[1] <= diff) @@ -1411,7 +1404,6 @@ public: DoCastVictim(SPELL_SR_WHIRLWIND, false); uiTimer[1] = urand(9000, 11000); } - DoMeleeAttackIfReady(); break; case CLASS_PALADIN: if (uiTimer[1] <= diff) @@ -1424,7 +1416,6 @@ public: DoCastVictim(SPELL_SR_HOLY_SHOCK, false); uiTimer[2] = urand(2000, 4000); } - DoMeleeAttackIfReady(); break; case CLASS_PRIEST: if (uiTimer[1] <= diff) @@ -1437,7 +1428,6 @@ public: DoCast(me, SPELL_SR_RENEW, false); uiTimer[2] = urand(6000, 8000); } - DoMeleeAttackIfReady(); break; case CLASS_SHAMAN: if (uiTimer[1] <= diff) @@ -1445,7 +1435,6 @@ public: DoCastVictim(SPELL_SR_EARTH_SHOCK, false); uiTimer[1] = urand(4000, 6000); } - DoMeleeAttackIfReady(); break; case CLASS_ROGUE: if (uiTimer[1] <= diff) @@ -1453,7 +1442,6 @@ public: DoCastVictim(SPELL_SR_HEMORRHAGE, true); uiTimer[1] = urand(4000, 6000); } - DoMeleeAttackIfReady(); break; } TC_LOG_DEBUG("scripts", "Sinister-Timer"); diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp index 3b932075070..41ef13b6b21 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp @@ -198,10 +198,7 @@ struct boss_entropius : public BossAI if (!UpdateVictim()) return; - scheduler.Update(diff, [this] - { - DoMeleeAttackIfReady(); - }); + scheduler.Update(diff); } void DoResetPortals() @@ -444,10 +441,7 @@ struct npc_void_sentinel : public ScriptedAI void UpdateAI(uint32 diff) override { - _scheduler.Update(diff, [this] - { - DoMeleeAttackIfReady(); - }); + _scheduler.Update(diff); } private: diff --git a/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp b/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp index c38fef91072..db0c2164857 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp +++ b/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp @@ -202,8 +202,6 @@ class boss_archaedas : public CreatureScript //45 seconds until we should cast this agian uiTremorTimer = 45000; } else uiTremorTimer -= uiDiff; - - DoMeleeAttackIfReady(); } void JustDied (Unit* /*killer*/) override @@ -314,8 +312,6 @@ class npc_archaedas_minions : public CreatureScript //Return since we have no target if (!UpdateVictim()) return; - - DoMeleeAttackIfReady(); } }; @@ -371,8 +367,6 @@ class npc_stonekeepers : public CreatureScript //Return since we have no target if (!UpdateVictim()) return; - - DoMeleeAttackIfReady(); } void JustDied(Unit* /*killer*/) override diff --git a/src/server/scripts/EasternKingdoms/Uldaman/boss_ironaya.cpp b/src/server/scripts/EasternKingdoms/Uldaman/boss_ironaya.cpp index e1c15c7bdf7..bdacd1ba34c 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/boss_ironaya.cpp +++ b/src/server/scripts/EasternKingdoms/Uldaman/boss_ironaya.cpp @@ -83,10 +83,7 @@ struct boss_ironaya : public BossAI if (!UpdateVictim()) return; - scheduler.Update(diff, [this] - { - DoMeleeAttackIfReady(); - }); + scheduler.Update(diff); } private: diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp index b2d1c6166a5..596d750ded6 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp @@ -81,8 +81,6 @@ class boss_akilzon : public CreatureScript } } */ - - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_daakara.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_daakara.cpp index 51cf111167c..9f2b5aa37d0 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_daakara.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_daakara.cpp @@ -96,8 +96,6 @@ class boss_daakara : public CreatureScript } } */ - - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp index de67dd2b2b0..1dea4c0980e 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp @@ -89,8 +89,6 @@ class boss_halazzi : public CreatureScript } } */ - - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp index cf321021290..807e1c50af9 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp @@ -93,8 +93,6 @@ class boss_hexlord_malacrass : public CreatureScript } } */ - - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp index 773aa8c8ea1..f993ee7c8bc 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp @@ -90,8 +90,6 @@ class boss_janalai : public CreatureScript } } */ - - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp index c34d13a265b..8aac1cdac8c 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp @@ -95,8 +95,6 @@ class boss_nalorakk : public CreatureScript } } */ - - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp index 2cb3681cc26..d68c81ceb2a 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp @@ -72,8 +72,6 @@ struct boss_grilek : public BossAI return; } */ - - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp index adf73e984fe..59a0ef4c069 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp @@ -72,8 +72,6 @@ struct boss_hazzarah : public BossAI return; } */ - - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo_the_godbreaker.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo_the_godbreaker.cpp index 9dd8abab90a..851709a063a 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo_the_godbreaker.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo_the_godbreaker.cpp @@ -90,8 +90,6 @@ class boss_jindo_the_godbreaker : public CreatureScript } } */ - - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_kilnara.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_kilnara.cpp index 30f9a64ec2e..b77366a2418 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_kilnara.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_kilnara.cpp @@ -83,8 +83,6 @@ struct boss_kilnara : public BossAI } } */ - - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp index 145f5acce61..108ce771e0b 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp @@ -280,8 +280,6 @@ struct boss_mandokir : public BossAI if (me->HasUnitState(UNIT_STATE_CASTING)) return; } - - DoMeleeAttackIfReady(); } private: @@ -327,14 +325,6 @@ struct npc_ohgan : public ScriptedAI } } - void UpdateAI(uint32 /*diff*/) override - { - if (!UpdateVictim()) - return; - - DoMeleeAttackIfReady(); - } - private: InstanceScript* _instance; }; diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp index 3677594a533..8fc70a65961 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp @@ -69,8 +69,6 @@ struct boss_renataki : public BossAI } } */ - - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp index acd9cd00b69..1811c7c800f 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp @@ -88,8 +88,6 @@ struct boss_venoxis : public BossAI return; } */ - - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp index 634c2539c77..e1840ba58c6 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp @@ -64,8 +64,6 @@ struct boss_wushoolay : public BossAI return; } */ - - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_zanzil.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_zanzil.cpp index debb07f15c5..2ec8b35d58c 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_zanzil.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_zanzil.cpp @@ -91,8 +91,6 @@ class boss_zanzil : public CreatureScript } } */ - - DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/zone_dun_morogh_area_coldridge_valley.cpp b/src/server/scripts/EasternKingdoms/zone_dun_morogh_area_coldridge_valley.cpp index 8df996ec5ac..541ec3c53b0 100644 --- a/src/server/scripts/EasternKingdoms/zone_dun_morogh_area_coldridge_valley.cpp +++ b/src/server/scripts/EasternKingdoms/zone_dun_morogh_area_coldridge_valley.cpp @@ -537,8 +537,6 @@ struct npc_joren_ironstock : public ScriptedAI if (!UpdateVictim()) return; - - DoMeleeAttackIfReady(); } private: diff --git a/src/server/scripts/EasternKingdoms/zone_duskwood.cpp b/src/server/scripts/EasternKingdoms/zone_duskwood.cpp index 7fef2d60253..c9917a24a9e 100644 --- a/src/server/scripts/EasternKingdoms/zone_duskwood.cpp +++ b/src/server/scripts/EasternKingdoms/zone_duskwood.cpp @@ -120,8 +120,6 @@ public: break; } } - - DoMeleeAttackIfReady(); } private: diff --git a/src/server/scripts/EasternKingdoms/zone_eversong_woods.cpp b/src/server/scripts/EasternKingdoms/zone_eversong_woods.cpp index 0c52922b0a1..b51919a85dc 100644 --- a/src/server/scripts/EasternKingdoms/zone_eversong_woods.cpp +++ b/src/server/scripts/EasternKingdoms/zone_eversong_woods.cpp @@ -104,8 +104,6 @@ struct npc_partygoer_pather : public ScriptedAI if (!UpdateVictim()) return; - - DoMeleeAttackIfReady(); } private: @@ -200,8 +198,6 @@ struct npc_partygoer : public ScriptedAI if (!UpdateVictim()) return; - - DoMeleeAttackIfReady(); } private: diff --git a/src/server/scripts/EasternKingdoms/zone_redridge_mountains.cpp b/src/server/scripts/EasternKingdoms/zone_redridge_mountains.cpp index 0a515e8fe6d..0eb97cec0ee 100644 --- a/src/server/scripts/EasternKingdoms/zone_redridge_mountains.cpp +++ b/src/server/scripts/EasternKingdoms/zone_redridge_mountains.cpp @@ -73,7 +73,6 @@ public: void UpdateAI(uint32 diff) override { _scheduler.Update(diff); - DoMeleeAttackIfReady(); } private: @@ -104,11 +103,6 @@ public: if ((!who || who->GetTypeId() == TYPEID_UNIT) && me->HealthBelowPctDamaged(82, damage)) damage = 0; } - - void UpdateAI(uint32 /*diff*/) override - { - DoMeleeAttackIfReady(); - } }; CreatureAI* GetAI(Creature* creature) const override @@ -244,7 +238,6 @@ public: } } } - DoMeleeAttackIfReady(); } private: @@ -358,7 +351,6 @@ public: } } } - DoMeleeAttackIfReady(); } private: EventMap _events; diff --git a/src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp b/src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp index 4054d4ff6f5..867801feeb9 100644 --- a/src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp +++ b/src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp @@ -871,8 +871,6 @@ struct npc_silverpine_grand_executor_mortuus : public ScriptedAI if (!UpdateVictim()) return; - - DoMeleeAttackIfReady(); } void SummonPortalsFromOrgrimmar() @@ -1254,8 +1252,6 @@ struct npc_silverpine_worgen_renegade : public ScriptedAI break; } } - - DoMeleeAttackIfReady(); } private: @@ -1331,8 +1327,6 @@ struct npc_silverpine_forsaken_trooper : public ScriptedAI break; } } - - DoMeleeAttackIfReady(); } private: @@ -3609,8 +3603,6 @@ struct npc_silverpine_forest_ettin : public ScriptedAI if (!UpdateVictim()) return; - - DoMeleeAttackIfReady(); } private: @@ -3914,8 +3906,6 @@ struct npc_silverpine_orc_sea_dog : public ScriptedAI if (!UpdateVictim()) return; - - DoMeleeAttackIfReady(); } private: @@ -4043,8 +4033,6 @@ struct npc_silverpine_skitterweb_matriarch : public ScriptedAI if (!UpdateVictim()) return; - - DoMeleeAttackIfReady(); } void ScheduleCombatEvents(Unit* who) @@ -4325,8 +4313,6 @@ struct npc_silverpine_agatha_fenris_isle : public ScriptedAI if (!UpdateVictim()) return; - - DoMeleeAttackIfReady(); } void SetEventNoEscape() @@ -4556,8 +4542,6 @@ struct npc_silverpine_hillsbrad_refugee : public ScriptedAI break; } } - - DoMeleeAttackIfReady(); } private: @@ -4712,8 +4696,6 @@ struct npc_silverpine_worgen_sentry : public ScriptedAI break; } } - - DoMeleeAttackIfReady(); } private: diff --git a/src/server/scripts/EasternKingdoms/zone_undercity.cpp b/src/server/scripts/EasternKingdoms/zone_undercity.cpp index d91500c33d7..2c05032de2e 100644 --- a/src/server/scripts/EasternKingdoms/zone_undercity.cpp +++ b/src/server/scripts/EasternKingdoms/zone_undercity.cpp @@ -232,8 +232,6 @@ public: break; } } - - DoMeleeAttackIfReady(); } void OnQuestReward(Player* player, Quest const* quest, LootItemType /*type*/, uint32 /*opt*/) override |
