hi every body.
I try for 2 days to read items and containers.
I have a big problems with reading container slot number and I can't find why.
here is what I do :
Code:
public enum ContainerFields : uint
{
CONTAINER_FIELD_NUM_SLOTS = 0x6,
CONTAINER_ALIGN_PAD = 0x7,
CONTAINER_FIELD_SLOT_1 = 0x8,
TOTAL_CONTAINER_FIELDS = 0x3
}
object manager :
Code:
uint type = ReadUInt(curObj + (uint)MemEnums.ObjectFields.OBJECT_FIELD_TYPE); // curObj + 0x14
switch (type)
{
case (uint)MemEnums.ObjectType.ITEM: // item
ReadItem(curObj, type);
break;
case (uint)MemEnums.ObjectType.CONTAINER:
ReadContainer(curObj, type);
break; // container
case (uint)MemEnums.ObjectType.NPC: // mob
ReadMonster(curObj, type);
break;
case (uint)MemEnums.ObjectType.PLAYER: // player, possibly me
ReadPlayer(curObj, type);
break;
case (uint)MemEnums.ObjectType.GAMEOBJECT: // stools, chairs, etc
ReadGameObject(curObj, type);
break;
}
Container slot reading :
Code:
uint slot =(uint) ReadUint(curObj + (uint)MemEnums.ContainerFields.CONTAINER_FIELD_NUM_SLOTS *4 );
In my case this should return 16, but it returns a very by number.
If someone can help me I'll be glad.