[10345] Fix passive spells that are active without shapeshift and certain shapeshift forms only.

Currently, 63411 is the only affected spell, but implementation is hopefully generic enough to cover future cases.
This commit is contained in:
Lynx3d 2010-08-11 19:34:02 +02:00
parent 29383e6b7b
commit 29281d476a
3 changed files with 44 additions and 14 deletions

View file

@ -3352,7 +3352,8 @@ bool Player::IsNeedCastPassiveSpellAtLearn(SpellEntry const* spellInfo) const
{
// 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)))));
bool need_cast = (!spellInfo->Stances || (m_form != 0 && (spellInfo->Stances & (1<<(m_form-1)))) ||
(m_form == 0 && (spellInfo->AttributesEx2 & SPELL_ATTR_EX2_NOT_NEED_SHAPESHIFT)));
//Check CasterAuraStates
return need_cast && (!spellInfo->CasterAuraState || HasAuraState(AuraState(spellInfo->CasterAuraState)));