diff options
Diffstat (limited to 'src/game/SpellHandler.cpp')
-rw-r--r-- | src/game/SpellHandler.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/game/SpellHandler.cpp b/src/game/SpellHandler.cpp index 1fd07ff19e8..a9a28511d0c 100644 --- a/src/game/SpellHandler.cpp +++ b/src/game/SpellHandler.cpp @@ -325,7 +325,7 @@ void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket) else { // not have spell in spellbook or spell passive and not casted by client - if (!((Creature*)mover)->HasSpell(spellId) || IsPassiveSpell(spellId) ) + if ((mover->GetTypeId() == TYPEID_UNIT && !((Creature*)mover)->HasSpell(spellId)) || IsPassiveSpell(spellId)) { //cheater? kick? ban? recvPacket.rpos(recvPacket.wpos()); // prevent spam at ignore packet @@ -356,10 +356,18 @@ void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket) { //recvPacket.read_skip<float>(); // unk1, coords? //recvPacket.read_skip<float>(); // unk1, coords? - recvPacket.read_skip<uint8>(); // >> 1 - recvPacket.read_skip<uint32>(); // >> MSG_MOVE_STOP - MovementInfo movementInfo; - ReadMovementInfo(recvPacket, &movementInfo); + uint8 unk1; + recvPacket >> unk1; // >> 1 or 0 + if(unk1) + { + recvPacket.read_skip<uint32>(); // >> MSG_MOVE_STOP + uint64 guid; // guid - unused + if(!recvPacket.readPackGUID(guid)) + return; + + MovementInfo movementInfo; + ReadMovementInfo(recvPacket, &movementInfo); + } } // auto-selection buff level base at target level (in spellInfo) @@ -632,4 +640,3 @@ void WorldSession::HandleMirrrorImageDataRequest( WorldPacket & recv_data ) } SendPacket( &data ); } - |