diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/server/game/Spells/Auras/SpellAuraEffects.cpp | 48 |
1 files changed, 33 insertions, 15 deletions
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 74bc857f7e2..49bb9b4e52b 100755 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -482,8 +482,7 @@ int32 AuraEffect::CalculateAmount(Unit * caster) DoneActualBenefit += caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellProto)) * 0.8068f; // Glyph of Ice Barrier: its weird having a SPELLMOD_ALL_EFFECTS here but its blizzards doing :) // Glyph of Ice Barrier is only applied at the spell damage bonus because it was already applied to the base value in CalculateSpellDamage - if (Player* modOwner = caster->GetSpellModOwner()) - modOwner->ApplySpellMod(GetSpellProto()->Id, SPELLMOD_ALL_EFFECTS, DoneActualBenefit); + DoneActualBenefit = caster->ApplyEffectModifiers(GetSpellProto(), m_effIndex, (int32)DoneActualBenefit); } // Fire Ward else if(GetSpellProto()->SpellFamilyFlags[0] & 0x8 && GetSpellProto()->SpellFamilyFlags[2] & 0x8) @@ -512,32 +511,51 @@ int32 AuraEffect::CalculateAmount(Unit * caster) { //+80.68% from sp bonus float bonus = 0.8068f; - AuraEffect const* pAurEff; // Borrowed Time - pAurEff = caster->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_PRIEST, 2899, 1); - if (pAurEff) + if (AuraEffect const* pAurEff = caster->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_PRIEST, 2899, 1)) bonus += (float)pAurEff->GetAmount() / 100.0f; + DoneActualBenefit += caster->SpellBaseHealingBonus(GetSpellSchoolMask(m_spellProto)) * bonus; + // Improved PW: Shield: its weird having a SPELLMOD_ALL_EFFECTS here but its blizzards doing :) + // Improved PW: Shield is only applied at the spell healing bonus because it was already applied to the base value in CalculateSpellDamage + DoneActualBenefit = caster->ApplyEffectModifiers(GetSpellProto(), m_effIndex, (int32)DoneActualBenefit); + DoneActualBenefit *= caster->CalculateLevelPenalty(GetSpellProto()); + + amount += (int32)DoneActualBenefit; + // Twin Disciplines - pAurEff = caster->GetAuraEffect(SPELL_AURA_ADD_PCT_MODIFIER, SPELLFAMILY_PRIEST, 0x400000, 0, 0, caster->GetGUID()); - if (pAurEff) - bonus += (float)pAurEff->GetAmount() / 100.0f; + if (AuraEffect const* pAurEff = caster->GetAuraEffect(SPELL_AURA_ADD_PCT_MODIFIER, SPELLFAMILY_PRIEST, 0x400000, 0, 0, caster->GetGUID())) + amount *= (100.0f + pAurEff->GetAmount()) / 100.0f; - // Focused Power - pAurEff = caster->GetAuraEffect(SPELL_AURA_MOD_HEALING_DONE_PERCENT, SPELLFAMILY_PRIEST, 2210, 2); - if (pAurEff) - bonus += (float)pAurEff->GetAmount() / 100.0f; + // Focused Power + amount *= caster->GetTotalAuraMultiplier(SPELL_AURA_MOD_HEALING_DONE_PERCENT); - DoneActualBenefit = caster->SpellBaseHealingBonus(GetSpellSchoolMask(GetSpellProto())) * bonus; + return amount; } break; case SPELLFAMILY_PALADIN: // Sacred Shield if (m_spellProto->SpellFamilyFlags[1] & 0x80000) { - // 0.75 from sp bonus - DoneActualBenefit = caster->SpellBaseHealingBonus(GetSpellSchoolMask(m_spellProto)) * 0.75f; + //+75.00% from sp bonus + float bonus = 0.75f; + + DoneActualBenefit += caster->SpellBaseHealingBonus(GetSpellSchoolMask(m_spellProto)) * bonus; + // Divine Guardian is only applied at the spell healing bonus because it was already applied to the base value in CalculateSpellDamage + DoneActualBenefit = caster->ApplyEffectModifiers(GetSpellProto(), m_effIndex, (int32)DoneActualBenefit); + DoneActualBenefit *= caster->CalculateLevelPenalty(GetSpellProto()); + + amount += (int32)DoneActualBenefit; + + // Arena - Dampening + if (AuraEffect const* pAurEff = caster->GetAuraEffect(74410, 0)) + amount *= (100.0f + pAurEff->GetAmount()) / 100.0f; + // Battleground - Dampening + else if (AuraEffect const* pAurEff = caster->GetAuraEffect(74411, 0)) + amount *= (100.0f + pAurEff->GetAmount()) / 100.0f; + + return amount; } break; default: |