diff options
author | Shocker <shocker@freakz.ro> | 2011-11-27 00:13:50 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2024-09-09 16:35:05 +0200 |
commit | 29e7cbbd05a41a183b9487dc410be87dcfd2c32f (patch) | |
tree | c564a3fc5857dcde2000a2bb644fbcee93f1f556 /src/server/game | |
parent | 7d38a614bdd7b822b7eb38e3027258d72c9baa70 (diff) |
Core/Spells: Remove hardcoded value for dual wield talent removal and handle them for all classes
(cherry picked from commit 5b6b8dd5772f842f7524ac2a2468313c642313f0)
Diffstat (limited to 'src/server/game')
-rw-r--r-- | src/server/game/Entities/Player/Player.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 88bcafa8298..507ad400139 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -3686,14 +3686,20 @@ void Player::RemoveSpell(uint32 spell_id, bool disabled, bool learn_low_rank) } } - if (spell_id == 46917 && m_canTitanGrip) + if (m_canTitanGrip) { - RemoveAurasDueToSpell(m_titanGripPenaltySpellId); - SetCanTitanGrip(false); + if (spellInfo && spellInfo->IsPassive() && spellInfo->HasEffect(SPELL_EFFECT_TITAN_GRIP)) + { + RemoveAurasDueToSpell(m_titanGripPenaltySpellId); + SetCanTitanGrip(false); + } } - if (spell_id == 674 && m_canDualWield) - SetCanDualWield(false); + if (m_canDualWield) + { + if (spellInfo && spellInfo->IsPassive() && spellInfo->HasEffect(SPELL_EFFECT_DUAL_WIELD)) + SetCanDualWield(false); + } if (sWorld->getBoolConfig(CONFIG_OFFHAND_CHECK_AT_SPELL_UNLEARN)) AutoUnequipOffhandIfNeed(); |