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
|
|
@ -345,7 +345,7 @@ enum AuraType
|
||||||
SPELL_AURA_307 = 307,
|
SPELL_AURA_307 = 307,
|
||||||
SPELL_AURA_308 = 308,
|
SPELL_AURA_308 = 308,
|
||||||
SPELL_AURA_309 = 309,
|
SPELL_AURA_309 = 309,
|
||||||
SPELL_AURA_310 = 310,
|
SPELL_AURA_MOD_PET_AOE_DAMAGE_AVOIDANCE = 310,
|
||||||
SPELL_AURA_311 = 311,
|
SPELL_AURA_311 = 311,
|
||||||
SPELL_AURA_312 = 312,
|
SPELL_AURA_312 = 312,
|
||||||
SPELL_AURA_313 = 313,
|
SPELL_AURA_313 = 313,
|
||||||
|
|
|
||||||
|
|
@ -360,7 +360,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS]=
|
||||||
&Aura::HandleNULL, //307 absorb healing?
|
&Aura::HandleNULL, //307 absorb healing?
|
||||||
&Aura::HandleNULL, //308 new aura for hunter traps
|
&Aura::HandleNULL, //308 new aura for hunter traps
|
||||||
&Aura::HandleNULL, //309 absorb healing?
|
&Aura::HandleNULL, //309 absorb healing?
|
||||||
&Aura::HandleNULL, //310 pet avoidance passive?
|
&Aura::HandleNoImmediateEffect, //310 SPELL_AURA_MOD_PET_AOE_DAMAGE_AVOIDANCE implemented in Unit::SpellDamageBonusTaken
|
||||||
&Aura::HandleNULL, //311 0 spells in 3.3
|
&Aura::HandleNULL, //311 0 spells in 3.3
|
||||||
&Aura::HandleNULL, //312 0 spells in 3.3
|
&Aura::HandleNULL, //312 0 spells in 3.3
|
||||||
&Aura::HandleNULL, //313 0 spells in 3.3
|
&Aura::HandleNULL, //313 0 spells in 3.3
|
||||||
|
|
|
||||||
|
|
@ -6369,9 +6369,9 @@ uint32 Unit::SpellDamageBonusTaken(Unit *pCaster, SpellEntry const *spellProto,
|
||||||
// Mod damage taken from AoE spells
|
// Mod damage taken from AoE spells
|
||||||
if(IsAreaOfEffectSpell(spellProto))
|
if(IsAreaOfEffectSpell(spellProto))
|
||||||
{
|
{
|
||||||
AuraList const& avoidAuras = GetAurasByType(SPELL_AURA_MOD_AOE_DAMAGE_AVOIDANCE);
|
TakenTotalMod *= GetTotalAuraMultiplier(SPELL_AURA_MOD_AOE_DAMAGE_AVOIDANCE);
|
||||||
for(AuraList::const_iterator itr = avoidAuras.begin(); itr != avoidAuras.end(); ++itr)
|
if (GetTypeId() == TYPEID_UNIT && ((Creature*)this)->isPet())
|
||||||
TakenTotalMod *= ((*itr)->GetModifier()->m_amount + 100.0f) / 100.0f;
|
TakenTotalMod *= GetTotalAuraMultiplier(SPELL_AURA_MOD_PET_AOE_DAMAGE_AVOIDANCE);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Taken fixed damage bonus auras
|
// Taken fixed damage bonus auras
|
||||||
|
|
@ -7295,8 +7295,11 @@ uint32 Unit::MeleeDamageBonusTaken(Unit *pCaster, uint32 pdamage,WeaponAttackTyp
|
||||||
|
|
||||||
// ..taken pct (aoe avoidance)
|
// ..taken pct (aoe avoidance)
|
||||||
if(spellProto && IsAreaOfEffectSpell(spellProto))
|
if(spellProto && IsAreaOfEffectSpell(spellProto))
|
||||||
|
{
|
||||||
TakenPercent *= GetTotalAuraMultiplier(SPELL_AURA_MOD_AOE_DAMAGE_AVOIDANCE);
|
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
|
// special dummys/class scripts and other effects
|
||||||
// =============================================
|
// =============================================
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "10471"
|
#define REVISION_NR "10472"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue