Core/Pets: updated many pet damage formulars and apply spellpower bonus for warlock pets

This commit is contained in:
Ovalord
2018-03-16 12:28:34 +01:00
parent 0e998a6161
commit 80f65d665b
3 changed files with 62 additions and 25 deletions

View File

@@ -420,6 +420,16 @@ void Spell::EffectSchoolDMG(SpellEffIndex effIndex)
damage += damage / 6;
}
}
// Warlock Pets deal 50% of the coefficient's spell power bonus as bonus damage
if (m_caster->IsPet())
{
if (Unit* owner = m_caster->GetCharmerOrOwner())
{
damage = CalculatePct(owner->SpellDamageBonusDone(unitTarget, m_spellInfo, (uint32)damage, SPELL_DIRECT_DAMAGE, effIndex), 50);
damage = unitTarget->SpellDamageBonusTaken(owner, m_spellInfo, (uint32)damage, SPELL_DIRECT_DAMAGE);
}
}
break;
}
case SPELLFAMILY_PRIEST: