New ITEMINFO, CONTAINER, COMMON -- 9/1/2003

A forum for feature requests/discussions and user submitted patches that improve MQ2

Moderator: MacroQuest Developers

Amadeus
The Maestro
The Maestro
Posts: 2036
Joined: Sat Jun 29, 2002 3:51 pm

New ITEMINFO, CONTAINER, COMMON -- 9/1/2003

Post by Amadeus » Mon Sep 01, 2003 4:13 pm

Thanks to iloveseq, I was able to fill in a few more variables in these structs.

I also included some comments that I think will be helpful.

Code: Select all

// _CONTAINER is now depreciated as all items are now considered 'containers' 
// and this struct is actually part of the _COMMON structure.  However, for 
// backwards compatability, we will leave it here and try to keep it updated 
// as a 'union' in the ITEMINFO struct.
typedef struct _CONTAINER { 
/*0x000*/   BYTE   Unknown0x00[292]; 
/*0x124*/   BYTE   Combine; 
/*0x125*/   BYTE   Slots;            // 0 to 10 
/*0x126*/   BYTE   SizeCapacity;      // 0: TINY 1: SMALL 2: MEDIUM 3: LARGE 4: GIANT 
/*0x127*/   BYTE   WeightReduction; 
/*0x128*/   BYTE   Unknown0x128[10]; 
} CONTAINER, *PCONTAINER;

Code: Select all

typedef struct _COMMON { 
/*0x000*/   BYTE   Stackable; 
/*0x001*/   BYTE   SvCold; 
/*0x002*/   BYTE   SvFire; 
/*0x003*/   BYTE   SvMagic; 
/*0x004*/   BYTE   SvDisease; 
/*0x005*/   BYTE   SvPoison; 
/*0x006*/   BYTE   STR; 
/*0x007*/   BYTE   STA; 
/*0x008*/   BYTE   AGI; 
/*0x009*/   BYTE   DEX; 
/*0x00a*/   BYTE   CHA; 
/*0x00b*/   BYTE   INT; 
/*0x00c*/   BYTE   WIS; 
/*0x00d*/   BYTE   Unknown0x00d; 
/*0x00e*/   BYTE   HP; 
/*0x00f*/   BYTE   Unknown0x00f; 
/*0x010*/   BYTE   Unknown0x010; 
/*0x011*/   BYTE   Unknown0x011; 
/*0x012*/   BYTE   Mana; 
/*0x013*/   BYTE   Unknown0x013; 
/*0x014*/   BYTE   Unknown0x014; 
/*0x015*/   BYTE   Skill;			//WRONG!
/*0x016*/   BYTE   AC; 
/*0x017*/   BYTE   Unknown0x017[3]; 
/*0x01a*/   BYTE   SkillModValue; 
/*0x01b*/   BYTE   Unknown0x01b[3]; 
/*0x01e*/	BYTE   BaneDmgRace;
/*0x01f*/	BYTE   Unknown0x01f[7];
/*0x026*/   BYTE   RequiredLevel; 
/*0x027*/   BYTE   Unknown0x027[11]; 
/*0x032*/   DWORD   Classes; 
/*0x036*/   DWORD   Races; 
/*0x03a*/   DWORD   Diety; 
/*0x03e*/   DWORD   Unknown0x03e; 
/*0x042*/   DWORD   SpellId; 
/*0x046*/   DWORD   Color; 
/*0x04a*/   BYTE   SkillModType; 
/*0x04b*/   BYTE   Unknown0x04b; 
/*0x04c*/   BYTE   Unknown0x04c; 
/*0x04d*/   BYTE   Magic;  
/*0x04e*/   BYTE   Level; 
/*0x04f*/   BYTE   Light; 
/*0x050*/   BYTE   Delay; 
/*0x051*/   BYTE   RecommendedLevel; 
/*0x052*/   BYTE   Unknown0x052[3]; 
/*0x055*/	BYTE   Range;
/*0x056*/   BYTE   Damage; 
/*0x057*/   BYTE   ItemType; 
/*0x058*/   BYTE   Material; 
/*0x059*/   BYTE   Unknown0x059[41]; 
/*0x082*/	DWORD  FactionMod[4];
/*0x092*/	DWORD  FactionAmt[4];

/*0x0a2*/   CHAR   CharmFile[32]; 
/*0x0c2*/   FLOAT   UnknownData0x0c2; 
/*0x0c6*/   BYTE   Unknown0x0c2[12]; 
/*0x0d2*/   DWORD   FocusId; 
/*0x0d6*/   BYTE   Unknown0x0d6[40]; 
   union { 
/*0x0fe*/   DWORD   CastTime; 
/*0x0fe*/   DWORD   Unknown0x0fe;    
   }; 
   union { 
/*0x102*/   BYTE   MaxCharges;       
/*0x102*/   BYTE   Unknown0x102;	 
   }; 
/*0x103*/   BYTE   EffectType;    
/*0x104*/   BYTE   Unknown0x104[32];
/*0x124*/   BYTE   Combine; 
/*0x125*/   BYTE   Slots;            // 0 to 10 
/*0x126*/   BYTE   SizeCapacity;      // 0: TINY 1: SMALL 2: MEDIUM 3: LARGE 4: GIANT 
/*0x127*/   BYTE   WeightReduction; 
/*0x128*/   BYTE   Unknown0x128[10]; 
} COMMON, *PCOMMON;

Code: Select all

#define ITEM_NAME_LEN         64 
#define LORE_NAME_LEN         80 
typedef struct _ITEMINFO { 
/*0x00*/   CHAR     Name[ITEM_NAME_LEN]; 
/*0x40*/   CHAR     LoreName[LORE_NAME_LEN]; 
/*0x90*/   CHAR     IDFile[32]; 
/*0xb0*/   DWORD	ItemNumber; 
/*0xb4*/   DWORD	EquipSlots; 
/*0xb8*/   DWORD	Cost; 
/*0xbc*/   DWORD	IconNumber; 
/*0xc0*/   DWORD	Charges;	//New(?)
/*0xc4*/   DWORD	Unknown0xc4[3]; 
/*0xd0*/   BYTE     UnknownData0xd0; 
/*0xd1*/   BYTE     Weight; 
/*0xd2*/   BYTE     NoRent; 
/*0xd3*/   BYTE     NoDrop; 
/*0xd4*/   BYTE     Size; 
/*0xd5*/   BYTE     Type; 
         union   {			
/*0xd6*/   COMMON    Common; 
/*0xd6*/   CONTAINER Container; 
/*0xd6*/   BOOK      Book; 
               }; 
// The union above is actually no longer applicable as all items are now considered 
// 'containers',and therefore all have the same structure (_COMMON).  We are keeping 
// this union here for backwards compatability; however, it technically should read:
// /*0xd6*/  COMMON		Common;
} ITEMINFO, *PITEMINFO;