Remove Deprecated code
(cherry picked from commit fd166025c857477d654cdea6cd6f700e53bfe64b)
This commit is contained in:
@@ -2037,52 +2037,6 @@ void Unit::AttackerStateUpdate(Unit* victim, WeaponAttackType attType, bool extr
|
||||
}
|
||||
}
|
||||
|
||||
void Unit::FakeAttackerStateUpdate(Unit* victim, WeaponAttackType attType /*= BASE_ATTACK*/)
|
||||
{
|
||||
if (HasUnitState(UNIT_STATE_CANNOT_AUTOATTACK) || HasUnitFlag(UNIT_FLAG_PACIFIED))
|
||||
return;
|
||||
|
||||
if (!victim->IsAlive())
|
||||
return;
|
||||
|
||||
if ((attType == BASE_ATTACK || attType == OFF_ATTACK) && !IsWithinLOSInMap(victim))
|
||||
return;
|
||||
|
||||
AttackedTarget(victim, true);
|
||||
RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags::Attacking);
|
||||
|
||||
if (attType != BASE_ATTACK && attType != OFF_ATTACK)
|
||||
return; // ignore ranged case
|
||||
|
||||
if (GetTypeId() == TYPEID_UNIT && !HasUnitFlag(UNIT_FLAG_POSSESSED) && !HasUnitFlag2(UNIT_FLAG2_DISABLE_TURN))
|
||||
SetFacingToObject(victim, false); // update client side facing to face the target (prevents visual glitches when casting untargeted spells)
|
||||
|
||||
CalcDamageInfo damageInfo;
|
||||
damageInfo.Attacker = this;
|
||||
damageInfo.Target = victim;
|
||||
|
||||
damageInfo.DamageSchoolMask = GetMeleeDamageSchoolMask();
|
||||
damageInfo.OriginalDamage = 0;
|
||||
damageInfo.Damage = 0;
|
||||
damageInfo.Absorb = 0;
|
||||
damageInfo.Resist = 0;
|
||||
|
||||
damageInfo.AttackType = attType;
|
||||
damageInfo.CleanDamage = 0;
|
||||
damageInfo.Blocked = 0;
|
||||
|
||||
damageInfo.TargetState = VICTIMSTATE_HIT;
|
||||
damageInfo.HitInfo = HITINFO_AFFECTS_VICTIM | HITINFO_NORMALSWING | HITINFO_FAKE_DAMAGE;
|
||||
if (attType == OFF_ATTACK)
|
||||
damageInfo.HitInfo |= HITINFO_OFFHAND;
|
||||
|
||||
damageInfo.ProcAttacker = PROC_FLAG_NONE;
|
||||
damageInfo.ProcVictim = PROC_FLAG_NONE;
|
||||
damageInfo.HitOutCome = MELEE_HIT_NORMAL;
|
||||
|
||||
SendAttackStateUpdate(&damageInfo);
|
||||
}
|
||||
|
||||
void Unit::HandleProcExtraAttackFor(Unit* victim)
|
||||
{
|
||||
while (m_extraAttacks)
|
||||
|
||||
Reference in New Issue
Block a user