Core/Creatures: Moved autoattack handling from scripts to game

Port From (https://github.com/TrinityCore/TrinityCore/commit/605e5f94c0d71cad8e83fa5a07eaec4e6bed9cc3)
This commit is contained in:
hondacrx
2024-02-05 18:18:30 -05:00
parent aa696fb176
commit 437fe2d8fd
94 changed files with 192 additions and 358 deletions
@@ -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();
}
}
}