mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[10919] Actually use spell penetration gained by items in calculations
This commit is contained in:
parent
a13f8714f2
commit
14c1329ea5
4 changed files with 8 additions and 1 deletions
|
|
@ -1905,6 +1905,9 @@ void Unit::CalculateDamageAbsorbAndResist(Unit *pCaster, SpellSchoolMask schoolM
|
|||
// Ignore resistance by self SPELL_AURA_MOD_TARGET_RESISTANCE aura
|
||||
tmpvalue2 += (float)pCaster->GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_TARGET_RESISTANCE, schoolMask);
|
||||
|
||||
if (pCaster->GetTypeId() == TYPEID_PLAYER)
|
||||
tmpvalue2 -= (float)((Player*)pCaster)->GetSpellPenetrationItemMod();
|
||||
|
||||
tmpvalue2 *= (float)(0.15f / getLevel());
|
||||
if (tmpvalue2 < 0.0f)
|
||||
tmpvalue2 = 0.0f;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue