*Add function EnergizeBySpell. Author: nos4r2zod
--HG-- branch : trunk
This commit is contained in:
1 parent
6f7998cbaf
commit
461a799a52
4 files changed
+13
-10
No files matched your search
@@ -2443,10 +2443,8 @@ void Spell::EffectPowerDrain(uint32 i)
|
||||
modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_MULTIPLE_VALUE, manaMultiplier);
|
||||
|
||||
int32 gain = int32(new_damage * manaMultiplier);
|
||||
|
||||
//send log
|
||||
m_caster->SendEnergizeSpellLog(m_caster, m_spellInfo->Id, gain, POWER_MANA);
|
||||
m_caster->ModifyPower(POWER_MANA,gain);
|
||||
|
||||
m_caster->EnergizeBySpell(m_caster, m_spellInfo->Id, gain, POWER_MANA);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2873,8 +2871,7 @@ void Spell::EffectEnergize(uint32 i)
|
||||
if(unitTarget->GetMaxPower(power) == 0)
|
||||
return;
|
||||
|
||||
m_caster->SendEnergizeSpellLog(unitTarget, m_spellInfo->Id, damage, power);
|
||||
unitTarget->ModifyPower(power,damage);
|
||||
m_caster->EnergizeBySpell(unitTarget, m_spellInfo->Id, damage, power);
|
||||
|
||||
// Mad Alchemist's Potion
|
||||
if (m_spellInfo->Id == 45051)
|
||||
@@ -2936,8 +2933,7 @@ void Spell::EffectEnergizePct(uint32 i)
|
||||
return;
|
||||
|
||||
uint32 gain = damage * maxPower / 100;
|
||||
m_caster->SendEnergizeSpellLog(unitTarget, m_spellInfo->Id, gain, power);
|
||||
unitTarget->ModifyPower(power, gain);
|
||||
m_caster->EnergizeBySpell(unitTarget, m_spellInfo->Id, gain, power);
|
||||
}
|
||||
|
||||
void Spell::SendLoot(uint64 guid, LootType loottype)
|
||||
|
||||
Reference in new issue
Block a user