PDA

View Full Version : 0.6.0dr1 - Items / Inventory issue


Magoth78
10-18-2004, 12:50 AM
Hello there,

Server version: 0.6.0dr1
DB: a fresh 0.6.0 db
Sources: compiled with the Release profile.


I still have the item poof / change slot issue in this version and I don't know what's happening.

When someones loot an item and immediatly equip it, remplacing an item in the same slot, he will loose this item after zoning / camping / ld'ing or the item will change slot.

Example: I kill a mob and loot a cool sword. I equip it, remplacing the old sword I had (I did not unequip the previous sword before equiping the new one), I have like 85% of chance to loose this item and having the old one duplicated (even if it's lore)

Now, i kill the mob and loot the sword that I put in my inventory. I unequip the old sword and put it in a bag. then, I equip the new sword, I have ~20% of chance to loose it or getting the old one duplicated.

And finally, if i do the same thing as above and I #save 5 times, I have ~5-10% of chance to loose it.

As I mentionned earlier on a previous post, I noticed that the inventory table is not immediatly upgraded when someones equips an item but a bit after. It's probably intentionnal to limit the CPU usage wich I understand but if the guy zones seconds after, he can loose the item.

Any idea?
Magoth

Edgar1898
10-18-2004, 11:21 AM
When someones loot an item and immediatly equip it, remplacing an item in the same slot, he will loose this item after zoning / camping / ld'ing or the item will change slot.

Example: I kill a mob and loot a cool sword. I equip it, remplacing the old sword I had (I did not unequip the previous sword before equiping the new one), I have like 85% of chance to loose this item and having the old one duplicated (even if it's lore)


I tried this 5 times and every time it was correct. I tried multiple variations (right/left clicking to loot, looting and then changing the item with/without unequiping, etc) and I could never get it to mess up.

As I mentionned earlier on a previous post, I noticed that the inventory table is not immediatly upgraded when someones equips an item but a bit after

It is saved to the database as soon as they loot the item, here is some code for Client::PutLootInInventory even:

m_inv.PutItem(slot_id, inst);
SendLootItemInPacket(&inst, slot_id);
database.SaveInventory(this->CharacterID(), &inst, slot_id);

I'm not sure how you are getting those problems, but I do know that I cannot reproduce them and an item is saved to the database as soon as it is looted or moved.

sotonin
10-18-2004, 11:50 AM
I'm betting he used an old or "unsupported" database. Alpha1 didnt have the inventory keys right so you could end up with multiple items in a single slot. which caused all sorts of wierd problems. it was fixed in classic. so if you used something put together by someebody who didnt know what they were doing very well might not have carried the proper structure over.

Magoth78
10-18-2004, 12:03 PM
thanks for the answers,

I'm using a fresh install DB from this page http://www.eqemulator.net/databases_v6.php.

But I had to backup my old inventory table and source it to the new fresh DB so people does not loose their items. Sotonin you're probably right, there re some chances that my inventory table from my old DB was unsupported.

I'll check the keys in the actual Classic DB and the ones in my old inventory table.

Thx again,
Mag

Cutter
10-18-2004, 06:14 PM
ok i know i did this.. with the inventory .. so how do i fix it exactly without losing any part of my database im currently using right now?

Magoth78
10-18-2004, 10:02 PM
You will have to backup your inventory table, then create a new one with the new inventory table scheme (you can source the inventory table from the peq classic db).
Then, you can source your backup'd inventory table to the new one. You will see a lot of duplicates error though but that's normal, in the old inventory table, the primary key (charID/SlotID) was not unique wich was letting the players to have some items in the same slot.


Mag