aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorQAston <none@none>2010-08-04 22:52:35 +0200
committerQAston <none@none>2010-08-04 22:52:35 +0200
commite659c3faf329ca02773f8843f99b373493f92aef (patch)
tree59c770ecb942006ac891825012fab5acb132de7d /src
parentf3eab911022115852b2a94ae359b6557447c53fc (diff)
*Update CMSG_USE_ITEM opcode to fit new clientCastFlag handling.
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Server/Protocol/Handlers/SpellHandler.cpp9
-rw-r--r--src/server/game/Spells/Spell.cpp2
2 files changed, 5 insertions, 6 deletions
diff --git a/src/server/game/Server/Protocol/Handlers/SpellHandler.cpp b/src/server/game/Server/Protocol/Handlers/SpellHandler.cpp
index ca7d0e9c4fd..4179474db47 100644
--- a/src/server/game/Server/Protocol/Handlers/SpellHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/SpellHandler.cpp
@@ -43,13 +43,12 @@ void WorldSession::HandleUseItemOpcode(WorldPacket& recvPacket)
return;
uint8 bagIndex, slot;
- uint8 unk_flags; // flags (if 0x02 - some additional data are received)
uint8 cast_count; // next cast if exists (single or not)
uint64 item_guid;
uint32 glyphIndex; // something to do with glyphs?
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)
{
@@ -70,7 +69,7 @@ void WorldSession::HandleUseItemOpcode(WorldPacket& recvPacket)
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();
if (!proto)
@@ -297,7 +296,7 @@ void WorldSession::HandleGameobjectReportUse(WorldPacket& recvPacket)
void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket)
{
uint32 spellId;
- uint8 cast_count, unk_flags;
+ uint8 cast_count;
recvPacket >> cast_count;
recvPacket >> spellId;
@@ -309,7 +308,7 @@ void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket)
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);
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 00104e42fed..521781ba489 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -267,7 +267,7 @@ bool SpellCastTargets::read (WorldPacket * data, Unit *caster)
if (hasMovementInfo)
{
data->read_skip<uint32>(); // MSG_MOVE_STOP - hardcoded in client
- uint64 guid; // guid - unused
+ uint64 guid = 0; // guid - unused
if (!data->readPackGUID(guid))
return false;