Strange Container Issues
Hello,
I figured I would report this as a bug to see if anybody else can figure out what is up with it. It happens to me on the 7-31-04 CVS dump. The issue I am seeing is that in certain places, the data in the Container struct of an item is not correct. It is all shifted downwards by four bytes. The two places I have seen this is: Object::HandleCombine() where it uses item->Container.PackType, but that was giving me invalid things, and I finally figured out that the correct number for the packtype was stored in item->Container.Slots. Inventory::FindFreeSlot() it tries to use inst->GetItem()->Container.Slots but the real number of slots is stored in inst->GetItem()->Container.SizeCapacity. I found this one because when I purchased from vendors, they would only place 5 items into my bags, which had 8 slots, finally I figured out that 5 was the packtype (shifted into the Slots place). Now, I have tried to figure this one out, and have been unsuccessful. If I change the order of the struct, it breaks a bunch of other things, so it seems to be correct in some places, and incorrect in others... I think it is very strange. Maybe somebody with more knowledge of the item system will be able to figure out what is going on. |
just an idea and i'll give a shot at it in a few minutes waking up from my 4 hour nap hehe =). compare the items_ vs items where items_.id=items.id and run a query to verify inconsistency. could have been someone changed something in their packetcollected logs or changed source or just a flukey bug that introduced it if the data in those two tables is different. first cup of coffee and going to monkey with it a bit if this is for specific fields only that would help tremendously in cutting down my query structures.
Darkwaters |
it is specifically the 4 fields in the Container struct in an ItemInst.
I am not 100% sure what item DB I am using, so if it might be DB related, I will try to update my items. From what I can tell, the 4 fields are correct some time, and not others... because the items stop working in other places if I jack with the ordering, and make it right. One thought I just had was maybe the serialization of containers is wrong, and it just matches the wrong ordering stored in the DB too.. i'll have to check later. |
looking at the items.h and database.h & .cpp atm. I'm really curious why there was the confusion in the code comments by confusion I mean "?" question marks in the commenting specifically this section of database.cpp ln: 6978
Code:
else if (olditem->type == (int)ItemTypeContainer) Darkwaters EDIT (ADD): PS I'm not an avid C++ coder but I can follow it for the most part. Not a big question just curious. =) |
I see the items.name='backpack' shows the following data
bagsize=3 bagslots=8 bagtype=5 bagwr=0 Edit/Add It only right-clicky into inventory's backpack 5 items which is the bagtype's value. Edit/Done_Add "Now this is the Lore Backpack" probably a newb item for starting but when you #summonitem 17005 you right click items into your inventory and eventually it ends up stuck on your mouse cursor where I have to manually drop the item into the large auto-inventory window which does not have the issue. Is there a difference between right-clicking items into your inventory vs dropping into the auto-inventory code. Like I said I can follow the code well I just wont pretend to know where to look here for comparison's. Hope this points in a bit of the right direction cuz this is a booger of an issue thats only annoying some of the time. Darkwaters |
yea,
I really think the items are in the DB correctly, and that they are getting used correctly in most places... it is just under certain circumstances that they get shifted down a slot... but im not sure at this point I have noticed that using auto inventory like the big blank in the equipment area does not use the same code that buying items from a vendor does... It might even be taken care of by the client. That is the only time I can get it to occurr, is when I buy lots from a vendor. ultimately it isnt a huge deal... just something that is bothering me. |
Yep I know what ya mean. Not only vendor's but creating a newb with only the backpack atm and trying to collect crap without running non-legit means I'm foobar'd. I have to left click and drop in main window items from looting after a point.
On the otherhand, if faction really starts kicking in and mobs aggro from LOS this will become an issue. It'd be no fun looting a few good items: left click, drop in auto-inventory (big blank in center inventory), go to next item, all while a new mob is kicking on your tail. Darkwaters |
This is a crazy bug LOL.
Tried commenting out this section of code in Item.cpp in the common source folder: Code:
// Doodman: Do ten even tho we will only have 5 augments. We need to fill 10 fields Gonna go investigate some more. Darkwaters |
All times are GMT -4. The time now is 12:04 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.