From 34ae09f3a81e5504723a72704fac081b390318c4 Mon Sep 17 00:00:00 2001 From: Shauren Date: Thu, 9 Aug 2012 18:07:12 +0200 Subject: Core/Spells: Implemented SPELL_AURA_OVERRIDE_ACTIONBAR_SPELLS --- src/server/game/Handlers/SpellHandler.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/server/game/Handlers/SpellHandler.cpp') 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 -- cgit v1.2.3