_SPAWNINFO -- fixed for 8/26 build

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

_SPAWNINFO -- fixed for 8/26 build

Post by Amadeus » Sat Aug 30, 2003 9:46 pm

I am not terribly good with the Speed* variables in this, so I just guessed so that code in the rest of MQ would work properly. However, this struct will at least fix the Y,X,Z locations.

Only the things marked as "probably wrong" or "definately wrong" are NOT working..the rest should be working as intended. This struct was probably not overhauled recently because everything else other than Y,X,Z were working just fine ..it was just the first part of the struct that was messed with.

Code: Select all

typedef struct _SPAWNINFO {
/*0x000*/   BYTE    Unknown0x000;
/*0x001*/   CHAR    Name[64];
/*0x041*/   BYTE    Unknown0x041[7];
/*0x048*/	FLOAT	Y;
/*0x04c*/	FLOAT	X;
/*0x050*/	FLOAT	Z;
/*0x054*/	FLOAT	SpeedY;  //probably wrong
/*0x058*/	FLOAT	SpeedX;	 //probably wrong
/*0x05c*/	FLOAT	SpeedZ;	 //probably wrong
/*0x060*/	FLOAT	SpeedRun; //probably wrong
/*0x064*/	FLOAT	UnknownData0x064;
/*0x068*/	FLOAT	SpeedHeading; //probably wrong
/*0x06c*/	FLOAT	CameraAngle; //probably wrong
/*0x070*/	FLOAT	Heading; //definately wrong
/*0x074*/	BYTE	Unknown0x074[16];
/*0x084*/   PACTORINFO   pActorInfo;
/*0x088*/   BYTE    Unknown0x088[5];
/*0x08d*/	BYTE	Linkdead;
/*0x08e*/   BYTE    Unknown0x08e;
/*0x08f*/   BYTE    LFG;
/*0x090*/   BYTE    Unknown0x090[76];
/*0x0dc*/   DWORD   Zone;
/*0x0e0*/   DWORD   Unknown0x0e0;		// This is a pointer to a structure of some sort(?).  
/*0x0e4*/   struct  _SPAWNINFO *pNext;
/*0x0e8*/   PCHARINFO   pCharInfo;
/*0x0ec*/   BYTE    Unknown0x0ec[4];
/*0x0f0*/   struct  _SPAWNINFO *pPrev;
/*0x0f4*/   DWORD   Unknown0x0f4;
/*0x0f8*/   CHAR    Lastname[32];
/*0x118*/   BYTE    Unknown0x118[8];
/*0x120*/   FLOAT   Unknownf0x120; 
/*0x124*/   FLOAT   Unknownf0x124;		// Possible ModelHeightOffset
/*0x128*/   FLOAT   Unknownf0x128;		// Possible CameraHeightOffset
/*0x12c*/   FLOAT   Unknownf0x12c;
/*0x130*/   FLOAT   Unknownf0x130;		
/*0x134*/   BYTE    Type;				// 0-player, 1-npc, 2-corpse, 3-any, 4-pet
/*0x135*/   BYTE    Unknown0x135[3];
/*0x138*/	DWORD	Unknown0x138;		// see Unknown0x0e0 notes
/*0x13c*/   BYTE    Level;
/*0x13d*/   BYTE    Unknown0x13d;		
/*0x13e*/   BYTE    Gender;				// ??
/*0x13f*/   BYTE    Unknown0x13f;
/*0x140*/   BYTE    HideMode;			//1=hidden 2=invis? 3=invis versus undead 4=invis v animals
/*0x141*/   BYTE    StandState;			
/*0x142*/   BYTE    Class;
/*0x143*/   BYTE    Light;		
/*0x144*/   BYTE    Unknown0x144;
/*0x145*/   BYTE    Unknown0x145;
/*0x146*/   BYTE    GM;
/*0x147*/   BYTE    Unknown0x147;		//Fluxuates
/*0x148*/   DWORD   SpawnID;
/*0x14c*/   DWORD   MasterID;
/*0x150*/   DWORD   Race;
/*0x154*/   DWORD   Anon;
/*0x158*/   DWORD   AARank;
/*0x15c*/   DWORD   AFK;
/*0x160*/   DWORD   VisType;
/*0x164*/   DWORD   HPCurrent;
/*0x168*/   BYTE    Unknown0x168[8];
/*0x170*/   DWORD   Deity;				
/*0x174*/   DWORD   HPMax;
/*0x178*/   DWORD   GuildID;
/*0x17c*/   BYTE    Unknown0x17c[20];
} SPAWNINFO, *PSPAWNINFO; 

Example:

Code: Select all

0:010> !c:\games\macroquest-dev\mqext\release\mqext.pspawn 06541cc0

Name = Amadeus (offset 0x1)
Y = -495.226654 (offset 0x48)
X = -1903.046387 (offset 0x4c)
Z = 119.037895 (offset 0x50)
SpeedY = 0.000000 (offset 0x54)
SpeedX = 0.000000 (offset 0x58)
SpeedZ = 0.000000 (offset 0x5c)
SpeedRun = 0.000000 (offset 0x60)
SpeedHeading = 0.000000 (offset 0x68)
CameraAngle = 0.000000 (offset 0x6c)
Heading = 0.000000 (offset 0x70)
pActorInfo = 99696376 (offset 0x84)
LFG = 0 (offset 0x8f)
Zone = 33 (offset 0xdc)
pNext = 0 (offset 0xe4)
pCharInfo = 99644456 (offset 0xe8)
pPrev = 105812208 (offset 0xf0)
Lastname =  (offset 0xf8)
Unknownf0x120 = 0.700000 (offset 0x120)
Unknownf0x124 = 6.200000 (offset 0x124)
Unknownf0x128 = 3.125000 (offset 0x128)
Unknownf0x12c = 5.000000 (offset 0x12c)
Unknownf0x130 = 0.460000 (offset 0x130)
Type = 0 (offset 0x134)
Light = 5 (offset 0x143)
Level = 65 (offset 0x13c)
Gender = 0 (offset 0x13e)
HideMode = 0 (offset 0x140)
StandState = 100 (offset 0x141)
Class = 6 (offset 0x142)
GM = 0 (offset 0x146)
SpawnID = 2430 (offset 0x148)
MasterID = 0 (offset 0x14c)
Race = 4 (offset 0x150)
Anon = 2 (offset 0x154)
AARank = 0 (offset 0x158)
AFK = 0 (offset 0x15c)
VisType = 1 (offset 0x160)
HPCurrent = 2791 (offset 0x164)
Deity = 215 (offset 0x170)
HPMax = 2791 (offset 0x174)
GuildID = 87 (offset 0x178)