mirror of
https://github.com/mangosfour/server.git
synced 2025-12-17 07:37:03 +00:00
CMSG_BUY_BANK_SLOT 5.4.7 (18019)
This commit is contained in:
parent
65d7ad370d
commit
ddd786d9f7
2 changed files with 83 additions and 11 deletions
|
|
@ -487,7 +487,7 @@ enum Opcodes
|
||||||
SMSG_LIST_INVENTORY = 0x7CB0, // 4.3.4 15595
|
SMSG_LIST_INVENTORY = 0x7CB0, // 4.3.4 15595
|
||||||
CMSG_SELL_ITEM = 0x0B7D, // 5.4.1 17538
|
CMSG_SELL_ITEM = 0x0B7D, // 5.4.1 17538
|
||||||
SMSG_SELL_ITEM = 0x6105, // 4.3.4 15595
|
SMSG_SELL_ITEM = 0x6105, // 4.3.4 15595
|
||||||
CMSG_BUY_ITEM = 0x0B66, // 5.4.1 17538
|
CMSG_BUY_ITEM = 0x1077, // 5.4.7 18019
|
||||||
SMSG_BUY_ITEM = 0x0F26, // 4.3.4 15595
|
SMSG_BUY_ITEM = 0x0F26, // 4.3.4 15595
|
||||||
SMSG_BUY_FAILED = 0x6435, // 4.3.4 15595
|
SMSG_BUY_FAILED = 0x6435, // 4.3.4 15595
|
||||||
CMSG_TAXICLEARALLNODES = 0x11A7,
|
CMSG_TAXICLEARALLNODES = 0x11A7,
|
||||||
|
|
@ -509,7 +509,7 @@ enum Opcodes
|
||||||
SMSG_PLAYERBINDERROR = 0x6A24, // 4.3.4 15595
|
SMSG_PLAYERBINDERROR = 0x6A24, // 4.3.4 15595
|
||||||
CMSG_BANKER_ACTIVATE = 0x0005, // 4.3.4 15595
|
CMSG_BANKER_ACTIVATE = 0x0005, // 4.3.4 15595
|
||||||
SMSG_SHOW_BANK = 0x2627, // 4.3.4 15595
|
SMSG_SHOW_BANK = 0x2627, // 4.3.4 15595
|
||||||
CMSG_BUY_BANK_SLOT = 0x0425, // 4.3.4 15595
|
CMSG_BUY_BANK_SLOT = 0x00FE, // 5.4.7 18019
|
||||||
CMSG_PETITION_SHOWLIST = 0x4617, // 4.3.4 15595
|
CMSG_PETITION_SHOWLIST = 0x4617, // 4.3.4 15595
|
||||||
SMSG_PETITION_SHOWLIST = 0x6405, // 4.3.4 15595
|
SMSG_PETITION_SHOWLIST = 0x6405, // 4.3.4 15595
|
||||||
CMSG_PETITION_BUY = 0x4E05, // 4.3.4 15595
|
CMSG_PETITION_BUY = 0x4E05, // 4.3.4 15595
|
||||||
|
|
@ -719,7 +719,7 @@ enum Opcodes
|
||||||
CMSG_GROUP_RAID_CONVERT = 0x6E27, // 4.3.4 15595
|
CMSG_GROUP_RAID_CONVERT = 0x6E27, // 4.3.4 15595
|
||||||
CMSG_GROUP_REQUEST_JOIN_UPDATES = 0x2583, // 4.3.4 15595
|
CMSG_GROUP_REQUEST_JOIN_UPDATES = 0x2583, // 4.3.4 15595
|
||||||
CMSG_GROUP_ASSISTANT_LEADER = 0x6025, // 4.3.4 15595
|
CMSG_GROUP_ASSISTANT_LEADER = 0x6025, // 4.3.4 15595
|
||||||
CMSG_BUYBACK_ITEM = 0x6C17, // 4.3.4 15595
|
CMSG_BUYBACK_ITEM = 0x07D7, // 5.4.7 18019
|
||||||
SMSG_SERVER_MESSAGE = 0x6C04, // 4.3.4 15595
|
SMSG_SERVER_MESSAGE = 0x6C04, // 4.3.4 15595
|
||||||
CMSG_SET_SAVED_INSTANCE_EXTEND = 0x6706, // 4.3.4 15595
|
CMSG_SET_SAVED_INSTANCE_EXTEND = 0x6706, // 4.3.4 15595
|
||||||
SMSG_LFG_OFFER_CONTINUE = 0x12C4, // 5.3.0 17128
|
SMSG_LFG_OFFER_CONTINUE = 0x12C4, // 5.3.0 17128
|
||||||
|
|
|
||||||
|
|
@ -453,13 +453,31 @@ void WorldSession::HandleSellItemOpcode(WorldPacket& recv_data)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::HandleBuybackItem(WorldPacket& recv_data)
|
void WorldSession::HandleBuybackItem(WorldPacket& recvData)
|
||||||
{
|
{
|
||||||
DEBUG_LOG("WORLD: Received opcode CMSG_BUYBACK_ITEM");
|
DEBUG_LOG("WORLD: Received opcode CMSG_BUYBACK_ITEM");
|
||||||
ObjectGuid vendorGuid;
|
ObjectGuid vendorGuid;
|
||||||
uint32 slot;
|
uint32 slot;
|
||||||
|
|
||||||
recv_data >> vendorGuid >> slot;
|
recvData >> slot;
|
||||||
|
|
||||||
|
vendorGuid[3] = recvData.ReadBit();
|
||||||
|
vendorGuid[5] = recvData.ReadBit();
|
||||||
|
vendorGuid[0] = recvData.ReadBit();
|
||||||
|
vendorGuid[7] = recvData.ReadBit();
|
||||||
|
vendorGuid[2] = recvData.ReadBit();
|
||||||
|
vendorGuid[6] = recvData.ReadBit();
|
||||||
|
vendorGuid[1] = recvData.ReadBit();
|
||||||
|
vendorGuid[4] = recvData.ReadBit();
|
||||||
|
|
||||||
|
recvData.ReadByteSeq(vendorGuid[1]);
|
||||||
|
recvData.ReadByteSeq(vendorGuid[7]);
|
||||||
|
recvData.ReadByteSeq(vendorGuid[6]);
|
||||||
|
recvData.ReadByteSeq(vendorGuid[0]);
|
||||||
|
recvData.ReadByteSeq(vendorGuid[5]);
|
||||||
|
recvData.ReadByteSeq(vendorGuid[3]);
|
||||||
|
recvData.ReadByteSeq(vendorGuid[4]);
|
||||||
|
recvData.ReadByteSeq(vendorGuid[2]);
|
||||||
|
|
||||||
Creature* pCreature = GetPlayer()->GetNPCIfCanInteractWith(vendorGuid, UNIT_NPC_FLAG_VENDOR);
|
Creature* pCreature = GetPlayer()->GetNPCIfCanInteractWith(vendorGuid, UNIT_NPC_FLAG_VENDOR);
|
||||||
if (!pCreature)
|
if (!pCreature)
|
||||||
|
|
@ -497,13 +515,50 @@ void WorldSession::HandleBuybackItem(WorldPacket& recv_data)
|
||||||
_player->SendBuyError(BUY_ERR_CANT_FIND_ITEM, pCreature, 0, 0);
|
_player->SendBuyError(BUY_ERR_CANT_FIND_ITEM, pCreature, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::HandleBuyItemOpcode(WorldPacket& recv_data)
|
void WorldSession::HandleBuyItemOpcode(WorldPacket& recvData)
|
||||||
{
|
{
|
||||||
ObjectGuid vendorGuid, bagGuid;
|
ObjectGuid vendorGuid, bagGuid;
|
||||||
uint32 item, slot, count;
|
uint32 item, slot, count, bagSlot;
|
||||||
uint8 type, bagSlot;
|
uint8 type;
|
||||||
|
|
||||||
|
recvData >> bagSlot >> item >> count >> slot;
|
||||||
|
|
||||||
|
bagGuid[2] = recvData.ReadBit();
|
||||||
|
vendorGuid[0] = recvData.ReadBit();
|
||||||
|
bagGuid[5] = recvData.ReadBit();
|
||||||
|
vendorGuid[7] = recvData.ReadBit();
|
||||||
|
bagGuid[0] = recvData.ReadBit();
|
||||||
|
type = recvData.ReadBits(2);
|
||||||
|
bagGuid[6] = recvData.ReadBit();
|
||||||
|
bagGuid[4] = recvData.ReadBit();
|
||||||
|
vendorGuid[2] = recvData.ReadBit();
|
||||||
|
vendorGuid[1] = recvData.ReadBit();
|
||||||
|
bagGuid[3] = recvData.ReadBit();
|
||||||
|
vendorGuid[5] = recvData.ReadBit();
|
||||||
|
bagGuid[7] = recvData.ReadBit();
|
||||||
|
vendorGuid[4] = recvData.ReadBit();
|
||||||
|
bagGuid[1] = recvData.ReadBit();
|
||||||
|
vendorGuid[3] = recvData.ReadBit();
|
||||||
|
vendorGuid[6] = recvData.ReadBit();
|
||||||
|
recvData.FlushBits();
|
||||||
|
|
||||||
|
recvData.ReadByteSeq(bagGuid[1]);
|
||||||
|
recvData.ReadByteSeq(bagGuid[3]);
|
||||||
|
recvData.ReadByteSeq(vendorGuid[2]);
|
||||||
|
recvData.ReadByteSeq(vendorGuid[0]);
|
||||||
|
recvData.ReadByteSeq(bagGuid[2]);
|
||||||
|
recvData.ReadByteSeq(vendorGuid[4]);
|
||||||
|
recvData.ReadByteSeq(vendorGuid[3]);
|
||||||
|
recvData.ReadByteSeq(vendorGuid[1]);
|
||||||
|
recvData.ReadByteSeq(bagGuid[6]);
|
||||||
|
recvData.ReadByteSeq(vendorGuid[6]);
|
||||||
|
recvData.ReadByteSeq(vendorGuid[5]);
|
||||||
|
recvData.ReadByteSeq(bagGuid[5]);
|
||||||
|
recvData.ReadByteSeq(bagGuid[7]);
|
||||||
|
recvData.ReadByteSeq(bagGuid[4]);
|
||||||
|
recvData.ReadByteSeq(bagGuid[0]);
|
||||||
|
recvData.ReadByteSeq(vendorGuid[7]);
|
||||||
|
|
||||||
recv_data >> vendorGuid >> type >> item >> slot >> count >> bagGuid >> bagSlot;
|
|
||||||
DEBUG_LOG("WORLD: Received opcode CMSG_BUY_ITEM, vendorguid: %s, type: %u, item: %u, slot: %u, count: %u, bagGuid: %s, bagSlog: %u",
|
DEBUG_LOG("WORLD: Received opcode CMSG_BUY_ITEM, vendorguid: %s, type: %u, item: %u, slot: %u, count: %u, bagGuid: %s, bagSlog: %u",
|
||||||
vendorGuid.GetString().c_str(), type, item, slot, count, bagGuid.GetString().c_str(), bagSlot);
|
vendorGuid.GetString().c_str(), type, item, slot, count, bagGuid.GetString().c_str(), bagSlot);
|
||||||
|
|
||||||
|
|
@ -809,12 +864,29 @@ bool WorldSession::CheckBanker(ObjectGuid guid)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::HandleBuyBankSlotOpcode(WorldPacket& recvPacket)
|
void WorldSession::HandleBuyBankSlotOpcode(WorldPacket& recvData)
|
||||||
{
|
{
|
||||||
DEBUG_LOG("WORLD: CMSG_BUY_BANK_SLOT");
|
DEBUG_LOG("WORLD: CMSG_BUY_BANK_SLOT");
|
||||||
|
|
||||||
ObjectGuid guid;
|
ObjectGuid guid;
|
||||||
recvPacket >> guid;
|
|
||||||
|
guid[7] = recvData.ReadBit();
|
||||||
|
guid[2] = recvData.ReadBit();
|
||||||
|
guid[3] = recvData.ReadBit();
|
||||||
|
guid[1] = recvData.ReadBit();
|
||||||
|
guid[5] = recvData.ReadBit();
|
||||||
|
guid[4] = recvData.ReadBit();
|
||||||
|
guid[0] = recvData.ReadBit();
|
||||||
|
guid[6] = recvData.ReadBit();
|
||||||
|
|
||||||
|
recvData.ReadByteSeq(guid[7]);
|
||||||
|
recvData.ReadByteSeq(guid[0]);
|
||||||
|
recvData.ReadByteSeq(guid[3]);
|
||||||
|
recvData.ReadByteSeq(guid[1]);
|
||||||
|
recvData.ReadByteSeq(guid[6]);
|
||||||
|
recvData.ReadByteSeq(guid[2]);
|
||||||
|
recvData.ReadByteSeq(guid[4]);
|
||||||
|
recvData.ReadByteSeq(guid[5]);
|
||||||
|
|
||||||
if (!CheckBanker(guid))
|
if (!CheckBanker(guid))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue