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);