diff options
author | QAston <none@none> | 2009-06-07 22:13:17 +0200 |
---|---|---|
committer | QAston <none@none> | 2009-06-07 22:13:17 +0200 |
commit | d0c801d6cf8190e57a739f124af4a756a7c3d8fc (patch) | |
tree | 6bb911cd8aa9d9ca01beab3560516ed2063d39af /src/game/SpellMgr.cpp | |
parent | da74a474107f8f80a3bf8f8a80b452e661ead877 (diff) |
*Add support for stance-dependant action bar spells
*Temporary remove assert check in Player::RestoreSpellMods
*Apply bleeding damage bonuses for Shred.
--HG--
branch : trunk
Diffstat (limited to 'src/game/SpellMgr.cpp')
-rw-r--r-- | src/game/SpellMgr.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index ae3f72cdcad..9a4c03ddbc0 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -884,9 +884,10 @@ SpellCastResult GetErrorAtShapeshiftedCast (SpellEntry const *spellInfo, uint32 return SPELL_CAST_OK; bool actAsShifted = false; + SpellShapeshiftEntry const *shapeInfo = NULL; if (form > 0) { - SpellShapeshiftEntry const *shapeInfo = sSpellShapeshiftStore.LookupEntry(form); + shapeInfo = sSpellShapeshiftStore.LookupEntry(form); if (!shapeInfo) { sLog.outError("GetErrorAtShapeshiftedCast: unknown shapeshift %u", form); @@ -909,6 +910,15 @@ SpellCastResult GetErrorAtShapeshiftedCast (SpellEntry const *spellInfo, uint32 return SPELL_FAILED_ONLY_SHAPESHIFT; } + // Check if stance disables cast of not-stance spells + // Example: cannot cast any other spells in zombie or ghoul form + // TODO: Find a way to disable use of these spells clientside + if (shapeInfo && shapeInfo->flags1 & 0x400) + { + if(!(stanceMask & spellInfo->Stances)) + return SPELL_FAILED_ONLY_SHAPESHIFT; + } + return SPELL_CAST_OK; } |