diff options
| author | megamage <none@none> | 2009-03-02 16:34:17 -0600 |
|---|---|---|
| committer | megamage <none@none> | 2009-03-02 16:34:17 -0600 |
| commit | 5997e2d5db5618e5d84733bd224426499f621f33 (patch) | |
| tree | 345db0d11ce4feb8c9ca68e52458cbc954b05bd6 /src/game/SpellAuras.cpp | |
| parent | 352df954f6e1a8542118e8108928ea5fe268f431 (diff) | |
| parent | cdd178b9c29853d5e498b474006a3635009a50a4 (diff) | |
*Merge.
--HG--
branch : trunk
Diffstat (limited to 'src/game/SpellAuras.cpp')
| -rw-r--r-- | src/game/SpellAuras.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 219fa7dcb47..3dcf984086e 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -5698,14 +5698,14 @@ void Aura::PeriodicTick() int32 drain_amount = m_target->GetPower(power) > pdamage ? pdamage : m_target->GetPower(power); //Viper sting and Drain Life take mana % amount from target, but not bigger than amount*2 of caster mana - if ((m_spellProto->SpellFamilyName==SPELLFAMILY_WARLOCK && m_spellProto->SpellFamilyFlags[0]&0x10)
- || (m_spellProto->SpellFamilyName==SPELLFAMILY_HUNTER && m_spellProto->SpellFamilyFlags[1]&0x80))
- {
- uint32 drain = m_target->GetMaxPower(power) * drain_amount /100;
- if(drain > pCaster->GetMaxPower(power) * drain_amount / 50)
- drain_amount = pCaster->GetMaxPower(power) * drain_amount / 50;
- else
- drain_amount = drain;
+ if ((m_spellProto->SpellFamilyName==SPELLFAMILY_WARLOCK && m_spellProto->SpellFamilyFlags[0]&0x10) + || (m_spellProto->SpellFamilyName==SPELLFAMILY_HUNTER && m_spellProto->SpellFamilyFlags[1]&0x80)) + { + uint32 drain = m_target->GetMaxPower(power) * drain_amount /100; + if(drain > pCaster->GetMaxPower(power) * drain_amount / 50) + drain_amount = pCaster->GetMaxPower(power) * drain_amount / 50; + else + drain_amount = drain; } // resilience reduce mana draining effect at spell crit damage reduction (added in 2.4) |
