Core/Battlegrounds: Add dampening-spells for battlegrounds and arenas (thanks to Dr.Tenma and Svetilo/przem-something)

Additional data required for this commit :
http://forum.trinitycore.org/topic/30684-10555-add-dampening-spells-for-battlegrounds-arenas-and-wintergrasp/

--HG--
branch : trunk
This commit is contained in:
click
2010-12-02 23:50:36 +01:00
parent cf5e7b255d
commit e672793a3c

View File

@@ -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: