Core/Combat Improve extra attacks handling

Port From (https://github.com/TrinityCore/TrinityCore/commit/6c9bde098b40f38905ea7407d0cd77437b0b953c)
This commit is contained in:
hondacrx
2022-05-29 23:42:17 -04:00
parent 44b70d8db9
commit faa937a9da
8 changed files with 71 additions and 48 deletions
+15
View File
@@ -147,6 +147,21 @@ namespace Game.Entities
m_combatManager.Update(diff);
_lastDamagedTargetGuid = ObjectGuid.Empty;
if (_lastExtraAttackSpell != 0)
{
while (!extraAttacksTargets.Empty())
{
var (targetGuid, count) = extraAttacksTargets.FirstOrDefault();
extraAttacksTargets.Remove(targetGuid);
Unit victim = Global.ObjAccessor.GetUnit(this, targetGuid);
if (victim != null)
HandleProcExtraAttackFor(victim, count);
}
_lastExtraAttackSpell = 0;
}
uint att;
// not implemented before 3.0.2
if ((att = GetAttackTimer(WeaponAttackType.BaseAttack)) != 0)