[8661] Fixes and improvments in absorb/reduction damage ignore auras work.

* Use stored in aura amount percent damage ignore for auras SPELL_AURA_MOD_IGNORE_ABSORB_FOR_SPELL
* Implement apply percent damage ignore for absorb (SPELL_AURA_MOD_IGNORE_ABSORB_SCHOOL (194))
  and redunction (SPELL_AURA_MOD_IGNORE_DAMAGE_REDUCTION_SCHOOL (269)).
  Later need recheck what from this 2 auras applied to armor reduction
  (currently 269 used only in single spell and this spell is single affecting armor
  and single normal school damage applied with 194 aura)
  Also unclear is this must applied to DoTs, expected that not need.
* Implement talent 53375 boots for spell 31884.
This commit is contained in:
VladimirMangos 2009-10-18 04:51:10 +04:00
parent 2412777007
commit 2e884f4228
5 changed files with 105 additions and 35 deletions

View file

@ -244,8 +244,8 @@ pAuraHandler AuraHandler[TOTAL_AURAS]=
&Aura::HandleAuraModUseNormalSpeed, //191 SPELL_AURA_USE_NORMAL_MOVEMENT_SPEED
&Aura::HandleModMeleeRangedSpeedPct, //192 SPELL_AURA_HASTE_MELEE
&Aura::HandleModCombatSpeedPct, //193 SPELL_AURA_MELEE_SLOW (in fact combat (any type attack) speed pct)
&Aura::HandleNULL, //194 SPELL_AURA_MOD_IGNORE_ABSORB_SCHOOL
&Aura::HandleNoImmediateEffect, //195 SPELL_AURA_MOD_IGNORE_ABSORB_FOR_SPELL implement in Unit::CalculateSpellDamage
&Aura::HandleNoImmediateEffect, //194 SPELL_AURA_MOD_IGNORE_ABSORB_SCHOOL implement in Unit::CalcNotIgnoreAbsorbDamage
&Aura::HandleNoImmediateEffect, //195 SPELL_AURA_MOD_IGNORE_ABSORB_FOR_SPELL implement in Unit::CalcNotIgnoreAbsorbDamage
&Aura::HandleNULL, //196 SPELL_AURA_MOD_COOLDOWN
&Aura::HandleNoImmediateEffect, //197 SPELL_AURA_MOD_ATTACKER_SPELL_AND_WEAPON_CRIT_CHANCE implemented in Unit::SpellCriticalBonus Unit::GetUnitCriticalChance
&Aura::HandleUnused, //198 unused (3.0.8a) old SPELL_AURA_MOD_ALL_WEAPON_SKILLS
@ -319,7 +319,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS]=
&Aura::HandleUnused, //266 unused (3.0.8a)
&Aura::HandleNoImmediateEffect, //267 SPELL_AURA_MOD_IMMUNE_AURA_APPLY_SCHOOL implemented in Unit::IsImmunedToSpellEffect
&Aura::HandleAuraModAttackPowerOfStatPercent, //268 SPELL_AURA_MOD_ATTACK_POWER_OF_STAT_PERCENT
&Aura::HandleNULL, //269 ignore DR effects?
&Aura::HandleNoImmediateEffect, //269 SPELL_AURA_MOD_IGNORE_DAMAGE_REDUCTION_SCHOOL
&Aura::HandleNULL, //270 SPELL_AURA_MOD_IGNORE_TARGET_RESIST
&Aura::HandleNoImmediateEffect, //271 SPELL_AURA_MOD_DAMAGE_FROM_CASTER implemented in Unit::SpellDamageBonus
&Aura::HandleNULL, //272 reduce spell cast time?
@ -5764,6 +5764,37 @@ void Aura::HandleSpellSpecificBoosts(bool apply)
}
case SPELLFAMILY_PALADIN:
{
if (m_spellProto->Id == 31884) // Avenging Wrath
{
if(!apply)
spellId1 = 57318; // Sanctified Wrath (triggered)
else
{
int32 percent = 0;
Unit::AuraList const& dummyAuras = m_target->GetAurasByType(SPELL_AURA_DUMMY);
for(Unit::AuraList::const_iterator itr = dummyAuras.begin(); itr != dummyAuras.end(); ++itr)
{
if ((*itr)->GetSpellProto()->SpellIconID == 3029)
{
percent = (*itr)->GetModifier()->m_amount;
break;
}
}
// apply in special way
if(percent)
{
spellId1 = 57318; // Sanctified Wrath (triggered)
// prevent aura deletion, specially in multi-boost case
SetInUse(true);
m_target->CastCustomSpell(m_target, spellId1, &percent, &percent, NULL, true, NULL, this);
SetInUse(false);
}
return;
}
break;
}
// Only process on player casting paladin aura
// all aura bonuses applied also in aura area effect way to caster
if (GetCasterGUID() != m_target->GetGUID() || !IS_PLAYER_GUID(GetCasterGUID()))