aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/SpellEffects.cpp
diff options
context:
space:
mode:
authorTreeston <treeston.mmoc@gmail.com>2017-06-25 03:41:16 +0200
committerariel- <ariel-@users.noreply.github.com>2017-06-24 22:41:16 -0300
commit489478b74d96c2ea940a2316fd11f8e81991cf07 (patch)
tree5faa936414542c9c7442d6386fc22b2d1d508ffc /src/server/game/Spells/SpellEffects.cpp
parent641c2036abed70adff5c384e1679c5c3c986bd72 (diff)
Core/Entities: Extend combo point system to all Units and fix numerous quirks with rogue CP and vehicles (Malygos P3) (#19914)
- Implement Wolverine Bite (fixes #752) - General combo point system cleanup
Diffstat (limited to 'src/server/game/Spells/SpellEffects.cpp')
-rw-r--r--src/server/game/Spells/SpellEffects.cpp17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index 1b2847599f8..2201e39059b 100644
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -3153,10 +3153,8 @@ void Spell::EffectWeaponDmg(SpellEffIndex effIndex)
{
// Hemorrhage
if (m_spellInfo->SpellFamilyFlags[0] & 0x2000000)
- {
- if (m_caster->GetTypeId() == TYPEID_PLAYER)
- m_caster->ToPlayer()->AddComboPoints(unitTarget, 1, this);
- }
+ AddComboPointGain(unitTarget, 1);
+
// 50% more damage with daggers
if (m_caster->GetTypeId() == TYPEID_PLAYER)
if (Item* item = m_caster->ToPlayer()->GetWeaponForAttack(m_attackType, true))
@@ -3211,10 +3209,8 @@ 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, this);
- }
+ AddComboPointGain(unitTarget, 1);
+
// Shred, Maul - Rend and Tear
else if (m_spellInfo->SpellFamilyFlags[0] & 0x00008800 && unitTarget->HasAuraState(AURA_STATE_BLEEDING))
{
@@ -3984,13 +3980,10 @@ void Spell::EffectAddComboPoints(SpellEffIndex /*effIndex*/)
if (!unitTarget)
return;
- if (!m_caster->m_playerMovingMe)
- return;
-
if (damage <= 0)
return;
- m_caster->m_playerMovingMe->AddComboPoints(unitTarget, damage, this);
+ AddComboPointGain(unitTarget, damage);
}
void Spell::EffectDuel(SpellEffIndex effIndex)