mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[8941] Limit used energe as expected for spell 22568 and ranks.
Thanks also to Sarjuuk for code simplification. Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
1f7163f449
commit
65f1d6ba14
2 changed files with 6 additions and 4 deletions
|
|
@ -515,12 +515,14 @@ void Spell::EffectSchoolDMG(uint32 effect_idx)
|
||||||
// Ferocious Bite
|
// Ferocious Bite
|
||||||
if (m_caster->GetTypeId()==TYPEID_PLAYER && (m_spellInfo->SpellFamilyFlags & UI64LIT(0x000800000)) && m_spellInfo->SpellVisual[0]==6587)
|
if (m_caster->GetTypeId()==TYPEID_PLAYER && (m_spellInfo->SpellFamilyFlags & UI64LIT(0x000800000)) && m_spellInfo->SpellVisual[0]==6587)
|
||||||
{
|
{
|
||||||
// converts each extra point of energy into ($f1+$AP/410) additional damage
|
// converts up to 30 points of energy into ($f1+$AP/410) additional damage
|
||||||
float ap = m_caster->GetTotalAttackPowerValue(BASE_ATTACK);
|
float ap = m_caster->GetTotalAttackPowerValue(BASE_ATTACK);
|
||||||
float multiple = ap / 410 + m_spellInfo->DmgMultiplier[effect_idx];
|
float multiple = ap / 410 + m_spellInfo->DmgMultiplier[effect_idx];
|
||||||
damage += int32(m_caster->GetPower(POWER_ENERGY) * multiple);
|
|
||||||
damage += int32(((Player*)m_caster)->GetComboPoints() * ap * 7 / 100);
|
damage += int32(((Player*)m_caster)->GetComboPoints() * ap * 7 / 100);
|
||||||
m_caster->SetPower(POWER_ENERGY,0);
|
uint32 energy = m_caster->GetPower(POWER_ENERGY);
|
||||||
|
uint32 used_energy = energy > 30 ? 30 : energy;
|
||||||
|
damage += int32(used_energy * multiple);
|
||||||
|
m_caster->SetPower(POWER_ENERGY,energy-used_energy);
|
||||||
}
|
}
|
||||||
// Rake
|
// Rake
|
||||||
else if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0000000000001000) && m_spellInfo->Effect[2]==SPELL_EFFECT_ADD_COMBO_POINTS)
|
else if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0000000000001000) && m_spellInfo->Effect[2]==SPELL_EFFECT_ADD_COMBO_POINTS)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "8940"
|
#define REVISION_NR "8941"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue