aboutsummaryrefslogtreecommitdiff
path: root/src/game/Player.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Player.cpp')
-rw-r--r--src/game/Player.cpp20
1 files changed, 3 insertions, 17 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index b13999991f1..61e3895cbb0 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -3315,23 +3315,9 @@ void Player::RemoveTemporarySpell(uint32 spellId)
bool Player::IsNeedCastPassiveSpellAtLearn(SpellEntry const* spellInfo) const
{
- bool need_cast = false;
-
- switch(spellInfo->Id)
- {
- // some spells not have stance data expected cast at form change or present
- case 5419: need_cast = (m_form == FORM_TRAVEL); break;
- case 7376: need_cast = (m_form == FORM_DEFENSIVESTANCE); break;
- case 7381: need_cast = (m_form == FORM_BERSERKERSTANCE); break;
- case 21156: need_cast = (m_form == FORM_BATTLESTANCE); break;
- case 21178: need_cast = (m_form == FORM_BEAR || m_form == FORM_DIREBEAR); break;
- case 33948: need_cast = (m_form == FORM_FLIGHT); break;
- case 34764: need_cast = (m_form == FORM_FLIGHT); break;
- case 40121: need_cast = (m_form == FORM_FLIGHT_EPIC); break;
- case 40122: need_cast = (m_form == FORM_FLIGHT_EPIC); break;
- // another spells have proper stance data
- default: need_cast = !spellInfo->Stances || m_form != 0 && (spellInfo->Stances & (1<<(m_form-1))); break;
- }
+ // note: form passives activated with shapeshift spells be implemented by HandleShapeshiftBoosts instead of spell_learn_spell
+ // talent dependent passives activated at form apply have proper stance data
+ bool need_cast = !spellInfo->Stances || m_form != 0 && (spellInfo->Stances & (1<<(m_form-1)));
//Check CasterAuraStates
return need_cast && (!spellInfo->CasterAuraState || HasAuraState(AuraState(spellInfo->CasterAuraState)));