修改时间容器前

This commit is contained in:
2022-06-20 03:10:33 +08:00
parent ff48fc1d25
commit e17ffc3965
9 changed files with 116 additions and 73 deletions

View File

@@ -38,16 +38,18 @@ void _fastcall hook::H_Register_DrawCode(DWORD thisc, int Seat, int a3, int a4,
//特殊
if (a3 == 9999 && a4 == 9998)
{
uint32_t v = GetSqVm();
SQPushRootTable(v);
SQPushString(v, L"DrawMainMaxLayerCustomUI", -1);
SQ_Get(v, -2);
SQPushRootTable(v);
SQPushString(v, L"Lenheart", -1);
SQ_Call(v, 2, 1, 0);
SQ_Call(v, 2, 0, 0);
SQPop(v, 2);
//int num = SQGetTop(v);
//std::cout << num << std::endl;
for (DrawCodestruct iter : DrawCodeT2_STL)
{
//wchar_t* str = DNFTOOL::charTowchar_t((char*)iter.str.c_str());
@@ -58,16 +60,36 @@ void _fastcall hook::H_Register_DrawCode(DWORD thisc, int Seat, int a3, int a4,
//选角色
if (a3 == 9999 && a4 == 9489)
{
static bool Init = false;
if (!Init)
{
InitGameScript();//调用初始化程序
Init = true;
}
uint32_t v = GetSqVm();
SQPushRootTable(v);
SQPushString(v, L"InitLenheartClass", -1);
SQ_Get(v, -2);
SQPushRootTable(v);
SQPushString(v, L"Lenheart", -1);
SQ_Call(v, 2, 1, 0);
SQ_Call(v, 2, 0, 0);
SQPop(v, 2);
}
#if defined MONSTER_BLOOD_UI
if (a4 == 100 || a4 == 107 || a4 == 99)
{
//if (a3 == 37 || a3 == 100 || a3 == 74 || a3 == 70)
//{
a3 = 5000;
a4 = 5000;
//}
}
#endif
//std::cout << "xPos:" << a3 << "yPos:" << a4 <<std::endl;
//thisc = 0;
return DrawCodeF(thisc, Seat, a3, a4, a5, a6);
}
@@ -95,7 +117,6 @@ int hook::RegisterHook()
int hook::InitGameScript()
{
#if defined LOCALHOSTS_SWITCH
uint32_t v = GetSqVm();
SQPushRootTable(v);
@@ -112,7 +133,7 @@ int hook::InitGameScript()
SQ_Get(v, -2);
SQPushRootTable(v);
SQPushString(v, L"licbylist.dll", -1);
SQ_Call(v, 2, 1, 0);
SQ_Call(v, 2, 0, 0);
SQPop(v, 2);
#endif
return 0;