Update to _ITEMINFO struct and _COMMON struct...

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

Moderator: MacroQuest Developers

NealThorpayt
Developer
Developer
Posts: 66
Joined: Thu Mar 13, 2003 2:14 pm
Location: Miskatonic University
Contact:

Update to _ITEMINFO struct and _COMMON struct...

Post by NealThorpayt » Wed Apr 16, 2003 10:59 pm

Greetings Constructs,

The structures _ITEMINFO and _COMMON have changed. I have decoded as much as I possibly could. However, I was unable to completely decode _COMMON (especially as it pertains to items with magic effects). Having said that, none of the current code depends on the unknowns, so the new structure works fine. There does not seem to have been any changes to the _CONTAINER or _BOOK structures.

Update the following in MQ.h:

Code: Select all

#define ITEM_NAME_LEN			64
#define LORE_NAME_LEN			80
typedef struct _ITEMINFO {
	CHAR		IDFile[8];
	BYTE		Unknown0006[22];
	CHAR		Name[ITEM_NAME_LEN];
	CHAR		LoreName[LORE_NAME_LEN];
	BYTE		Unknown0174[18];
	DWORD		Unknown0192;
	DWORD		EquipableSlots;
	DWORD		Cost;
	DWORD		ItemNumber;
	DWORD		IconNumber;
	DWORD		EquipSlot;
	BYTE		Unknown0216;
	BYTE		Unknown0217[11];
	DWORD		NonSellable;
	BYTE		Unknown0232;
	BYTE		Weight;
	BYTE		NoRent;
	BYTE		NoDrop;
	BYTE		Size;
	BYTE		Type;
	BYTE		Unknown0238[2];
	union {
		COMMON    Common;
		CONTAINER Container;
		BOOK      Book;
	};
} ITEMINFO, *PITEMINFO;

Code: Select all

typedef struct _COMMON {
	LONG		HP;
	LONG		Mana;
	LONG		AC;
	BYTE Unknown0012[64];
	BYTE		SvMagic;
	BYTE		SvFire;
	BYTE		SvCold;
	BYTE		SvDisease;
	BYTE		SvPoison;
	BYTE		DEX;
	BYTE		INT;
	BYTE		AGI;
	BYTE		STR;
	BYTE		STA;
	BYTE		CHA;
	BYTE		WIS;
	BYTE		CountMultiplier;
	BYTE		EffectType;
    BYTE		Range;
    BYTE		Skill;
	BYTE		Magic;
    BYTE CastingLevel0;
    BYTE Material;
    BYTE Unknown0095;
    BYTE		Light;
    BYTE		Delay;
    BYTE		Damage;
    BYTE Unknown0099;
	BYTE		ColorBlue;
	BYTE		ColorGreen;
	BYTE		ColorRed;
	BYTE Unknown0103;
    DWORD		Classes;
    DWORD		Races;
	BYTE		Unknown0112[4];
    DWORD		SpellIdOther;
	BYTE Stackable;
    BYTE CastingLevel;
	union {
		BYTE StackCount;
        BYTE Charges;
    };
	BYTE		Unknown0364;
	DWORD		SpellId;
	DWORD		Unknown0128;
	BYTE		Unknown0132[8];
	union {
		DWORD	SizeType;
		DWORD	CastTime;
	};
} COMMON, *PCOMMON;
End of line...
By the pricking of my thumb, something wicked this way comes...

User avatar
L124RD
Site Admin
Site Admin
Posts: 1343
Joined: Fri Jun 14, 2002 12:15 am
Location: Cyberspace
Contact:

Post by L124RD » Wed Apr 16, 2003 11:53 pm

Salutations,
NT, we love you...
DKAA: Make sure this goes to CVS (provided when you install it it works, no offense to your skills NT)