View Single Post
  #1  
Old 08-23-2004, 01:44 AM
fathernitwit
Developer
 
Join Date: Jul 2004
Posts: 773
Default 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.
Reply With Quote