Core/Unit: fixed crash

This commit is contained in:
ariel- authored and Ovahlord committed 2022-09-12 09:15:05 +02:00
1 parent fd228f6c41
commit 6fc5bfcd08
4 files changed
+6 -6

No files matched your search

+2 -2
View File
@@ -12849,10 +12849,10 @@ bool Unit::CanApplyResilience() const
*damage -= target->GetDamageReduction(*damage);
}
int32 Unit::CalculateAOEAvoidance(int32 damage, uint32 schoolMask, Unit* caster) const
int32 Unit::CalculateAOEAvoidance(int32 damage, uint32 schoolMask, ObjectGuid const& casterGuid) const
{
damage = int32(float(damage) * GetTotalAuraMultiplierByMiscMask(SPELL_AURA_MOD_AOE_DAMAGE_AVOIDANCE, schoolMask));
if (caster->GetTypeId() == TYPEID_UNIT)
if (casterGuid.IsAnyTypeCreature())
damage = int32(float(damage) * GetTotalAuraMultiplierByMiscMask(SPELL_AURA_MOD_CREATURE_AOE_DAMAGE_AVOIDANCE, schoolMask));
return damage;