*Merge.
--HG-- branch : trunk
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user