Skip to content

Commit

Permalink
Spell: Add combo point check from tbc
Browse files Browse the repository at this point in the history
  • Loading branch information
killerwife committed Mar 8, 2023
1 parent 8c045f5 commit 5a59df6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/game/Spells/Spell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4559,6 +4559,10 @@ SpellCastResult Spell::CheckCast(bool strict)
if (m_spellInfo->HasAttribute(SPELL_ATTR_ONLY_STEALTHED) && !(m_caster->HasStealthAura()))
return SPELL_FAILED_ONLY_STEALTHED;
}

if (!m_IsTriggeredSpell && NeedsComboPoints(m_spellInfo) && (!m_targets.getUnitTarget() || m_targets.getUnitTarget()->GetObjectGuid() != m_caster->GetComboTargetGuid()))
// warrior not have real combo-points at client side but use this way for mark allow Overpower use
return m_caster->getClass() == CLASS_WARRIOR ? SPELL_FAILED_CASTER_AURASTATE : SPELL_FAILED_NO_COMBO_POINTS;
}

if (m_trueCaster->IsPlayer())
Expand Down

0 comments on commit 5a59df6

Please sign in to comment.