mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
[10250] Select auction store by house id only.
After this commit auction auctioneer guid used only for select auction house in packet or loading. Next task replace it in DB by houseid, dependence DB data from creature guid isn't good.
This commit is contained in:
parent
02532a469a
commit
9350c9990d
8 changed files with 150 additions and 128 deletions
|
|
@ -487,18 +487,22 @@ void WorldSession::HandlePageQuerySkippedOpcode( WorldPacket & recv_data )
|
|||
void WorldSession::HandleSellItemOpcode( WorldPacket & recv_data )
|
||||
{
|
||||
DEBUG_LOG( "WORLD: Received CMSG_SELL_ITEM" );
|
||||
uint64 vendorguid, itemguid;
|
||||
|
||||
ObjectGuid vendorGuid;
|
||||
uint64 itemguid;
|
||||
uint32 count;
|
||||
|
||||
recv_data >> vendorguid >> itemguid >> count;
|
||||
recv_data >> vendorGuid;
|
||||
recv_data >> itemguid;
|
||||
recv_data >> count;
|
||||
|
||||
if(!itemguid)
|
||||
return;
|
||||
|
||||
Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(vendorguid, UNIT_NPC_FLAG_VENDOR);
|
||||
Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(vendorGuid, UNIT_NPC_FLAG_VENDOR);
|
||||
if (!pCreature)
|
||||
{
|
||||
DEBUG_LOG( "WORLD: HandleSellItemOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(vendorguid)) );
|
||||
DEBUG_LOG("WORLD: HandleSellItemOpcode - %s not found or you can't interact with him.", vendorGuid.GetString().c_str());
|
||||
_player->SendSellError( SELL_ERR_CANT_FIND_VENDOR, NULL, itemguid, 0);
|
||||
return;
|
||||
}
|
||||
|
|
@ -596,15 +600,15 @@ void WorldSession::HandleSellItemOpcode( WorldPacket & recv_data )
|
|||
void WorldSession::HandleBuybackItem(WorldPacket & recv_data)
|
||||
{
|
||||
DEBUG_LOG( "WORLD: Received CMSG_BUYBACK_ITEM" );
|
||||
uint64 vendorguid;
|
||||
ObjectGuid vendorGuid;
|
||||
uint32 slot;
|
||||
|
||||
recv_data >> vendorguid >> slot;
|
||||
recv_data >> vendorGuid >> slot;
|
||||
|
||||
Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(vendorguid, UNIT_NPC_FLAG_VENDOR);
|
||||
Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(vendorGuid, UNIT_NPC_FLAG_VENDOR);
|
||||
if (!pCreature)
|
||||
{
|
||||
DEBUG_LOG( "WORLD: HandleBuybackItem - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(vendorguid)) );
|
||||
DEBUG_LOG("WORLD: HandleBuybackItem - %s not found or you can't interact with him.", vendorGuid.GetString().c_str());
|
||||
_player->SendSellError( SELL_ERR_CANT_FIND_VENDOR, NULL, 0, 0);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue