mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 15:50:20 +00:00
Fix vanilla spell cast and use-item packet formats for Turtle/Classic
SpellCastTargets target mask is uint16 in vanilla 1.12.x, not uint32 like WotLK. The 2 extra bytes corrupted every spell packet. Also add classic CMSG_USE_ITEM builder (bag+slot+spellIndex+targets only, no spellId/itemGuid/glyphIndex/castFlags fields that WotLK added).
This commit is contained in:
parent
eb931ce0fc
commit
0d4eff65d0
3 changed files with 27 additions and 5 deletions
|
|
@ -7626,7 +7626,9 @@ void GameHandler::useItemBySlot(int backpackIndex) {
|
|||
}
|
||||
if (itemGuid != 0 && state == WorldState::IN_WORLD && socket) {
|
||||
// WoW inventory: equipment 0-18, bags 19-22, backpack 23-38
|
||||
auto packet = UseItemPacket::build(0xFF, static_cast<uint8_t>(23 + backpackIndex), itemGuid);
|
||||
auto packet = packetParsers_
|
||||
? packetParsers_->buildUseItem(0xFF, static_cast<uint8_t>(23 + backpackIndex), itemGuid)
|
||||
: UseItemPacket::build(0xFF, static_cast<uint8_t>(23 + backpackIndex), itemGuid);
|
||||
socket->send(packet);
|
||||
} else if (itemGuid == 0) {
|
||||
LOG_WARNING("Use item failed: missing item GUID for slot ", backpackIndex);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue