• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

Some function for DerbyManager

Status
Not open for further replies.
Newbie Spellweaver
Joined
Sep 1, 2006
Messages
28
Reaction score
0
int __fastcall CDerbyManager__LoadDerbyHistory(int a1)
{
char ST10_1_0; // ST10_1@0
char v3; // [sp+Ch] [bp-60h]@1
int v4; // [sp+68h] [bp-4h]@1
int v5; // [sp+60h] [bp-Ch]@1
int v6; // [sp+5Ch] [bp-10h]@1
signed int v7; // [sp+54h] [bp-18h]@4
int v8; // [sp+64h] [bp-8h]@15
int v9; // [sp+4Ch] [bp-20h]@19
int v10; // [sp+50h] [bp-1Ch]@19
int v11; // [sp+58h] [bp-14h]@34
memset(&v3, -858993460, 0x60u);
v4 = a1;
j_DebugPrint();
v5 = fopen("C:\\A3Log\\DerbyHistory1.dat", "rb");
v6 = fopen("C:\\A3Log\\DerbyHistory2.dat", "rb");
do
{
if ( !v5 && !v6 )
{
j_CDerbyManager__InitializeMonsterInfo();
*(_DWORD *)v4 = 48360;
*(_DWORD *)(v4 + 8188) = 0;
v7 = 0;
while ( v7 < 4200 )
{
j_CDerbyManager__BuildEntryList();
++*(_DWORD *)v4;
if ( *(_DWORD *)v4 == 52561 )
*(_DWORD *)v4 = 1;
j_CDerbyManager__BuildVelocityCurve();
j_CDerbyManager__CalculateResult();
++v7;
}
*(_DWORD *)(v4 + 8180) = 2;
*(_DWORD *)(v4 + 4) = 11;
v7 = 0;
while ( v7 < 15 )
*(_DWORD *)(v4 + 4 * v7++ + 8196) = 100;
j_CDerbyManager__SaveDerbyHistory();
return _chkesp();
}
if ( v5 || !v6 )
{
if ( !v5 || v6 )
{
fread(&v9, 4, 1, v5);
fread(&v10, 4, 1, v6);
if ( abs(v9 - v10) == 1 )
{
if ( v9 <= v10 )
{
*(_DWORD *)(v4 + 8180) = 2;
v8 = v6;
*(_DWORD *)(v4 + 8184) = v10;
}
else
{
*(_DWORD *)(v4 + 8180) = 1;
v8 = v5;
*(_DWORD *)(v4 + 8184) = v9;
}
}
else
{
if ( v10 * v9 || !(v10 + v9) )
{
if ( v9 <= v10 )
{
*(_DWORD *)(v4 + 8180) = 2;
v8 = v6;
*(_DWORD *)(v4 + 8184) = v10;
}
else
{
*(_DWORD *)(v4 + 8180) = 1;
v8 = v5;
*(_DWORD *)(v4 + 8184) = v9;
}
j_Print("timestamp ERROR in logged file. Delete the older one please...", ST10_1_0);
}
else
{
if ( v9 )
{
*(_DWORD *)(v4 + 8180) = 2;
v8 = v6;
*(_DWORD *)(v4 + 8184) = v10;
}
else
{
*(_DWORD *)(v4 + 8180) = 1;
v8 = v5;
*(_DWORD *)(v4 + 8184) = v9;
}
}
}
}
else
{
*(_DWORD *)(v4 + 8180) = 1;
v8 = v5;
fread(v4 + 8184, 4, 1, v5);
}
}
else
{
*(_DWORD *)(v4 + 8180) = 2;
v8 = v6;
fread(v4 + 8184, 4, 1, v6);
}
fread(v4, 4, 1, v8);
fread(v4 + 8, 10, 32, v8);
fread(v4 + 8008, 10, 5, v8);
fread(v4 + 8188, 4, 1, v8);
fread(v4 + 8192, 4, 1, v8);
fread(v4 + 328, 16, 480, v8);
fread(v4 + 4, 4, 1, v8);
fread(v4 + 8196, 4, 15, v8);
fread(v4 + 8060, 4, 30, v8);
fread(&v11, 4, 1, v8);
if ( v11 != *(_DWORD *)(v4 + 8184) )
{
j_Print("invalid history file", ST10_1_0);
fseek(v8, 0, 0);
if ( v5 )
fseek(v5, 0, 0);
if ( v6 )
fseek(v6, 0, 0);
if ( v8 == v5 )
{
fclose(v5);
v5 = 0;
}
if ( v8 == v6 )
{
fclose(v6);
v6 = 0;
}
}
}
while ( v11 != *(_DWORD *)(v4 + 8184) );
*(_BYTE *)(v4 + 8316) = 0;
if ( v5 )
fclose(v5);
if ( v6 )
fclose(v6);
return _chkesp();
}

