diff options
| author | ariel- <ariel-@users.noreply.github.com> | 2016-11-20 02:39:14 -0300 |
|---|---|---|
| committer | ariel- <ariel-@users.noreply.github.com> | 2016-11-20 02:39:14 -0300 |
| commit | f188ff1ce47905d7a81dff987a66b3d72152ae7c (patch) | |
| tree | 3996c6c10829825ed536c34ae205ef09fd3f1e3e | |
| parent | 6dc37a9add631888fe5fbcd43d19c2b07bed8a57 (diff) | |
Core/Spell: add EquipedItemClass/EquippedItemSubClass check to passive spell casts
- Was adding auras on login that didn't satisfy requirements (like Two-Handed Weapon Specialization)
| -rw-r--r-- | src/server/game/Spells/Spell.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index c082c0a7584..0ad5f2186e6 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -5122,6 +5122,10 @@ SpellCastResult Spell::CheckCast(bool strict, uint32* param1 /*= nullptr*/, uint if (castResult != SPELL_CAST_OK) return castResult; } + // passive spells must check equipped items class (55108 for example) + else if (m_caster->GetTypeId() == TYPEID_PLAYER && !m_spellInfo->HasAttribute(SPELL_ATTR2_IGNORE_ITEM_CHECK) && (!(_triggeredCastFlags & TRIGGERED_IGNORE_EQUIPPED_ITEM_REQUIREMENT))) + if (!m_caster->ToPlayer()->HasItemFitToSpellRequirements(m_spellInfo)) + return SPELL_FAILED_EQUIPPED_ITEM_CLASS; // Triggered spells also have range check /// @todo determine if there is some flag to enable/disable the check |
