111
This commit is contained in:
@@ -52,6 +52,8 @@ SUBHOOK_INIT(SetUserMaxLevel, 0x0868fec8);
|
||||
SUBHOOK_INIT(initWorldMapScript, 0x0817B950);
|
||||
SUBHOOK_INIT(cusermake_basic_info, 0x0865A44E);
|
||||
|
||||
SUBHOOK_INIT(Neof_startupGlobalInstances, 0x0829F7C5);
|
||||
|
||||
// SUBHOOK_INIT(AddMob, 0x08151612);
|
||||
|
||||
//_setCharacInfoDetail
|
||||
@@ -788,6 +790,14 @@ int _cusermake_basic_info(void *a1, char *a2, char a3)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int _Neof_startupGlobalInstances()
|
||||
{
|
||||
int ret = Neof_startupGlobalInstances();
|
||||
// 初始化松鼠
|
||||
InitSquirrel();
|
||||
return ret;
|
||||
}
|
||||
|
||||
int _TimerDispatcher_dispatch(void *A, void *B)
|
||||
{
|
||||
int ret = TimerDispatcher_dispatch(A, B);
|
||||
@@ -819,27 +829,24 @@ void Lenheart()
|
||||
|
||||
if (!checkGame("df_game_r"))
|
||||
{
|
||||
// 初始化松鼠
|
||||
InitSquirrel();
|
||||
// // 执行虚拟机Main函数
|
||||
// SQInteger top = sq_gettop(v); // saves the stack size before the call
|
||||
// SQInteger MaxLevel = 70;
|
||||
// sq_pushroottable(v); // pushes the global table
|
||||
// sq_pushstring(v, _SC("Cb_get_ServerMaxLevel"), -1);
|
||||
// if (SQ_SUCCEEDED(sq_get(v, -2)))
|
||||
// { // gets the fie123oo' from the global table
|
||||
// sq_pushroottable(v); // push the 'this' (in this case is the global table)
|
||||
// sq_call(v, 1, SQTrue, SQTrue); // calls the function
|
||||
// sq_getinteger(v, -1, &MaxLevel);
|
||||
// }
|
||||
// sq_settop(v, top); // restores the original stack size
|
||||
|
||||
// 执行虚拟机Main函数
|
||||
SQInteger top = sq_gettop(v); // saves the stack size before the call
|
||||
SQInteger MaxLevel = 70;
|
||||
sq_pushroottable(v); // pushes the global table
|
||||
sq_pushstring(v, _SC("Cb_get_ServerMaxLevel"), -1);
|
||||
if (SQ_SUCCEEDED(sq_get(v, -2)))
|
||||
{ // gets the fie123oo' from the global table
|
||||
sq_pushroottable(v); // push the 'this' (in this case is the global table)
|
||||
sq_call(v, 1, SQTrue, SQTrue); // calls the function
|
||||
sq_getinteger(v, -1, &MaxLevel);
|
||||
}
|
||||
sq_settop(v, top); // restores the original stack size
|
||||
|
||||
int a = 1;
|
||||
void *buf = malloc(4);
|
||||
CMem::WriteBytes(buf, &a, 4);
|
||||
unsigned int nMaxGrade = MaxLevel;
|
||||
bGMMode = 1;
|
||||
// int a = 1;
|
||||
// void *buf = malloc(4);
|
||||
// CMem::WriteBytes(buf, &a, 4);
|
||||
// unsigned int nMaxGrade = MaxLevel;
|
||||
// bGMMode = 1;
|
||||
|
||||
// max_level = nMaxGrade;
|
||||
|
||||
@@ -859,7 +866,7 @@ void Lenheart()
|
||||
// // fixbug
|
||||
// CMem::WriteUChar(MAIN_OFFSET(0x31C128), 0x7E);
|
||||
// CMem::WriteUChar(MAIN_OFFSET(0x31C129), 0x06);
|
||||
|
||||
/*
|
||||
CMem::WriteUChar(MAIN_OFFSET(0x547005), nMaxGrade);
|
||||
CMem::WriteUChar(MAIN_OFFSET(0x61AF55), nMaxGrade);
|
||||
CMem::WriteUChar(MAIN_OFFSET(0x61B0F3), nMaxGrade);
|
||||
@@ -892,8 +899,7 @@ void Lenheart()
|
||||
CMem::WriteUChar(MAIN_OFFSET(0x61B8F6), nMaxGrade);
|
||||
CMem::WriteUChar(MAIN_OFFSET(0x622659), nMaxGrade);
|
||||
CMem::WriteUChar(MAIN_OFFSET(0x622941), nMaxGrade);
|
||||
CMem::WriteUChar(MAIN_OFFSET(0x622941), nMaxGrade);
|
||||
|
||||
*/
|
||||
// SUBHOOK_SETUP(addServerHackCnt);
|
||||
// SUBHOOK_SETUP(put_header);
|
||||
// SUBHOOK_SETUP(IsCurCharacVisible);
|
||||
@@ -905,6 +911,7 @@ void Lenheart()
|
||||
// SUBHOOK_SETUP(isGM1);
|
||||
// SUBHOOK_SETUP(GetPvPTeamCount);
|
||||
// SUBHOOK_SETUP(set_add_info);
|
||||
SUBHOOK_SETUP(Neof_startupGlobalInstances);
|
||||
SUBHOOK_SETUP(reach_game_world);
|
||||
SUBHOOK_SETUP(Leninsert_user);
|
||||
SUBHOOK_SETUP(LenGetTimerMess);
|
||||
@@ -948,8 +955,7 @@ void Lenheart()
|
||||
|
||||
// CMem::HookJmp(0x86c2994, (int)insert_user_send_to_all);
|
||||
|
||||
Controller::Get()
|
||||
->init();
|
||||
Controller::Get()->init();
|
||||
|
||||
// SUBHOOK_SETUP(isSocketAvatar);
|
||||
|
||||
|
||||
@@ -119,4 +119,6 @@ typedef int (*fninitWorldMapScript)(void *a1, void *a2, void *a3);
|
||||
|
||||
typedef int (*fncusermake_basic_info)(void *a1, void *a2, char a3);
|
||||
|
||||
typedef int (*fnNeof_startupGlobalInstances)();
|
||||
|
||||
__END_DECLS
|
||||
Reference in New Issue
Block a user