fathernitwit
08-11-2004, 06:49 AM
Hello,
I am working on a rewrite of the tradeskill system, and I have run into a very strange thing...
in Object::HandleCombine, ~line 308
theres some code like:
inst = user_inv.GetItem(in_combine->container_slot);
if (inst) {
const Item_Struct* item = inst->GetItem();
if (item && inst->IsType(ItemTypeContainer)) {
tradeskill = item->Container.PackType;
}
}
specifically:
tradeskill = item->Container.PackType;
What is strange is that the order of the Container struct seems to be screwed up in this specific place... All of the values are shifted down one word... so the PackType for the object is actually in .Slots. If I alter the structure, and recompile from 'make clean', it gets totally pissed... because the order is correct elsewhere... so I modified the code to reference .Slots, and it works great....
does anybody have any idea why this would be happening? I dont know if it is a re-ordering of the Container struct, or just a shift of the data down by a word...
I am working on a rewrite of the tradeskill system, and I have run into a very strange thing...
in Object::HandleCombine, ~line 308
theres some code like:
inst = user_inv.GetItem(in_combine->container_slot);
if (inst) {
const Item_Struct* item = inst->GetItem();
if (item && inst->IsType(ItemTypeContainer)) {
tradeskill = item->Container.PackType;
}
}
specifically:
tradeskill = item->Container.PackType;
What is strange is that the order of the Container struct seems to be screwed up in this specific place... All of the values are shifted down one word... so the PackType for the object is actually in .Slots. If I alter the structure, and recompile from 'make clean', it gets totally pissed... because the order is correct elsewhere... so I modified the code to reference .Slots, and it works great....
does anybody have any idea why this would be happening? I dont know if it is a re-ordering of the Container struct, or just a shift of the data down by a word...