*Update CMSG_USE_ITEM opcode to fit new clientCastFlag handling.

--HG--
branch : trunk
This commit is contained in:
QAston
2010-08-04 22:52:35 +02:00
parent f3eab91102
commit e659c3faf3
2 changed files with 5 additions and 6 deletions
@@ -43,13 +43,12 @@ void WorldSession::HandleUseItemOpcode(WorldPacket& recvPacket)
return; return;
uint8 bagIndex, slot; uint8 bagIndex, slot;
uint8 unk_flags; // flags (if 0x02 - some additional data are received)
uint8 cast_count; // next cast if exists (single or not) uint8 cast_count; // next cast if exists (single or not)
uint64 item_guid; uint64 item_guid;
uint32 glyphIndex; // something to do with glyphs? uint32 glyphIndex; // something to do with glyphs?
uint32 spellid; // casted spell id uint32 spellid; // casted spell id
recvPacket >> bagIndex >> slot >> cast_count >> spellid >> item_guid >> glyphIndex >> unk_flags; recvPacket >> bagIndex >> slot >> cast_count >> spellid >> item_guid >> glyphIndex;
if (glyphIndex >= MAX_GLYPH_SLOT_INDEX) if (glyphIndex >= MAX_GLYPH_SLOT_INDEX)
{ {
@@ -70,7 +69,7 @@ void WorldSession::HandleUseItemOpcode(WorldPacket& recvPacket)
return; return;
} }
sLog.outDetail("WORLD: CMSG_USE_ITEM packet, bagIndex: %u, slot: %u, cast_count: %u, spellid: %u, Item: %u, glyphIndex: %u, unk_flags: %u, data length = %i", bagIndex, slot, cast_count, spellid, pItem->GetEntry(), glyphIndex, unk_flags, (uint32)recvPacket.size()); sLog.outDetail("WORLD: CMSG_USE_ITEM packet, bagIndex: %u, slot: %u, cast_count: %u, spellid: %u, Item: %u, glyphIndex: %u, data length = %i", bagIndex, slot, cast_count, spellid, pItem->GetEntry(), glyphIndex, (uint32)recvPacket.size());
ItemPrototype const *proto = pItem->GetProto(); ItemPrototype const *proto = pItem->GetProto();
if (!proto) if (!proto)
@@ -297,7 +296,7 @@ void WorldSession::HandleGameobjectReportUse(WorldPacket& recvPacket)
void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket) void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket)
{ {
uint32 spellId; uint32 spellId;
uint8 cast_count, unk_flags; uint8 cast_count;
recvPacket >> cast_count; recvPacket >> cast_count;
recvPacket >> spellId; recvPacket >> spellId;
@@ -309,7 +308,7 @@ void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket)
return; return;
} }
sLog.outDebug("WORLD: got cast spell packet, spellId - %u, cast_count: %u, unk_flags %u, data length = %i", spellId, cast_count, unk_flags, (uint32)recvPacket.size()); sLog.outDebug("WORLD: got cast spell packet, spellId - %u, cast_count: %u, data length = %i", spellId, cast_count, (uint32)recvPacket.size());
SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellId); SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellId);
+1 -1
View File
@@ -267,7 +267,7 @@ bool SpellCastTargets::read (WorldPacket * data, Unit *caster)
if (hasMovementInfo) if (hasMovementInfo)
{ {
data->read_skip<uint32>(); // MSG_MOVE_STOP - hardcoded in client data->read_skip<uint32>(); // MSG_MOVE_STOP - hardcoded in client
uint64 guid; // guid - unused uint64 guid = 0; // guid - unused
if (!data->readPackGUID(guid)) if (!data->readPackGUID(guid))
return false; return false;