diff options
Diffstat (limited to 'src/server/game/Handlers/SpellHandler.cpp')
-rwxr-xr-x | src/server/game/Handlers/SpellHandler.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/server/game/Handlers/SpellHandler.cpp b/src/server/game/Handlers/SpellHandler.cpp index 31cce5b7239..b772db626f0 100755 --- a/src/server/game/Handlers/SpellHandler.cpp +++ b/src/server/game/Handlers/SpellHandler.cpp @@ -350,8 +350,10 @@ void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket) return; } - SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId); + if (Player* plrMover = mover->ToPlayer()) + spellId = plrMover->GetSpellForCast(spellId); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId); if (!spellInfo) { sLog->outError(LOG_FILTER_NETWORKIO, "WORLD: unknown spell id %u", spellId); @@ -362,7 +364,7 @@ void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket) if (mover->GetTypeId() == TYPEID_PLAYER) { // not have spell in spellbook or spell passive and not casted by client - if (!mover->ToPlayer()->HasActiveSpell (spellId) || spellInfo->IsPassive()) + if (!mover->ToPlayer()->HasActiveSpell(spellId) || spellInfo->IsPassive()) { //cheater? kick? ban? recvPacket.rfinish(); // prevent spam at ignore packet |