mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 18:36:31 +01:00
Update Spell code for 322a. Part 2
--HG-- branch : trunk
This commit is contained in:
@@ -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 );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user