Core/Entities: virtualize CheckAttackFitToAuraRequirement

- Should've been like this to begin with

(cherry picked from commit 21d95a1d767c95910d4508e0e83f34b4f89f587a)
This commit is contained in:
ariel- authored and funjoker committed 2022-02-16 04:49:24 +01:00
1 parent 70ecdd1511
commit 4ad1d377fe
4 files changed
+17 -18

No files matched your search

-17
View File
@@ -9822,23 +9822,6 @@ void Unit::UpdateUnitMod(UnitMods unitMod)
}
}
bool Unit::CheckAttackFitToAuraRequirement(WeaponAttackType attackType, AuraEffect const* aurEff) const
{
// only players have item requirements
if (GetTypeId() != TYPEID_PLAYER)
return true;
SpellInfo const* spellInfo = aurEff->GetSpellInfo();
if (spellInfo->EquippedItemClass == -1)
return true;
Item* item = ToPlayer()->GetWeaponForAttack(attackType, true);
if (!item || !item->IsFitToSpellRequirements(spellInfo))
return false;
return true;
}
void Unit::UpdateDamageDoneMods(WeaponAttackType attackType)
{
UnitMods unitMod;