mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[8110] Implement aura SPELL_AURA_MOD_AOE_DAMAGE_AVOIDANCE (229).
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
7091e84f38
commit
06dcbce4ee
3 changed files with 18 additions and 2 deletions
|
|
@ -7894,6 +7894,14 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
|
|||
TakenTotalMod *= ((*i)->GetModifier()->m_amount+100.0f)/100.0f;
|
||||
}
|
||||
|
||||
// Mod damage taken from AoE spells
|
||||
if(IsAreaOfEffectSpell(spellProto))
|
||||
{
|
||||
AuraList const& avoidAuras = pVictim->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;
|
||||
}
|
||||
|
||||
// Taken/Done fixed damage bonus auras
|
||||
int32 DoneAdvertisedBenefit = SpellBaseDamageBonus(GetSpellSchoolMask(spellProto));
|
||||
int32 TakenAdvertisedBenefit = SpellBaseDamageBonusForVictim(GetSpellSchoolMask(spellProto), pVictim);
|
||||
|
|
@ -8737,6 +8745,14 @@ void Unit::MeleeDamageBonus(Unit *pVictim, uint32 *pdamage,WeaponAttackType attT
|
|||
TakenTotalMod *= ((*i)->GetModifier()->m_amount+100.0f)/100.0f;
|
||||
}
|
||||
|
||||
// Mod damage taken from AoE spells
|
||||
if(spellProto && IsAreaOfEffectSpell(spellProto))
|
||||
{
|
||||
AuraList const& avoidAuras = pVictim->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;
|
||||
}
|
||||
|
||||
float tmpDamage = float(int32(*pdamage) + DoneFlatBenefit) * DoneTotalMod;
|
||||
|
||||
// apply spellmod to Done damage
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue