From 478bcd53380df04ca73f792c6f1f5cf2a562139e Mon Sep 17 00:00:00 2001 From: Gent S Date: Thu, 26 Nov 2020 09:00:30 -0500 Subject: [PATCH] Use vendorID instead of NPC_ID to index into vendor tables --- src/NPCManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/NPCManager.cpp b/src/NPCManager.cpp index d180eb1..4fbf371 100644 --- a/src/NPCManager.cpp +++ b/src/NPCManager.cpp @@ -278,10 +278,10 @@ void NPCManager::npcVendorTable(CNSocket* sock, CNPacketData* data) { sP_CL2FE_REQ_PC_VENDOR_TABLE_UPDATE* req = (sP_CL2FE_REQ_PC_VENDOR_TABLE_UPDATE*)data->buf; - if (req->iVendorID != req->iNPC_ID || ItemManager::VendorTables.find(req->iNPC_ID) == ItemManager::VendorTables.end()) + if (req->iVendorID != req->iNPC_ID || ItemManager::VendorTables.find(req->iVendorID) == ItemManager::VendorTables.end()) return; - std::vector listings = ItemManager::VendorTables[req->iNPC_ID]; // maybe use iVendorID instead...? + std::vector listings = ItemManager::VendorTables[req->iVendorID]; INITSTRUCT(sP_FE2CL_REP_PC_VENDOR_TABLE_UPDATE_SUCC, resp);