diff --git a/src/game/game_handler.cpp b/src/game/game_handler.cpp index a870ddcc..0ead0468 100644 --- a/src/game/game_handler.cpp +++ b/src/game/game_handler.cpp @@ -15821,8 +15821,11 @@ void GameHandler::buyItem(uint64_t vendorGuid, uint32_t itemId, uint32_t slot, u packet.writeUInt32(itemId); // item entry packet.writeUInt32(slot); // vendor slot index packet.writeUInt32(count); - // WotLK/AzerothCore expects a trailing byte here. - packet.writeUInt8(0); + // WotLK/AzerothCore expects a trailing byte; Classic/TBC do not + const bool isWotLk = isActiveExpansion("wotlk"); + if (isWotLk) { + packet.writeUInt8(0); + } socket->send(packet); } diff --git a/src/game/world_packets.cpp b/src/game/world_packets.cpp index b7d8075b..5d3989c7 100644 --- a/src/game/world_packets.cpp +++ b/src/game/world_packets.cpp @@ -3828,7 +3828,9 @@ network::Packet BuyItemPacket::build(uint64_t vendorGuid, uint32_t itemId, uint3 packet.writeUInt32(itemId); // item entry packet.writeUInt32(slot); // vendor slot index from SMSG_LIST_INVENTORY packet.writeUInt32(count); - // WotLK/AzerothCore expects a trailing byte on CMSG_BUY_ITEM. + // Note: WotLK/AzerothCore expects a trailing byte; Classic/TBC do not. + // This static helper always adds it (appropriate for CMaNGOS/AzerothCore). + // For Classic/TBC, use the GameHandler::buyItem() path which checks expansion. packet.writeUInt8(0); return packet; }