aboutsummaryrefslogtreecommitdiff
path: root/src/game/SpellMgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/SpellMgr.cpp')
-rw-r--r--src/game/SpellMgr.cpp12
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;
}