Jump to content

[fix?]Spell Power bonus for absorb auras


Recommended Posts

Posted

adds benefit from actual spell power instead of healing/damage bonuses and fix Borrowed Time Power Word: Shield absorb

diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 9b4c9b5..8f6692a 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -6480,32 +6480,61 @@ void Aura::HandleSchoolAbsorb(bool apply, bool Real)
                case SPELLFAMILY_PRIEST:
                    // Power Word: Shield
                    if (m_spellProto->SpellFamilyFlags & UI64LIT(0x0000000000000001))
+                    {
+                        if (caster->GetTypeId() != TYPEID_PLAYER)
+                            break;
                        //+80.68% from +spell bonus
-                        DoneActualBenefit = caster->SpellBaseHealingBonus(GetSpellSchoolMask(m_spellProto)) * 0.8068f;
+                        DoneActualBenefit = ((Player*)caster)->GetBaseSpellPowerBonus() * 0.8068f;
+
+                        // Borrowed Time
+                        Unit::AuraList const& timeDummyAuras = caster->GetAurasByType(SPELL_AURA_DUMMY);
+                        for(Unit::AuraList::const_iterator itr = timeDummyAuras.begin(); itr != timeDummyAuras.end(); ++itr)
+                        {
+                            if ((*itr)->GetSpellProto()->SpellIconID == 2899 && (*itr)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_PRIEST)
+                            {
+                                DoneActualBenefit += (*itr)->GetModifier()->m_amount * ((Player*)caster)->GetBaseSpellPowerBonus() / 100;
+                                break;
+                            }
+                        }
+                    }
                    break;
                case SPELLFAMILY_MAGE:
                    // Frost Ward, Fire Ward
                    if (m_spellProto->SpellFamilyFlags & UI64LIT(0x0000000000000108))
+                    {
+                        if (caster->GetTypeId() != TYPEID_PLAYER)
+                            break;
                        //+10% from +spell bonus
-                        DoneActualBenefit = caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellProto)) * 0.1f;
+                        DoneActualBenefit = ((Player*)caster)->GetBaseSpellPowerBonus() * 0.1f;
+                    }
                    // Ice Barrier
                    else if (m_spellProto->SpellFamilyFlags & UI64LIT(0x0000000100000000))
+                    {
+                        if (caster->GetTypeId() != TYPEID_PLAYER)
+                            break;
                        //+80.67% from +spell bonus
-                        DoneActualBenefit = caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellProto)) * 0.8067f;
+                        DoneActualBenefit = ((Player*)caster)->GetBaseSpellPowerBonus() * 0.8067f;
+                    }
                    break;
                case SPELLFAMILY_WARLOCK:
                    // Shadow Ward
                    if (m_spellProto->SpellFamilyFlags2 & 0x00000040)
+                    {
+                        if (caster->GetTypeId() != TYPEID_PLAYER)
+                            break;
                        //+30% from +spell bonus
-                        DoneActualBenefit = caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellProto)) * 0.30f;
+                        DoneActualBenefit = ((Player*)caster)->GetBaseSpellPowerBonus() * 0.30f;
+                    }
                    break;
                case SPELLFAMILY_PALADIN:
                    // Sacred Shield
                    // (check not strictly needed, only Sacred Shield has SPELL_AURA_SCHOOL_ABSORB in SPELLFAMILY_PALADIN at this time)
                    if (m_spellProto->SpellFamilyFlags & UI64LIT(0x0008000000000000))
-                    {
+                    {    
+                        if (caster->GetTypeId() != TYPEID_PLAYER)
+                            break;
                        // +75% from spell power
-                        DoneActualBenefit = caster->SpellBaseHealingBonus(GetSpellSchoolMask(m_spellProto)) * 0.75f;
+                        DoneActualBenefit = ((Player*)caster)->GetBaseSpellPowerBonus() * 0.75f;
                    }
                    break;
                default:

Posted

talent borrowed time, just grab the 6.5% per point when it should be 8% per point, then it with 5 points in this talent just is 32.5% when it should be 40% of spell power

P.D sorry for my English

  • 2 weeks later...
Posted

Current formula for working out Power Word: Shield (Patch 3.2)

base_absorb+(0.8068+0.08*BT)*sp)*(1+0.05*IMP)*(1+ 0.02*FP)*(1+0.01*TD)

* base_absorb is the base absorb given the PW:S which is 2230 at the moment

* BT is your Borrowed Time level http://www.wowhead.com/?spell=52800

* SP is your Spell Power

* IMP is your Improved Power Word: Shield level http://www.wowhead.com/?spell=14769

* FP is your Focused Power level http://www.wowhead.com/?spell=33190

* TD is your Twin Disciplines level http://www.wowhead.com/?spell=52803

e.g. (2230+(0.8068+0.08*5)*2500)*(1+0.05*3)*(1+ 0.02*2)*(1+0.01*5) = 6589

source: http://www.wowwiki.com/Power_Word:_Shield

  • 3 months later...
  • 8 months later...
Posted
Current formula for working out Power Word: Shield (Patch 3.2)

base_absorb+(0.8068+0.08*BT)*sp)*(1+0.05*IMP)*(1+ 0.02*FP)*(1+0.01*TD)

* base_absorb is the base absorb given the PW:S which is 2230 at the moment

* BT is your Borrowed Time level http://www.wowhead.com/?spell=52800

* SP is your Spell Power

* IMP is your Improved Power Word: Shield level http://www.wowhead.com/?spell=14769

* FP is your Focused Power level http://www.wowhead.com/?spell=33190

* TD is your Twin Disciplines level http://www.wowhead.com/?spell=52803

e.g. (2230+(0.8068+0.08*5)*2500)*(1+0.05*3)*(1+ 0.02*2)*(1+0.01*5) = 6589

source: http://www.wowwiki.com/Power_Word:_Shield

hy,

have anyone the curret code for this formula? pls post it tnx!

  • 1 month later...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use