So I took your idea on the potentital problem and ran with. After more than a few changes and function overload errors and fixes I am at a loss again.
The following did not fix the problem nor did the changes cause any other issues that I am aware of atm.
Code:
-------------------------------------------------------------------
zone/inventory.cpp
-------------------------------------------------------------------
void Client::DeleteItemInInventory(sint16 slot_id, sint8 quantity, bool client_update, bool update_db)
changed to
void Client::DeleteItemInInventory(sint16 slot_id, sint16 quantity, bool client_update, bool update_db)
uint32 Client::NukeItem(uint32 itemnum, uint8 where_to_check) {
changed to
uint32 Client::NukeItem(uint32 itemnum, uint16 where_to_check) {
-------------------------------------------------------------------
zone/client.h
-------------------------------------------------------------------
void DeleteItemInInventory(sint16 slot_id, sint8 quantity = 0, bool client_update = false, bool update_db = true);
changed to
void DeleteItemInInventory(sint16 slot_id, sint16 quantity = 0, bool client_update = false, bool update_db = true);
uint32 NukeItem(uint32 itemnum, uint8 where_to_check =
changed to
uint32 NukeItem(uint32 itemnum, uint16 where_to_check =
-------------------------------------------------------------------
common/item.cpp
-------------------------------------------------------------------
// Remove item from inventory (with memory delete)
bool Inventory::DeleteItem(sint16 slot_id, uint8 quantity)
changed to
// Remove item from inventory (with memory delete)
bool Inventory::DeleteItem(sint16 slot_id, uint16 quantity)
sint16 Inventory::HasItem(uint32 item_id, uint8 quantity, uint8 where)
changed to
sint16 Inventory::HasItem(uint32 item_id, uint16 quantity, uint16 where)
sint16 Inventory::HasItemByUse(uint8 use, uint8 quantity, uint8 where)
changed to
sint16 Inventory::HasItemByUse(uint8 use, uint16 quantity, uint16 where)
sint16 Inventory::_HasItem(map<sint16, ItemInst*>& bucket, uint32 item_id, uint8 quantity)
changed to
sint16 Inventory::_HasItem(map<sint16, ItemInst*>& bucket, uint32 item_id, uint16 quantity)
sint16 Inventory::_HasItem(ItemInstQueue& iqueue, uint32 item_id, uint8 quantity)
changed to
sint16 Inventory::_HasItem(ItemInstQueue& iqueue, uint32 item_id, uint16 quantity)
sint16 Inventory::_HasItemByUse(map<sint16, ItemInst*>& bucket, uint8 use, uint8 quantity)
changed to
sint16 Inventory::_HasItemByUse(map<sint16, ItemInst*>& bucket, uint8 use, uint16 quantity)
sint16 Inventory::_HasItemByUse(ItemInstQueue& iqueue, uint8 use, uint8 quantity)
changed to
sint16 Inventory::_HasItemByUse(ItemInstQueue& iqueue, uint8 use, uint16 quantity)
-------------------------------------------------------------------
common/item.h
-------------------------------------------------------------------
// Remove item from inventory
bool DeleteItem(sint16 slot_id, uint8 quantity=0);
changed to
// Remove item from inventory
bool DeleteItem(sint16 slot_id, uint16 quantity=0);
// Check whether item exists in inventory
// where argument specifies OR'd list of invWhere constants to look
sint16 HasItem(uint32 item_id, uint8 quantity=0, uint8 where=0xFF);
changed to
// Check whether item exists in inventory
// where argument specifies OR'd list of invWhere constants to look
sint16 HasItem(uint32 item_id, uint16 quantity=0, uint16 where=0xFFFF);
// Check whether item exists in inventory
// where argument specifies OR'd list of invWhere constants to look
sint16 HasItemByUse(uint8 use, uint16 quantity=0, uint8 where=0xFF);
changed to
// Check whether item exists in inventory
// where argument specifies OR'd list of invWhere constants to look
sint16 HasItemByUse(uint8 use, uint16 quantity=0, uint16 where=0xFFFF);
// Checks an inventory bucket for a particular item
sint16 _HasItem(map<sint16, ItemInst*>& bucket, uint32 item_id, uint8 quantity);
sint16 _HasItem(ItemInstQueue& iqueue, uint32 item_id, uint8 quantity);
sint16 _HasItemByUse(map<sint16, ItemInst*>& bucket, uint8 use, uint8 quantity);
sint16 _HasItemByUse(ItemInstQueue& iqueue, uint8 use, uint8 quantity);
changed to
// Checks an inventory bucket for a particular item
sint16 _HasItem(map<sint16, ItemInst*>& bucket, uint32 item_id, uint16 quantity);
sint16 _HasItem(ItemInstQueue& iqueue, uint32 item_id, uint16 quantity);
sint16 _HasItemByUse(map<sint16, ItemInst*>& bucket, uint8 use, uint16 quantity);
sint16 _HasItemByUse(ItemInstQueue& iqueue, uint8 use, uint16 quantity);