*Some more research about spell target flags - thanks to Zor for info.

--HG--
branch : trunk
This commit is contained in:
QAston
2010-08-04 19:16:44 +02:00
parent 40e16bbbdb
commit 96eb7c513f
7 changed files with 120 additions and 130 deletions
@@ -694,11 +694,10 @@ void WorldSession::HandlePetCastSpellOpcode(WorldPacket& recvPacket)
uint64 guid;
uint32 spellid;
uint8 cast_count;
uint8 unk_flags; // flags (if 0x02 - some additional data are received)
recvPacket >> guid >> cast_count >> spellid >> unk_flags;
recvPacket >> guid >> cast_count >> spellid;
sLog.outDebug("WORLD: CMSG_PET_CAST_SPELL, cast_count: %u, spellid %u, unk_flags %u", cast_count, spellid, unk_flags);
sLog.outDebug("WORLD: CMSG_PET_CAST_SPELL, cast_count: %u, spellid %u", cast_count, spellid);
// This opcode is also sent from charmed and possessed units (players and creatures)
if (!_player->GetGuardianPet() && !_player->GetCharm())
@@ -300,7 +300,6 @@ void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket)
uint8 cast_count, unk_flags;
recvPacket >> cast_count;
recvPacket >> spellId;
recvPacket >> unk_flags; // flags (if 0x02 - some additional data are received)
// ignore for remote control state (for player case)
Unit* mover = _player->m_mover;
@@ -360,25 +359,6 @@ void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket)
return;
}
// some spell cast packet including more data (for projectiles?)
if (unk_flags & 0x02)
{
//recvPacket.read_skip<float>(); // unk1, coords?
//recvPacket.read_skip<float>(); // unk1, coords?
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)
if (targets.getUnitTarget())
{