mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 13:37:00 +00:00
[10225] Propertly show empty vendor list for empty item list.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
6192bdbe1b
commit
e9e7aff5bb
2 changed files with 11 additions and 4 deletions
|
|
@ -740,7 +740,10 @@ void WorldSession::SendListInventory(uint64 vendorguid)
|
||||||
|
|
||||||
if (!vItems)
|
if (!vItems)
|
||||||
{
|
{
|
||||||
_player->SendSellError(SELL_ERR_CANT_FIND_VENDOR, NULL, 0, 0);
|
WorldPacket data( SMSG_LIST_INVENTORY, (8+1+1) );
|
||||||
|
data << uint64(vendorguid);
|
||||||
|
data << uint8(0); // count==0, next will be error code
|
||||||
|
data << uint8(0); // "Vendor has no inventory"
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -795,11 +798,15 @@ void WorldSession::SendListInventory(uint64 vendorguid)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( count == 0 || data.size() != 8 + 1 + size_t(count) * 8 * 4 )
|
if (count == 0)
|
||||||
|
{
|
||||||
|
data << uint8(0); // "Vendor has no inventory"
|
||||||
|
SendPacket(&data);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
data.put<uint8>(count_pos, count);
|
data.put<uint8>(count_pos, count);
|
||||||
SendPacket( &data );
|
SendPacket(&data);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::HandleAutoStoreBagItemOpcode( WorldPacket & recv_data )
|
void WorldSession::HandleAutoStoreBagItemOpcode( WorldPacket & recv_data )
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "10224"
|
#define REVISION_NR "10225"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue