mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
[10472] Implement SPELL_AURA_MOD_PET_AOE_DAMAGE_AVOIDANCE (310)
Original patch provided by rsa
This commit is contained in:
parent
16f912190f
commit
8eb47efddc
4 changed files with 10 additions and 7 deletions
|
|
@ -6369,9 +6369,9 @@ uint32 Unit::SpellDamageBonusTaken(Unit *pCaster, SpellEntry const *spellProto,
|
|||
// Mod damage taken from AoE spells
|
||||
if(IsAreaOfEffectSpell(spellProto))
|
||||
{
|
||||
AuraList const& avoidAuras = GetAurasByType(SPELL_AURA_MOD_AOE_DAMAGE_AVOIDANCE);
|
||||
for(AuraList::const_iterator itr = avoidAuras.begin(); itr != avoidAuras.end(); ++itr)
|
||||
TakenTotalMod *= ((*itr)->GetModifier()->m_amount + 100.0f) / 100.0f;
|
||||
TakenTotalMod *= GetTotalAuraMultiplier(SPELL_AURA_MOD_AOE_DAMAGE_AVOIDANCE);
|
||||
if (GetTypeId() == TYPEID_UNIT && ((Creature*)this)->isPet())
|
||||
TakenTotalMod *= GetTotalAuraMultiplier(SPELL_AURA_MOD_PET_AOE_DAMAGE_AVOIDANCE);
|
||||
}
|
||||
|
||||
// Taken fixed damage bonus auras
|
||||
|
|
@ -7295,8 +7295,11 @@ uint32 Unit::MeleeDamageBonusTaken(Unit *pCaster, uint32 pdamage,WeaponAttackTyp
|
|||
|
||||
// ..taken pct (aoe avoidance)
|
||||
if(spellProto && IsAreaOfEffectSpell(spellProto))
|
||||
{
|
||||
TakenPercent *= GetTotalAuraMultiplier(SPELL_AURA_MOD_AOE_DAMAGE_AVOIDANCE);
|
||||
|
||||
if (GetTypeId() == TYPEID_UNIT && ((Creature*)this)->isPet())
|
||||
TakenPercent *= GetTotalAuraMultiplier(SPELL_AURA_MOD_PET_AOE_DAMAGE_AVOIDANCE);
|
||||
}
|
||||
|
||||
// special dummys/class scripts and other effects
|
||||
// =============================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue