Item Struct

A forum for the general posts relating to MacroQuest. *DEPRECATED: This forum is no longer in public use, but remains here for your reading pleasure. Enjoy

Moderator: MacroQuest Developers

iluvseq
Clueless Mudslinger
Posts: 269
Joined: Mon Apr 14, 2003 10:05 am

Item Struct

Post by iluvseq » Mon Apr 14, 2003 10:20 am

With the 04/08 patch, many structures had their member variables re-arranged.

I have figured out the new order for the Item Struct.

An updated _ITEMINFO is below:

Code: Select all

typedef struct _ITEMINFO {
	CHAR IDFile[30];	// 00 - 29
	CHAR Name[64];		// 30 - 93
	CHAR LoreName[80];	// 94 - 173
	BYTE Unknown0174[22];   // 174 - 195
	DWORD EquipableSlots;	// 196 - 199
	DWORD Cost;		// 200 - 203
	DWORD ItemNumber;	// 204 - 207
	DWORD IconNumber;	// 208 - 211
	DWORD EquipSlot;	// 212 - 215
	DWORD Unknown0216;	// 216 - 219
	BYTE Unknown0220[13];	// 220 - 232
	BYTE Weight;		// 233
	BYTE NoRent;		// 234
	BYTE NoDrop;		// 235
	BYTE Size;		// 236
	BYTE Type;		// 237
	BYTE  Unknown0238[2];	// 238 - 239
	union { 
		COMMON    Common;
		CONTAINER Container;
		BOOK      Book;
	};
} ITEMINFO, *PITEMINFO;
And updated _COMMON is below:

Code: Select all

typedef signed char int8_t;
typedef short int int16_t;
typedef int int32_t;
typedef unsigned char		uint8_t;
typedef unsigned short int	uint16_t;
typedef unsigned int		uint32_t;

typedef struct _COMMON {
	int32_t	HP;  // 0f0 - 0f3	*
	int32_t	MANA;  // 0f4 - 0f7	*
	int32_t	AC;  // 0f8 - 0fb	*
	int32_t	unk0FC;  // 0fc - 0ff
	int32_t	skillModValue;  // 100 - 103	*
	int32_t	baneDMGRace;  // 104 - 107	*
	int32_t	unk108[2];  // 108 - 10f
	int32_t	factionMod1;  // 110 - 113	*
	int32_t	factionMod2;  // 114 - 117	*
	int32_t	factionMod3;  // 118 - 11b	*
	int32_t	factionMod4;  // 11c - 11f	*
	int32_t	factionAmnt1;  // 120 - 123	*
	int32_t	factionAmnt2;  // 124 - 127	*
	int32_t	factionAmnt3;  // 128 - 12b	*
	int32_t	factionAmnt4;  // 12c - 12f	*
	uint32_t	minLevel;  // 130 - 133	*
	int32_t	unk134[2];  // 134 - 13b
	int8_t	MR;	// 13c	*
	int8_t	FR;	// 13d	*
	int8_t	CR;	// 13e	*
	int8_t	DR;	// 13f	*
	int8_t	PR;	// 140	*
	int8_t	DEXmod;	// 141	*
	int8_t	INTmod;	// 142	*
	int8_t	AGImod;	// 143	*
	int8_t	STRmod;	// 144	*
	int8_t	STAmod;	// 145	*
	int8_t	CHAmod;	// 146	*
	int8_t	WISmod;	// 147	*
	int8_t	maxCharges;  // 148	*
	int8_t	eff_type;	// 149	*
	uint8_t	range;	// 14a	*
	int8_t	itemgroup;	  // 14b	*
	int8_t	magic;	// 14c	*
	int8_t	eff_lvl1;	// 14d	*
	int8_t	material;	// 14e	*
	int8_t	unk14f;	// 14f
	int8_t	light;	// 150	*
	uint8_t	delay;	// 151	*
	uint8_t	damage;	// 152	*
	int8_t	unk153;	// 153
	uint8_t	colorBlue;	// 154	*
	uint8_t	colorGreen;  // 155	*
	uint8_t	colorRed;	// 156	*
	int8_t	unk157;	// 157
	int32_t	classes;     // 158 - 15b	*
	int32_t	races;	// 15c - 15f	*
	int32_t	unk160;	// 160 - 163
	int32_t	spellId1;	// 164 - 167	*
	int8_t	stackable;	// 168	*
	int8_t	eff_lvl2;	// 169	*
	union	{	// 16a	*
		int8_t	StackCount;
		int8_t	Charges;
	};
	int8_t	unk16B;	// 16b
	int32_t	spellId2;	// 16c - 16f	*
	int32_t	unk170;	// 170 - 173
	int32_t	unk174;	// 174 - 177
	int32_t	unk178;	// 178 - 17b
	int32_t	castTime;  // 17c - 17f	*
	int32_t	unk180;	// 180 - 183
	int32_t	unk184;	// 184 - 187
	int32_t	unk188;	// 188 - 18b
	int32_t	unk18C;	// 18c - 18f
	int8_t	skillModId;	  // 190	*
	uint8_t	baneDMG;	// 191	*
	int16_t	recLevel;	// 192 - 193	*
	uint8_t	elemDMGType;  // 194	*
	uint8_t	elemDMG;	// 195	*
	int16_t	unk196;	// 196 - 197
	uint16_t	deity;	// 198 - 199	*
	int16_t	unk19A;	// 19a - 19b
	int32_t	unk19C;	// 19c - 19f
	int32_t	unk1A0;	// 1a0 - 1a3
	int32_t	unk1A4;	// 1a4 - 1a7
	int32_t	unk1A8;	// 1a8 - 1ab
	int32_t	unk1Ac;	// 1ac - 1af
	int32_t	unk1B0;	// 1b0 - 1b3
	int32_t	unk1B4;	// 1b4 - 1b7
	int32_t	unk1B8;	// 1b8 - 1bb
	int32_t	focusId;	// 1bc - 1bf	*
	int32_t	unk1C0;	// 1c0 - 1c3
	int32_t	unk1C4;	// 1c4 - 1c7
	int32_t	unk1C8;	// 1c8 - 1cb
	int32_t	unk1CC;	// 1cc - 1cf
	int32_t	unk1D0;	// 1d0 - 1d3
	int32_t	unk1D4;	// 1d4 - 1d7
//	int32_t	baneDMGBody;
//	int8_t	recSkill;
}	COMMON;
The only items I haven't been able to figure out are baneDMGBody and recSkill.

Other than that, the entire struct is tested and verified accurate.

As a side note, the _CHARINFO struct has changed minorly. Specifically, DWORD Unknown5689[] is now 800 DWORDs long (making the struct bigger)
Last edited by iluvseq on Fri Apr 18, 2003 10:45 am, edited 1 time in total.

Mckorr
Developer
Developer
Posts: 2326
Joined: Fri Oct 18, 2002 1:16 pm
Location: Texas

Post by Mckorr » Mon Apr 14, 2003 10:40 am

Did you check _ITEM against the April 11th patch? I can't imagine it changed, but ya never know.

iluvseq
Clueless Mudslinger
Posts: 269
Joined: Mon Apr 14, 2003 10:05 am

yes

Post by iluvseq » Mon Apr 14, 2003 12:40 pm

Aye, the structures I posted are verified post April 11th as well.