mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 10:30:27 +00:00
fix(Core/Entities): extend combo point system to all Units (#9816)
- Closes #1140
This commit is contained in:
@@ -481,7 +481,7 @@ void Spell::EffectSchoolDMG(SpellEffIndex effIndex)
|
||||
float multiple = ap / 410 + m_spellInfo->Effects[effIndex].DamageMultiplier;
|
||||
int32 energy = -(m_caster->ModifyPower(POWER_ENERGY, -30));
|
||||
damage += int32(energy * multiple);
|
||||
damage += int32(CalculatePct(m_caster->ToPlayer()->GetComboPoints() * ap, 7));
|
||||
damage += int32(CalculatePct(m_caster->GetComboPoints() * ap, 7));
|
||||
}
|
||||
// Wrath
|
||||
else if (m_spellInfo->SpellFamilyFlags[0] & 0x00000001)
|
||||
@@ -3399,8 +3399,7 @@ void Spell::EffectWeaponDmg(SpellEffIndex effIndex)
|
||||
// Hemorrhage
|
||||
if (m_spellInfo->SpellFamilyFlags[0] & 0x2000000)
|
||||
{
|
||||
if (m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||
m_caster->ToPlayer()->AddComboPoints(unitTarget, 1);
|
||||
AddComboPointGain(unitTarget, 1);
|
||||
}
|
||||
// 50% more damage with daggers
|
||||
if (m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||
@@ -3460,8 +3459,7 @@ void Spell::EffectWeaponDmg(SpellEffIndex effIndex)
|
||||
// Mangle (Cat): CP
|
||||
if (m_spellInfo->SpellFamilyFlags[1] & 0x400)
|
||||
{
|
||||
if (m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||
m_caster->ToPlayer()->AddComboPoints(unitTarget, 1);
|
||||
AddComboPointGain(unitTarget, 1);
|
||||
}
|
||||
// Shred, Maul - Rend and Tear
|
||||
else if (m_spellInfo->SpellFamilyFlags[0] & 0x00008800 && unitTarget->HasAuraState(AURA_STATE_BLEEDING))
|
||||
@@ -4325,19 +4323,16 @@ void Spell::EffectSanctuary(SpellEffIndex /*effIndex*/)
|
||||
void Spell::EffectAddComboPoints(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET)
|
||||
return;
|
||||
|
||||
if (!m_caster->m_movedByPlayer || !unitTarget || damage <= 0)
|
||||
return;
|
||||
|
||||
if (m_spellInfo->Id == 14157 || // Ruthlessness and Netherblade set
|
||||
m_spellInfo->Id == 70802) // xinef: mayhem, rogue t10p4
|
||||
{
|
||||
m_caster->m_movedByPlayer->ToPlayer()->SetComboPointGain(m_caster->m_movedByPlayer->ToPlayer()->GetComboPointGain() + damage);
|
||||
return;
|
||||
}
|
||||
|
||||
m_caster->m_movedByPlayer->ToPlayer()->AddComboPoints(unitTarget, damage);
|
||||
if (!unitTarget || damage <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
AddComboPointGain(unitTarget, damage);
|
||||
}
|
||||
|
||||
void Spell::EffectDuel(SpellEffIndex effIndex)
|
||||
|
||||
Reference in New Issue
Block a user