mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-15 00:06:11 +00:00
feat(Core/SendListInventory): Add multivendor function (#3172)
This commit is contained in:
committed by
GitHub
parent
07c9debb0d
commit
5d284f02a7
@@ -887,7 +887,7 @@ void WorldSession::HandleListInventoryOpcode(WorldPacket & recvData)
|
||||
SendListInventory(guid);
|
||||
}
|
||||
|
||||
void WorldSession::SendListInventory(uint64 vendorGuid)
|
||||
void WorldSession::SendListInventory(uint64 vendorGuid, uint32 vendorEntry)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_LIST_INVENTORY");
|
||||
@@ -911,7 +911,9 @@ void WorldSession::SendListInventory(uint64 vendorGuid)
|
||||
if (vendor->HasUnitState(UNIT_STATE_MOVING))
|
||||
vendor->StopMoving();
|
||||
|
||||
VendorItemData const* items = vendor->GetVendorItems();
|
||||
SetCurrentVendor(vendorEntry);
|
||||
|
||||
VendorItemData const* items = vendorEntry ? sObjectMgr->GetNpcVendorItemList(vendorEntry) : vendor->GetVendorItems();
|
||||
if (!items)
|
||||
{
|
||||
WorldPacket data(SMSG_LIST_INVENTORY, 8 + 1 + 1);
|
||||
|
||||
Reference in New Issue
Block a user