diff options
author | QAston <none@none> | 2009-03-15 19:02:29 +0100 |
---|---|---|
committer | QAston <none@none> | 2009-03-15 19:02:29 +0100 |
commit | f663922a2c9ce3dd9e5d28f402ebd84b69d3b378 (patch) | |
tree | 2d8e101e0d8cd0716611619ebba2758a434cf2b2 /src/game/Unit.cpp | |
parent | 7a1e7c4f73db8374aadfdd9a397a52549e09e90a (diff) |
*Fix Torment the Weak
--HG--
branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r-- | src/game/Unit.cpp | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 3901c5b44fb..17ed3ae0694 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -8691,6 +8691,17 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3 DoneTotalMod *= 3.0f; } + // Torment the weak + AuraList const& mDumyAuras = GetAurasByType(SPELL_AURA_DUMMY); + for(AuraList::const_iterator i = mDumyAuras.begin(); i != mDumyAuras.end(); ++i) + { + if ((*i)->GetSpellProto()->SpellIconID == 3263 && (*i)->isAffectedOnSpell(spellProto)) + { + DoneTotalMod *=float((*i)->GetModifier()->m_amount + 100.f) / 100.f; + break; + } + } + // ..taken AuraList const& mModDamagePercentTaken = pVictim->GetAurasByType(SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN); for(AuraList::const_iterator i = mModDamagePercentTaken.begin(); i != mModDamagePercentTaken.end(); ++i) @@ -9307,6 +9318,15 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint if(Player* modOwner = GetSpellModOwner()) modOwner->ApplySpellMod(spellProto->Id, damagetype == DOT ? SPELLMOD_DOT : SPELLMOD_DAMAGE, heal); + // Nourish cast + if (spellProto->SpellFamilyName == SPELLFAMILY_DRUID && spellProto->SpellFamilyFlags[1] & 0x2000000) + { + // Rejuvenation, Regrowth, Lifebloom, or Wild Growth + if (pVictim->GetAura(SPELL_AURA_PERIODIC_HEAL, SPELLFAMILY_DRUID, 0x50, 0x4000010, 0)) + //increase healing by 20% + DoneTotalMod *= 1.2f; + } + // Taken mods // Healing Wave cast if (spellProto->SpellFamilyName == SPELLFAMILY_SHAMAN && spellProto->SpellFamilyFlags[0] & 0x40) @@ -9318,15 +9338,6 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint TakenTotalMod *= ((*itr)->GetModifier()->m_amount+100.0f) / 100.0f; } - // Nourish cast - if (spellProto->SpellFamilyName == SPELLFAMILY_DRUID && spellProto->SpellFamilyFlags[1] & 0x2000000) - { - // Rejuvenation, Regrowth, Lifebloom, or Wild Growth - if (pVictim->GetAura(SPELL_AURA_PERIODIC_HEAL, SPELLFAMILY_DRUID, 0x50, 0x4000010, 0)) - //increase healing by 20% - TakenTotalMod *= 1.2f; - } - // Healing taken percent float minval = pVictim->GetMaxNegativeAuraModifier(SPELL_AURA_MOD_HEALING_PCT); if(minval) |