The function, GetFullZone was essentually 'hacked' to make work even though the structure/offset was not lining up before. So, I have included a fixed version of that function below. If should replace the one currently found in EQLib.cpp once this structure is introduced.
Code: Select all
// 5-15-2003 Amadeus
#define ZONELIST_STARTOFFSET 0x1c
typedef struct _ZONELIST {
/*0x000*/ DWORD Header;
/*0x004*/ DWORD Expansion; // 0=Old World, 1=Kunark, 2=Velious, 3=Luclin, 4=PoP, 5=LoY
/*0x008*/ DWORD Id;
/*0x00c*/ CHAR ShortName[129];
/*0x08d*/ CHAR LongName[259];
/*0x190*/ DWORD Flags; // (ie, N. Qeynos is 7..which is 1|2|4. OOT is 32768, etc)
/*0x194*/ DWORD Id2; // This is Id+2242
/*0x198*/ DWORD PoPValue; // This has something to do with Planes of Power zones.
/*0x19c*/ DWORD MinLevel; // Minimum level to access
/*0x1a0*/ WORD Revamped; // 53=original, 4981=revamped (??)
/*0x1a2*/ WORD Unknown0x1a2[3]; // The 3 values here never changed (53, 257, 8)
} ZONELIST, *PZONELIST;
For EQLib.cpp (replace current GetFullZone() with:
Code: Select all
// ***************************************************************************
// Function: GetFullZone
// Description: Returns a full zone name from a short name
// ***************************************************************************
PCHAR GetFullZone(DWORD ZoneID)
{
PZONELIST *pZone = NULL;
if (!EQADDR_ZONELIST) return NULL;
if (!*EQADDR_ZONELIST) return NULL;
pZone = (PZONELIST*) (((DWORD)*EQADDR_ZONELIST) + ZONELIST_STARTOFFSET);
return (*pZone[ZoneID]).LongName;
}

