|
|
 |
 |
 |
 |
|
 |
 |
|
 |
 |
|
 |
|
Support::Windows Servers Support forum for Windows EQEMu users. |

01-22-2012, 02:01 AM
|
Demi-God
|
|
Join Date: Aug 2010
Posts: 1,742
|
|
Stack size was fairly recently updated to allow for stacks of more than 255. It's possible something was missed, so if you had a stack over that size and whatever wasn't updated happens you'd end up with the old stack size mod 256. So, if you had 500 you'd end up with 244, and if you had 1000 you'd end up with 232.
If you limited yourself to stacks of 255 or less you wouldn't have any issues. If you're looking to track it down you'd need to find everywhere that the stacksize is assigned to a variable or passed into a function and make sure none of those places is using an unsigned char instead of a uint16.
|

01-22-2012, 04:42 AM
|
Dragon
|
|
Join Date: Dec 2008
Location: Tennessee
Posts: 662
|
|
Since the stacksize change was made in rev2004 I used the file list from that as a reference on where to look for any unsigned char being used with stacksize and I am sorry to say I did not see any.
Guess I will have to lower my stack sizes down below 255 till I can track down the culprit in the code or where ever it is or until someone beats me to it.
|

01-22-2012, 05:45 AM
|
Demi-God
|
|
Join Date: Aug 2010
Posts: 1,742
|
|
If I had to guess I'd say it might be one of these:
Code:
Inventory
bool DeleteItem(sint16 slot_id, uint8 quantity=0);
sint16 HasItem(uint32 item_id, uint8 quantity=0, uint8 where=0xFF);
sint16 HasItemByUse(uint8 use, uint8 quantity=0, uint8 where=0xFF);
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);
But I'd say the most likely candidate is this:
Code:
void Client::DeleteItemInInventory(sint16 slot_id, sint8 quantity, bool client_update, bool update_db)
|
 |
|
 |

01-22-2012, 10:54 PM
|
Dragon
|
|
Join Date: Dec 2008
Location: Tennessee
Posts: 662
|
|
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);
|
 |
|
 |
Thread Tools |
|
Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 02:04 AM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |