Core/Creatures: Moved autoattack handling from scripts to game
Port From (https://github.com/TrinityCore/TrinityCore/commit/605e5f94c0d71cad8e83fa5a07eaec4e6bed9cc3)
This commit is contained in:
@@ -408,9 +408,7 @@ namespace Scripts.Argus.AntorusTheBurningThrone.Argus
|
||||
});
|
||||
|
||||
|
||||
if (me.GetVictim() != null && me.GetVictim().IsWithinMeleeRange(me))
|
||||
DoMeleeAttackIfReady();
|
||||
else
|
||||
if (me.GetVictim() == null && !me.GetVictim().IsWithinMeleeRange(me))
|
||||
DoSpellAttackIfReady(SpellIds.Carnage);
|
||||
}
|
||||
|
||||
|
||||
@@ -538,8 +538,6 @@ namespace Scripts.BrokenIsles.ZoneMardum
|
||||
|
||||
if (me.HasUnitState(UnitState.Casting))
|
||||
return;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -144,7 +144,7 @@ namespace Scripts.DragonIsles.AzureVault.Leymor
|
||||
|
||||
public override void UpdateAI(uint diff)
|
||||
{
|
||||
_scheduler.Update(diff, DoMeleeAttackIfReady);
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -203,7 +203,7 @@ namespace Scripts.DragonIsles.AzureVault.Leymor
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, DoMeleeAttackIfReady);
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -131,10 +131,7 @@ namespace Scripts.EasternKingdoms.AlteracValley
|
||||
_scheduler.Update(diff);
|
||||
|
||||
if (me.HasUnitState(UnitState.Casting))
|
||||
return;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -141,8 +141,7 @@ namespace Scripts.EasternKingdoms.AlteracValley.Balinda
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -91,8 +91,7 @@ namespace Scripts.EasternKingdoms.AlteracValley.Drekthar
|
||||
if (!UpdateVictim() || !CheckInRoom())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -92,8 +92,7 @@ namespace Scripts.EasternKingdoms.AlteracValley.Galvangar
|
||||
if (!UpdateVictim() || !CheckInRoom())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -75,8 +75,7 @@ namespace Scripts.EasternKingdoms.AlteracValley.Vanndar
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -248,8 +248,6 @@ namespace Scripts.EasternKingdoms.BaradinHold.Alizabal
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,8 +125,6 @@ namespace Scripts.EasternKingdoms.BaradinHold.Occuthar
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace Scripts.EasternKingdoms.BaradinHold.PitLordArgaloth
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -66,7 +66,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackrockCaverns.AscendantLo
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackrockCaverns.Beauty
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,8 +78,6 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackrockCaverns.Corla
|
||||
public override void UpdateAI(uint diff)
|
||||
{
|
||||
_scheduler.Update(diff);
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-3
@@ -64,8 +64,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackrockCaverns.KarshSteelb
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+1
-1
@@ -102,7 +102,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackrockCaverns.RomoggBonec
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackrockDepths.AmbassadorFl
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -237,7 +237,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackrockDepths.CorenDirebre
|
||||
if (!UpdateVictim() && phase != DirebrewPhases.Intro)
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -283,7 +283,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackrockDepths.CorenDirebre
|
||||
|
||||
public override void UpdateAI(uint diff)
|
||||
{
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -513,5 +513,4 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackrockDepths.CorenDirebre
|
||||
OnEffectApply.Add(new EffectApplyHandler(OnApply, 1, AuraType.PeriodicDummy, AuraEffectHandleModes.Real));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+1
-1
@@ -79,7 +79,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackrockDepths.Draganthauri
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -93,7 +93,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackrockDepths.GeneralAnger
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackrockDepths.HighInterrog
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackrockDepths.Magmus
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
|
||||
public override void JustDied(Unit killer)
|
||||
|
||||
@@ -189,7 +189,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackrockDepths.TombOfSeven
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
|
||||
public override bool OnGossipSelect(Player player, uint menuId, uint gossipListId)
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackrockSpire.Drakkisath
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -61,7 +61,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackrockSpire.GizrulTheSlav
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackrockSpire.Gyth
|
||||
SummonedRend = true;
|
||||
}
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackrockSpire.Halycon
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackrockSpire.HighlordOmokk
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,9 +94,6 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackrockSpire
|
||||
frenzy15 = true;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -58,8 +58,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackrockSpire.MotherSmolder
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-3
@@ -98,8 +98,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackrockSpire.OverlordWyrmt
|
||||
}
|
||||
}
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+1
-3
@@ -214,8 +214,6 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackrockSpire.PyroguardEmbe
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -261,7 +259,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackrockSpire.PyroguardEmbe
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackrockSpire.Quartermaster
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -502,7 +502,6 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackrockSpire.RendBlackhand
|
||||
if (me.HasUnitState(UnitState.Casting))
|
||||
return;
|
||||
});
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackrockSpire.ShadowHunterV
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackrockSpire.Thebeast
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackrockSpire.UrokDoomhowl
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackrockSpire.WarmasterVoon
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -95,7 +95,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackwingLair.Broodlord
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -156,8 +156,6 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackwingLair
|
||||
Breath2_Spell = SpellIds.Igniteflesh;
|
||||
break;
|
||||
}
|
||||
|
||||
EnterEvadeMode();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
@@ -243,8 +241,6 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackwingLair
|
||||
DoCast(me, SpellIds.Enrage);
|
||||
Enraged = true;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackwingLair.Ebonroc
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackwingLair.Firemaw
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackwingLair.Flamegor
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -570,9 +570,6 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackwingLair.VictorNefarius
|
||||
Phase3 = true;
|
||||
Talk(TextIds.SayRaiseSkeletons);
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -123,7 +123,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackwingLair.Razorgore
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -164,8 +164,6 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackwingLair.Vaelastrasz
|
||||
Talk(TextIds.SayHalflife);
|
||||
HasYelled = true;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
public override bool OnGossipSelect(Player player, uint menuId, uint gossipListId)
|
||||
|
||||
@@ -72,8 +72,6 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.MoltenCore.BaronGeddon
|
||||
|
||||
if (me.HasUnitState(UnitState.Casting))
|
||||
return;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.MoltenCore.Garr
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.MoltenCore.Garr
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.MoltenCore.Gehennas
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.MoltenCore.Golemagg
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.MoltenCore.Golemagg
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.MoltenCore.Lucifron
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.MoltenCore.Magmadar
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,8 +103,6 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.MoltenCore.Majordomo
|
||||
|
||||
if (HealthBelowPct(50))
|
||||
DoCast(me, SpellIds.AegisOfRagnaros, new CastSpellExtraArgs(true));
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -294,9 +294,6 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.MoltenCore
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -315,14 +312,6 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.MoltenCore
|
||||
{
|
||||
instance.SetData(MCMiscConst.DataRagnarosAdds, 1);
|
||||
}
|
||||
|
||||
public override void UpdateAI(uint diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -96,9 +96,6 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.MoltenCore.Shazzrah
|
||||
if (me.HasUnitState(UnitState.Casting))
|
||||
return;
|
||||
});
|
||||
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.MoltenCore.Sulfuron
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.MoltenCore.Sulfuron
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -175,8 +175,6 @@ namespace Scripts.EasternKingdoms.Deadmines
|
||||
}
|
||||
else uiTimer -= uiDiff;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
public override void MovementInform(MovementGeneratorType uiType, uint uiId)
|
||||
|
||||
@@ -112,7 +112,7 @@ namespace Scripts.EasternKingdoms.Karazhan.Curator
|
||||
|
||||
public override void UpdateAI(uint diff)
|
||||
{
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
|
||||
bool _infused;
|
||||
|
||||
@@ -81,7 +81,7 @@ namespace Scripts.EasternKingdoms.Karazhan.MaidenOfVirtue
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -206,7 +206,7 @@ namespace Scripts.EasternKingdoms.Karazhan.Midnight
|
||||
if (!UpdateVictim() && _phase != Phases.None)
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
|
||||
public override void SpellHit(WorldObject caster, SpellInfo spellInfo)
|
||||
@@ -346,7 +346,7 @@ namespace Scripts.EasternKingdoms.Karazhan.Midnight
|
||||
if (!UpdateVictim() || _phase == Phases.Mounted)
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -137,6 +137,7 @@ namespace Scripts.EasternKingdoms.Karazhan.Moroes
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(30), MiscConst.GroupNonEnrage, task =>
|
||||
{
|
||||
DoCast(me, SpellIds.Vanish);
|
||||
me.SetCanMelee(false);
|
||||
InVanish = true;
|
||||
|
||||
task.Schedule(TimeSpan.FromSeconds(5), garroteTask =>
|
||||
@@ -148,6 +149,7 @@ namespace Scripts.EasternKingdoms.Karazhan.Moroes
|
||||
target.CastSpell(target, SpellIds.Garrote, true);
|
||||
|
||||
InVanish = false;
|
||||
me.SetCanMelee(true);
|
||||
});
|
||||
|
||||
task.Repeat();
|
||||
@@ -263,11 +265,7 @@ namespace Scripts.EasternKingdoms.Karazhan.Moroes
|
||||
_scheduler.CancelGroup(MiscConst.GroupNonEnrage);
|
||||
}
|
||||
|
||||
_scheduler.Update(diff, () =>
|
||||
{
|
||||
if (!InVanish)
|
||||
DoMeleeAttackIfReady();
|
||||
});
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -318,8 +316,6 @@ namespace Scripts.EasternKingdoms.Karazhan.Moroes
|
||||
{
|
||||
if (instance.GetBossState(DataTypes.Moroes) != EncounterState.InProgress)
|
||||
EnterEvadeMode();
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -337,8 +337,6 @@ namespace Scripts.EasternKingdoms.Karazhan.Netherspite
|
||||
}
|
||||
else PhaseTimer -= diff;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -318,7 +318,7 @@ namespace Scripts.EasternKingdoms.Karazhan.Nightbane
|
||||
if (!UpdateVictim() && phase != NightbanePhases.Intro)
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -284,8 +284,6 @@ namespace Scripts.EasternKingdoms.Karazhan.EsOpera
|
||||
SummonTito();
|
||||
else SummonTitoTimer -= diff;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void SummonTito()
|
||||
@@ -350,8 +348,6 @@ namespace Scripts.EasternKingdoms.Karazhan.EsOpera
|
||||
YipTimer = 10000;
|
||||
}
|
||||
else YipTimer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -456,8 +452,6 @@ namespace Scripts.EasternKingdoms.Karazhan.EsOpera
|
||||
BrainWipeTimer = 20000;
|
||||
}
|
||||
else BrainWipeTimer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -563,8 +557,6 @@ namespace Scripts.EasternKingdoms.Karazhan.EsOpera
|
||||
}
|
||||
else RustTimer -= diff;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -671,8 +663,6 @@ namespace Scripts.EasternKingdoms.Karazhan.EsOpera
|
||||
ScreamTimer = RandomHelper.URand(20000, 30000);
|
||||
}
|
||||
else ScreamTimer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -749,8 +739,6 @@ namespace Scripts.EasternKingdoms.Karazhan.EsOpera
|
||||
ChainLightningTimer = 15000;
|
||||
}
|
||||
else ChainLightningTimer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -880,8 +868,6 @@ namespace Scripts.EasternKingdoms.Karazhan.EsOpera
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
|
||||
if (ChaseTimer <= diff)
|
||||
{
|
||||
if (!IsChasing)
|
||||
@@ -1235,8 +1221,6 @@ namespace Scripts.EasternKingdoms.Karazhan.EsOpera
|
||||
EternalAffectionTimer = RandomHelper.URand(45000, 60000);
|
||||
}
|
||||
else EternalAffectionTimer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1432,8 +1416,6 @@ namespace Scripts.EasternKingdoms.Karazhan.EsOpera
|
||||
PoisonThrustTimer = RandomHelper.URand(10000, 20000);
|
||||
}
|
||||
else PoisonThrustTimer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -513,8 +513,6 @@ namespace Scripts.EasternKingdoms.Karazhan.PrinceMalchezaar
|
||||
|
||||
if (phase == 2)
|
||||
DoMeleeAttacksIfReady();
|
||||
else
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void DoMeleeAttacksIfReady()
|
||||
|
||||
@@ -138,6 +138,7 @@ namespace Scripts.EasternKingdoms.Karazhan.ShadeOfAran
|
||||
public override void Reset()
|
||||
{
|
||||
Initialize();
|
||||
me.SetCanMelee(true);
|
||||
|
||||
// Not in progress
|
||||
instance.SetBossState(DataTypes.Aran, EncounterState.NotStarted);
|
||||
@@ -462,8 +463,7 @@ namespace Scripts.EasternKingdoms.Karazhan.ShadeOfAran
|
||||
else FlameWreathCheckTime -= diff;
|
||||
}
|
||||
|
||||
if (ArcaneCooldown != 0 && FireCooldown != 0 && FrostCooldown != 0)
|
||||
DoMeleeAttackIfReady();
|
||||
me.SetCanMelee(ArcaneCooldown != 0 && FireCooldown != 0 && FrostCooldown != 0);
|
||||
}
|
||||
|
||||
public override void DamageTaken(Unit pAttacker, ref uint damage, DamageEffectType damageType, SpellInfo spellInfo = null)
|
||||
|
||||
@@ -124,7 +124,7 @@ namespace Scripts.EasternKingdoms.Karazhan.TerestianIllhoof
|
||||
|
||||
public override void UpdateAI(uint diff)
|
||||
{
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -153,10 +153,7 @@ namespace Scripts.EasternKingdoms.Karazhan.TerestianIllhoof
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, () =>
|
||||
{
|
||||
DoMeleeAttackIfReady();
|
||||
});
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -239,7 +236,7 @@ namespace Scripts.EasternKingdoms.Karazhan.TerestianIllhoof
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -430,7 +430,7 @@ namespace Scripts.EasternKingdoms.MagistersTerrace.FelbloodKaelthas
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -340,7 +340,7 @@ namespace Scripts.EasternKingdoms.MagistersTerrace.PriestessDelrissa
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -497,6 +497,7 @@ namespace Scripts.EasternKingdoms.MagistersTerrace.PriestessDelrissa
|
||||
AddThreat(unit, 1000.0f);
|
||||
|
||||
InVanish = true;
|
||||
me.SetCanMelee(false);
|
||||
task.Repeat(TimeSpan.FromSeconds(30));
|
||||
task.Schedule(TimeSpan.FromSeconds(10), waitTask =>
|
||||
{
|
||||
@@ -505,6 +506,7 @@ namespace Scripts.EasternKingdoms.MagistersTerrace.PriestessDelrissa
|
||||
DoCastVictim(SpellIds.Backstab, new CastSpellExtraArgs(true));
|
||||
DoCastVictim(SpellIds.KidneyShot, new CastSpellExtraArgs(true));
|
||||
me.SetVisible(true); // ...? Hacklike
|
||||
me.SetCanMelee(true);
|
||||
InVanish = false;
|
||||
}
|
||||
waitTask.Repeat();
|
||||
@@ -523,6 +525,7 @@ namespace Scripts.EasternKingdoms.MagistersTerrace.PriestessDelrissa
|
||||
{
|
||||
Initialize();
|
||||
me.SetVisible(true);
|
||||
me.SetCanMelee(true);
|
||||
|
||||
base.Reset();
|
||||
}
|
||||
@@ -535,9 +538,6 @@ namespace Scripts.EasternKingdoms.MagistersTerrace.PriestessDelrissa
|
||||
base.UpdateAI(diff);
|
||||
|
||||
_scheduler.Update(diff);
|
||||
|
||||
if (!InVanish)
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -608,7 +608,7 @@ namespace Scripts.EasternKingdoms.MagistersTerrace.PriestessDelrissa
|
||||
|
||||
base.UpdateAI(diff);
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -649,7 +649,7 @@ namespace Scripts.EasternKingdoms.MagistersTerrace.PriestessDelrissa
|
||||
|
||||
base.UpdateAI(diff);
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -740,7 +740,7 @@ namespace Scripts.EasternKingdoms.MagistersTerrace.PriestessDelrissa
|
||||
HasIceBlocked = true;
|
||||
}
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -823,7 +823,7 @@ namespace Scripts.EasternKingdoms.MagistersTerrace.PriestessDelrissa
|
||||
|
||||
base.UpdateAI(diff);
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -908,7 +908,7 @@ namespace Scripts.EasternKingdoms.MagistersTerrace.PriestessDelrissa
|
||||
base.UpdateAI(diff);
|
||||
|
||||
if (me.IsWithinDistInMap(me.GetVictim(), SharedConst.AttackDistance))
|
||||
_meleeScheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_meleeScheduler.Update(diff);
|
||||
else
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
@@ -973,7 +973,7 @@ namespace Scripts.EasternKingdoms.MagistersTerrace.PriestessDelrissa
|
||||
|
||||
base.UpdateAI(diff);
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1037,7 +1037,7 @@ namespace Scripts.EasternKingdoms.MagistersTerrace.PriestessDelrissa
|
||||
|
||||
base.UpdateAI(diff);
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -231,8 +231,6 @@ namespace Scripts.EasternKingdoms.MagistersTerrace.SelinFireheart
|
||||
_events.ScheduleEvent(EventIds.DrainCrystal, TimeSpan.FromSeconds(20), TimeSpan.FromSeconds(25), 0, PhaseIds.Normal);
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -252,5 +250,4 @@ namespace Scripts.EasternKingdoms.MagistersTerrace.SelinFireheart
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -136,7 +136,7 @@ namespace Scripts.EasternKingdoms.MagistersTerrace.Vexallus
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, () => DoMeleeAttackIfReady());
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -361,7 +361,7 @@ namespace Scripts.Events.LunarFestival
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, DoMeleeAttackIfReady);
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -206,7 +206,7 @@ namespace Scripts.Events.ZalazaneFall
|
||||
if (_tigerGuid.IsEmpty())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, DoMeleeAttackIfReady);
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -97,8 +97,6 @@ namespace Scripts.Pets.Hunter
|
||||
else
|
||||
_spellTimer -= diff;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -32,8 +32,6 @@ namespace Scripts.Pets.Shaman
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff);
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,7 +72,7 @@ namespace Scripts.Pets.Shaman
|
||||
if (me.HasUnitState(UnitState.Casting))
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, DoMeleeAttackIfReady);
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -134,8 +134,6 @@ namespace Scripts.World.Achievements
|
||||
Unit target = SelectTarget(SelectTargetMethod.MaxThreat, 0, -50.0f, true);
|
||||
if (target != null)
|
||||
DoCast(target, SpellIds.SummonPlayer);
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -107,12 +107,9 @@ namespace Scripts.World.NpcGuard
|
||||
{
|
||||
me.ResetAttackTimer();
|
||||
DoCastVictim(spellInfo.Id);
|
||||
meleeContext.Repeat();
|
||||
return;
|
||||
}
|
||||
}
|
||||
me.AttackerStateUpdate(victim);
|
||||
me.ResetAttackTimer();
|
||||
meleeContext.Repeat();
|
||||
}).Schedule(TimeSpan.FromSeconds(5), spellContext =>
|
||||
{
|
||||
@@ -183,7 +180,7 @@ namespace Scripts.World.NpcGuard
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, DoMeleeAttackIfReady);
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
|
||||
void ScheduleVanish()
|
||||
|
||||
@@ -207,8 +207,7 @@ namespace Scripts.World.NpcsSpecial
|
||||
ResetFlagTimer -= diff;
|
||||
}
|
||||
|
||||
if (UpdateVictim())
|
||||
DoMeleeAttackIfReady();
|
||||
UpdateVictim();
|
||||
}
|
||||
|
||||
public override void ReceiveEmote(Player player, TextEmotes emote)
|
||||
|
||||
Reference in New Issue
Block a user