mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
Fixed item buy packets. Thanks to yad02 for reporting.
Fixed client disconnect when boarding transport (by yad02 and woweur).
This commit is contained in:
parent
66f554f74d
commit
2fc6e75a81
2 changed files with 12 additions and 10 deletions
|
|
@ -663,28 +663,28 @@ void WorldSession::HandleBuybackItem(WorldPacket & recv_data)
|
||||||
|
|
||||||
void WorldSession::HandleBuyItemInSlotOpcode( WorldPacket & recv_data )
|
void WorldSession::HandleBuyItemInSlotOpcode( WorldPacket & recv_data )
|
||||||
{
|
{
|
||||||
CHECK_PACKET_SIZE(recv_data,8+4+8+1+1);
|
CHECK_PACKET_SIZE(recv_data,8+4+4+8+1+4);
|
||||||
|
|
||||||
sLog.outDebug( "WORLD: Received CMSG_BUY_ITEM_IN_SLOT" );
|
sLog.outDebug( "WORLD: Received CMSG_BUY_ITEM_IN_SLOT" );
|
||||||
uint64 vendorguid, bagguid;
|
uint64 vendorguid, bagguid;
|
||||||
uint32 item;
|
uint32 item, slot, count;
|
||||||
uint8 slot, count;
|
uint8 bagslot;
|
||||||
|
|
||||||
recv_data >> vendorguid >> item >> bagguid >> slot >> count;
|
recv_data >> vendorguid >> item >> slot >> bagguid >> bagslot >> count;
|
||||||
|
|
||||||
GetPlayer()->BuyItemFromVendor(vendorguid,item,count,bagguid,slot);
|
GetPlayer()->BuyItemFromVendor(vendorguid,item,count,bagguid,slot);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::HandleBuyItemOpcode( WorldPacket & recv_data )
|
void WorldSession::HandleBuyItemOpcode( WorldPacket & recv_data )
|
||||||
{
|
{
|
||||||
CHECK_PACKET_SIZE(recv_data,8+4+1+1);
|
CHECK_PACKET_SIZE(recv_data,8+4+4+4+1);
|
||||||
|
|
||||||
sLog.outDebug( "WORLD: Received CMSG_BUY_ITEM" );
|
sLog.outDebug( "WORLD: Received CMSG_BUY_ITEM" );
|
||||||
uint64 vendorguid;
|
uint64 vendorguid;
|
||||||
uint32 item;
|
uint32 item, slot, count;
|
||||||
uint8 count, unk1;
|
uint8 unk1;
|
||||||
|
|
||||||
recv_data >> vendorguid >> item >> count >> unk1;
|
recv_data >> vendorguid >> item >> slot >> count >> unk1;
|
||||||
|
|
||||||
GetPlayer()->BuyItemFromVendor(vendorguid,item,count,NULL_BAG,NULL_SLOT);
|
GetPlayer()->BuyItemFromVendor(vendorguid,item,count,NULL_BAG,NULL_SLOT);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -636,8 +636,10 @@ void WorldSession::ReadMovementInfo(WorldPacket &data, MovementInfo *mi)
|
||||||
|
|
||||||
if(mi->flags & MOVEMENTFLAG_ONTRANSPORT)
|
if(mi->flags & MOVEMENTFLAG_ONTRANSPORT)
|
||||||
{
|
{
|
||||||
CHECK_PACKET_SIZE(data, data.rpos()+8+4+4+4+4+4+1);
|
if(!data.readPackGUID(mi->t_guid))
|
||||||
data >> mi->t_guid;
|
return;
|
||||||
|
|
||||||
|
CHECK_PACKET_SIZE(data, data.rpos()+4+4+4+4+4+1);
|
||||||
data >> mi->t_x;
|
data >> mi->t_x;
|
||||||
data >> mi->t_y;
|
data >> mi->t_y;
|
||||||
data >> mi->t_z;
|
data >> mi->t_z;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue