mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 02:46:33 +01:00
Remove Deprecated code
This commit is contained in:
@@ -72,21 +72,13 @@ void UnitAI::DoMeleeAttackIfReady()
|
||||
//Make sure our attack is ready and we aren't currently casting before checking distance
|
||||
if (me->isAttackReady())
|
||||
{
|
||||
if (ShouldSparWith(victim))
|
||||
me->FakeAttackerStateUpdate(victim);
|
||||
else
|
||||
me->AttackerStateUpdate(victim);
|
||||
|
||||
me->AttackerStateUpdate(victim);
|
||||
me->resetAttackTimer();
|
||||
}
|
||||
|
||||
if (me->haveOffhandWeapon() && me->isAttackReady(OFF_ATTACK))
|
||||
{
|
||||
if (ShouldSparWith(victim))
|
||||
me->FakeAttackerStateUpdate(victim, OFF_ATTACK);
|
||||
else
|
||||
me->AttackerStateUpdate(victim, OFF_ATTACK);
|
||||
|
||||
me->AttackerStateUpdate(victim, OFF_ATTACK);
|
||||
me->resetAttackTimer(OFF_ATTACK);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2040,54 +2040,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) || HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PACIFIED))
|
||||
return;
|
||||
|
||||
if (!victim->IsAlive())
|
||||
return;
|
||||
|
||||
if ((attType == BASE_ATTACK || attType == OFF_ATTACK) && !IsWithinLOSInMap(victim))
|
||||
return;
|
||||
|
||||
AttackedTarget(victim, true);
|
||||
RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_MELEE_ATTACK);
|
||||
|
||||
if (attType != BASE_ATTACK && attType != OFF_ATTACK)
|
||||
return; // ignore ranged case
|
||||
|
||||
if (GetTypeId() == TYPEID_UNIT && !HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_POSSESSED) && !HasFlag(UNIT_FIELD_FLAGS_2, 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;
|
||||
|
||||
for (uint8 i = 0; i < MAX_ITEM_PROTO_DAMAGES; ++i)
|
||||
{
|
||||
damageInfo.Damages[i].DamageSchoolMask = GetMeleeDamageSchoolMask(attType, i);
|
||||
damageInfo.Damages[i].Damage = 0;
|
||||
damageInfo.Damages[i].Absorb = 0;
|
||||
damageInfo.Damages[i].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)
|
||||
|
||||
@@ -951,7 +951,6 @@ class TC_GAME_API Unit : public WorldObject
|
||||
|
||||
void HandleEmoteCommand(uint32 anim_id);
|
||||
void AttackerStateUpdate (Unit* victim, WeaponAttackType attType = BASE_ATTACK, bool extra = false);
|
||||
void FakeAttackerStateUpdate(Unit* victim, WeaponAttackType attType = BASE_ATTACK);
|
||||
|
||||
void CalculateMeleeDamage(Unit* victim, CalcDamageInfo* damageInfo, WeaponAttackType attackType = BASE_ATTACK);
|
||||
void DealMeleeDamage(CalcDamageInfo* damageInfo, bool durabilityLoss);
|
||||
|
||||
Reference in New Issue
Block a user