//=============================================

Sorry my friend I don't know about it !
 
Joined
Jul 19, 2006
Messages
1,178
Reaction score
40
Well, what is important is not what the DerbyManager does.. The important things is how it synchornises with the Zoneserver. Thats the hard part!

But form where have you got the source?
 
Newbie Spellweaver
Joined
Sep 1, 2006
Messages
28
Reaction score
0
DerbyManager = Dog race //in your mean
and this function use in ZoneServer205

Sorry my friend.
 
Joined
Jul 19, 2006
Messages
1,178
Reaction score
40
Zoneserver 205?? Derby and Lotto isnt a part of Zoneserver Episode III. It is carried out in a separate server called Gaming Server or CGS or GS. When you run the Zoneserver, you will find CG=0 which resembles Center Gaming Server. We dont have it and so its shows 0 there. Even if you look into the screenies, the compile date of Gaming Server is as of the original 202 Zoneserver or even older than that!
 
Newbie Spellweaver
Joined
Sep 1, 2006
Messages
28
Reaction score
0
Zoneserver 205?? Derby and Lotto isnt a part of Zoneserver Episode III. It is carried out in a separate server called Gaming Server or CGS or GS. When you run the Zoneserver, you will find CG=0 which resembles Center Gaming Server. We dont have it and so its shows 0 there. Even if you look into the screenies, the compile date of Gaming Server is as of the original 202 Zoneserver or even older than that!

Please see this function, it's same your mean?
=======================================================
int __thiscall CCenterGameServer__RunServer(int this, int a2)
{
char v3; // [sp+Ch] [bp-44h]@1
int v4; // [sp+4Ch] [bp-4h]@1
memset(&v3, -858993460, 0x44u);
v4 = this;
if ( *(_DWORD *)(this + 16) )
{
(*(int (__thiscall **)(int))(*(_DWORD *)v4 + 24))(v4);
_chkesp();
}
*(_DWORD *)(v4 + 20) = a2;
*(_DWORD *)(v4 + 16) = 1;
*(_DWORD *)(v4 + 4194380) = 0;
*(_DWORD *)(v4 + 4194376) = 0;
*(int *)((char *)&dword_800078 + v4) = 1;
j_CBaseServer__ResizeSNDBUF(0);
j_CBaseServer__ResizeRCVBUF(0);
if ( g_MaxMap > 23 )
{
if ( *(_BYTE *)(g_MapZoneInfo + 23) == (unsigned __int8)g_byThisServerID )
{
send(*(_DWORD *)(v4 + 20), Msg_Z2CG_Ask_Derby_Info, 4, 0);
_chkesp();
}
}
if ( *(_BYTE *)(g_MapZoneInfo + 1) == (unsigned __int8)g_byThisServerID
|| *(_BYTE *)(g_MapZoneInfo + 7) == (unsigned __int8)g_byThisServerID )
{
send(*(_DWORD *)(v4 + 20), Msg_Z2CG_Ask_Lotto_Info, 4, 0);
_chkesp();
}
j_CBaseServer__SetNetEvent();
j_CBaseServer__InitSendThread();
return _chkesp();
}
 
Status
Not open for further replies.
Back
Top