Page 1 of 1

COMMON structure *working*

Posted: Fri May 09, 2003 7:42 pm
by Amadeus
Ta da!! See, now if those SEQ folks would help out the less hacker-educated folks, they'd have more people working on structures too ;)

I've tested this with several items, and everything jives with Lucy. I did not have any elemental bane weapons, so I couldn't fill in those values. I have tested this with /identify and it seems to work as intended.

Thanks to eqmule and dont_know_at_all for the postings and help in learning the process by which one finds these things. Discovery is such a rush!

Code: Select all

typedef struct _COMMON {
/*0x00*/	BYTE	SvCold;		
/*0x01*/	BYTE	WIS;	
/*0x02*/	BYTE	SvDisease;  
/*0x03*/	BYTE	SvPoison;  
/*0x04*/   DWORD  Unknown0x04;
/*0x08*/	BYTE   SkillModValue;
/*0x0a*/	BYTE	Unknown0x0a[3];
/*0x0c*/	BYTE	Skill;			// This should be SkillModType as per Lucy.
/*0x0d*/	BYTE	BaneDmgAmt;
/*0x0e*/	BYTE	Unknown0x0e[2];
/*0x10*/	BYTE	BaneDmgRace;
/*0x11*/	BYTE	Unknown0x11[11];
/*0x1c*/   BYTE	DEX;
/*0x1d*/	BYTE	SvMagic;			
/*0x1e*/	BYTE	SvFire;		
/*0x1f*/	BYTE	CHA;
/*0x20*/	DWORD  FactionMod1;	
/*0x24*/	DWORD  FactionMod2;	
/*0x28*/	DWORD  FactionMod3;	
/*0x2c*/	DWORD  FactionMod4;	
/*0x30*/	BYTE	INT;
/*0x31*/	BYTE	Magic;			
/*0x32*/	BYTE	Level;								
/*0x33*/	BYTE	AGI;
/*0x34*/	DWORD  FactionAmt1;
/*0x38*/	DWORD  FactionAmt2;
/*0x3c*/	DWORD  FactionAmt3;
/*0x40*/	DWORD  FactionAmt4;
/*0x44*/	DWORD  RequiredLevel;
/*0x48*/	BYTE	Unknown0x48[8];
/*0x50*/	BYTE	STR;		
/*0x51*/	BYTE	Light;
/*0x52*/	BYTE	Delay;
/*0x53*/	BYTE	STA;
/*0x54*/	LONG	HP;				
/*0x58*/	LONG	Mana;					
/*0x5c*/	LONG	AC;		
/*0x60*/	BYTE	EffectType;
/*0x61*/	BYTE	Range;
/*0x62*/	BYTE	Damage;
/*0x63*/	BYTE	Unknown0x63;
/*0x64*/	DWORD  Color;
/*0x68*/	DWORD  Classes;
/*0x6c*/	DWORD  Races;
/*0x6e*/	BYTE	Unknown0x6e[4];
/*0x74*/	DWORD  SpellId;
/*0x78*/	BYTE	Unknown0x78[2];		
/*0x7a*/	BYTE	Material;
/*0x7b*/	BYTE	Unknown0x7b;
/*0x7c*/	BYTE	Stackable;				// 0=not stackable, 1=stackable (untested)
/*0x7d*/	BYTE	Unknown0x7d;
	union {
/*0x7e*/	BYTE	StackCount;
/*0x7e*/	BYTE	Charges;
	};
/*0x7f*/	BYTE	MaxCharges;			// Unsure...guessing...
/*0x80*/	DWORD  SpellIdOther;				
/*0x84*/	BYTE	Unknown0x84[16];
/*0x94*/	BYTE	RecommendedLevel;
/*0x95*/	BYTE	Unknown0x95[7];
/*0x9c*/	CHAR	CharmFile[32];			//Guessing on Length ATM
	union {
/*0xbc*/	DWORD  SizeType;
/*0xbc*/	DWORD  CastTime;
	};
/*0xbe*/	BYTE	Unknown0xbe[12];
/*0xcc*/	DWORD  FocusId;
/*0xcf*/								   // Untested data at end of structure
} COMMON, *PCOMMON;

Posted: Sat May 10, 2003 5:41 am
by EqMule
now we're talking!

VERY NICE INDEED!, I looked at it a littlebit, this morning, and can indeed say it looks like you got it, thanks now I can put everything into source and try compile.

Posted: Sat May 10, 2003 3:08 pm
by dont_know_at_all
Ok!

I tested all of Amadeus' changes and they look good. (One small problem with the bank offset in the CHARINFO). All these changes are in CVS now.

Thanks, Amadeus!