Guest User

Untitled

a guest
Mar 12th, 2010
324
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 4.52 KB | None | 0 0
  1. diff -r edc78ad11b83 src/game/SpellAuraEffects.cpp
  2. --- a/src/game/SpellAuraEffects.cpp Thu Mar 11 23:25:04 2010 +0100
  3. +++ b/src/game/SpellAuraEffects.cpp Fri Mar 12 16:15:17 2010 -0300
  4.  -483,16 +483,33 @@
  5.                      // Ice Barrier
  6.                      if(GetSpellProto()->SpellFamilyFlags[1] & 0x1 && GetSpellProto()->SpellFamilyFlags[2] & 0x8)
  7.                      {
  8. -                        // +80.67% from sp bonus
  9. -                        DoneActualBenefit += caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellProto)) * 0.8067f;
  10. +                        // +80.68% from sp bonus
  11. +                        DoneActualBenefit += caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellProto)) * 0.8068f;
  12. +
  13. +                        // Glyph of Ice Barrier: its weird having a SPELLMOD_ALL_EFFECTS here but its blizzards doing :)
  14. +                        // Glyph of Ice Barrier is only applied at the spell damage bonus because it was already applied to the base value in CalculateSpellDamage
  15. +                        if (Player* modOwner = caster->GetSpellModOwner())
  16. +                            modOwner->ApplySpellMod(GetSpellProto()->Id, SPELLMOD_ALL_EFFECTS, DoneActualBenefit);
  17. +                    }
  18. +                    // Fire Ward
  19. +                    else if(GetSpellProto()->SpellFamilyFlags[0] & 0x8 && GetSpellProto()->SpellFamilyFlags[2] & 0x8)
  20. +                    {
  21. +                        // +80.68% from sp bonus
  22. +                        DoneActualBenefit += caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellProto)) * 0.8068f;
  23. +                    }
  24. +                    // Frost Ward
  25. +                    else if(GetSpellProto()->SpellFamilyFlags[0] & 0x100 && GetSpellProto()->SpellFamilyFlags[2] & 0x8)
  26. +                    {
  27. +                        // +80.68% from sp bonus
  28. +                        DoneActualBenefit += caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellProto)) * 0.8068f;
  29.                      }
  30.                      break;
  31.                  case SPELLFAMILY_WARLOCK:
  32.                      // Shadow Ward
  33. -                    if(m_spellProto->SpellFamilyFlags[2]& 0x40)
  34. +                    if(m_spellProto->SpellFamilyFlags[2] & 0x40)
  35.                      {
  36. -                        // +30% from sp bonus
  37. -                        DoneActualBenefit += caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellProto)) * 0.3f;
  38. +                        // +80.68% from sp bonus
  39. +                        DoneActualBenefit += caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellProto)) * 0.8068f;
  40.                      }
  41.                      break;
  42.                  case SPELLFAMILY_PRIEST:
  43.  -504,8 +521,26 @@
  44.                          // Borrowed Time
  45.                          if (AuraEffect const * aurEff = caster->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_PRIEST, 2899, 1))
  46.                              bonus += aurEff->GetAmount() / 100;
  47. -                        
  48. -                        DoneActualBenefit = caster->SpellBaseHealingBonus(GetSpellSchoolMask(GetSpellProto())) * bonus;
  49. +
  50. +                        DoneActualBenefit = caster->SpellBaseHealingBonus(GetSpellSchoolMask(GetSpellProto())) * bonus;
  51. +                        // Improved PW: Shield: its weird having a SPELLMOD_ALL_EFFECTS here but its blizzards doing :)
  52. +                        // Improved PW: Shield is only applied at the spell healing bonus because it was already applied to the base value in CalculateSpellDamage
  53. +                        if (Player* modOwner = caster->GetSpellModOwner())
  54. +                            modOwner->ApplySpellMod(GetSpellProto()->Id, SPELLMOD_ALL_EFFECTS, DoneActualBenefit);
  55. +                        DoneActualBenefit *= caster->CalculateLevelPenalty(GetSpellProto());
  56. +
  57. +                        amount += (int32)DoneActualBenefit;
  58. +
  59. +                        // Twin Disciplines
  60. +                        if (Player* modOwner = caster->GetSpellModOwner())
  61. +                            modOwner->ApplySpellMod(GetSpellProto()->Id, SPELLMOD_DAMAGE, amount);
  62. +
  63. +                        // Focused Power
  64. +                        Unit::AuraEffectList const& mHealingDonePct = caster->GetAuraEffectsByType(SPELL_AURA_MOD_HEALING_DONE_PERCENT);
  65. +                        for (Unit::AuraEffectList::const_iterator i = mHealingDonePct.begin(); i != mHealingDonePct.end(); ++i)
  66. +                            amount *= (100.0f + (*i)->GetAmount()) / 100.0f;
  67. +
  68. +                        return amount;
  69.                      }
  70.                      break;
  71.                  case SPELLFAMILY_PALADIN:
Advertisement
Add Comment
Please, Sign In to add comment