I tried to find valid coordinates surrounding player in memory, but I failed...
I read from client databases such as DBClient_Map, and got some results:
first, get the map entry
//offset
ptrGetRow_DBClient = 0x005AF0D0; //function GetRow_DBClient
ptrDBClient_Map = 0x00FCF408; //DBClient_Map entry
//get current MapIndex and CurrentMap entry
asm
mov eax, [ptrCurrentConnection]
mov eax, [eax+2864h]
mov eax, [eax+0CCh]
mov MapIndex,eax
mov ecx, ptrDBClient_Map
push eax
mov ebx,ptrGetRow_DBClient
call ebx
mov ptrCurrentMap, eax
end;
second, list the address and values from ptrCurrentMap :
MapIndex=542,ptrMap=4E36FD0
Offset= 0, intValue= 21E, fltValue=0.000000
Offset= 4, intValue= 4F417A0, fltValue=0.000000, sValue=HellfireDemon
Offset= 8, intValue= 1, fltValue=0.000000
Offset= C, intValue= 0, fltValue=0.000000,
Offset= 10, intValue= 4F417AE, fltValue=0.000000, sValue=HellfireDemon
Offset= 14, intValue= E81, fltValue=0.000000
Offset= 18, intValue= 4F40DD8, fltValue=0.000000,
Offset= 1C, intValue= 4F40DD8, fltValue=0.000000,
Offset= 20, intValue= C7, fltValue=0.000000
Offset= 24, intValue=3F800000, fltValue=1.000000
Offset= 28, intValue= 4F40DD8, fltValue=0.000000,
Offset= 2C, intValue= 4F41772, fltValue=0.000000,
Offset= 30, intValue= 4F40DD8, fltValue=0.000000,
Offset= 34, intValue= 212, fltValue=0.000000
Offset= 38, intValue=C393B5AD, fltValue=-295.419342
Offset= 3C, intValue=4544FFE2, fltValue=3151.992676
Offset= 40, intValue= 0, fltValue=0.000000,
Offset= 44, intValue= 15180, fltValue=0.000000
Offset= 48, intValue= 0, fltValue=0.000000,
Offset= 4C, intValue=FFFFFFFF, fltValue= NAN
Offset= 50, intValue= 1, fltValue=0.000000
Offset= 54, intValue= 0, fltValue=0.000000,
Offset= 58, intValue= 21F, fltValue=0.000000
Offset= 5C, intValue= 4F417CD, fltValue=0.000000,sValue=HellfireRampart
Offset= 60, intValue= 1, fltValue=0.000000
Offset= 64, intValue= 0, fltValue=0.000000,
Offset= 68, intValue= 4F417DD, fltValue=0.000000,sValue=HellfireRampart
Offset= 6C, intValue= DEA, fltValue=0.000000
Offset= 70, intValue= 4F40DD8, fltValue=0.000000,
Offset= 74, intValue= 4F40DD8, fltValue=0.000000,
Offset= 78, intValue= C7, fltValue=0.000000
Offset= 7C, intValue=3F800000, fltValue=1.000000
Offset= 80, intValue= 4F40DD8, fltValue=0.000000,
Offset= 84, intValue= 4F41772, fltValue=0.000000,
Offset= 88, intValue= 4F40DD8, fltValue=0.000000,
Offset= 8C, intValue= 212, fltValue=0.000000
Offset= 90, intValue=C3B40662, fltValue=-360.049866
Offset= 94, intValue=453FBE54, fltValue=3067.895508
Offset= 98, intValue= 0, fltValue=0.000000,
Offset= 9C, intValue= 15180, fltValue=0.000000
Offset= A0, intValue= 0, fltValue=0.000000,
Offset= A4, intValue=FFFFFFFF, fltValue= NAN
Offset= A8, intValue= 1, fltValue=0.000000
Offset= AC, intValue= 0, fltValue=0.000000,
Offset= B0, intValue= 220, fltValue=0.000000
Offset= B4, intValue= 4F417F6, fltValue=0.000000,sValue=HellfireRaid
....
these informations are about mapid,mapname,etc, and then I read other dbs,
but there are no values I need.
(When I looked into wmo,m2, I was confused...:confused
So I just want to know, is there any address stored valid coordinates around me?
And, is there any function can return a valid Z coordinate if x,y is knowned?
Appreciate for any help!