warehouse- and inventory-ItemContainer contain the same item

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
Hyrelius
Posts: 257
Joined: Thu Dec 16, 2010 5:16 am

warehouse- and inventory-ItemContainer contain the same item

Post by Hyrelius »

If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision 5759:5828M
L2JDP Revision 9397:9413

I'm having trouble with ItemContainer-behavior.
Problem occurs when:
1. Create/use an object of L2PcInstance (e.g. character).
2. Call "character.getInventory().getItems" and inspect the L2ItemInstance-objects
3. Call "character.getWarehouse().getItems" and inspect the L2ItemInstance-objects
4. Transfer an item from warehouse to inventory
5. Have another look at the L2ItemInstances of the warehouse and inventory of the given L2PcInstance.

What you will see, is, that even though you have transferred a certain item from your warehouse to your inventory, you can still find the item in the warehouse-ItemContainer AS WELL, which leads to problems if you're using these ItemContainers for a script (what I do).

In my opinion the item should be removed from the warehouse-ItemContainer once it's added to the inventory-ItemContainer. Further more the "LocationSlot" should be set (this slot is NOT set on the newly transferred item until you logout? because then you can see the slot in the database).

Edit: I've figured out, that if/when you use "updateDatabase()" it seems to remove the item, which has been transferred from the warehouse to the owner's inventory, from the list (and hence it fixes my problem), but I doubt that it should be like this.
Image
I don't mind helping - however: I only do so if I want to.
No support for other server packs than L2J.
Post Reply