1111
This commit is contained in:
parent
5f4ee2ca36
commit
70941036cc
|
|
@ -285,6 +285,9 @@ void DNFTOOL::GMNotice(char* str, int type, int color)
|
|||
_Noticecall(thisc, 0, str, color, type, 0, 0, 0);
|
||||
}
|
||||
|
||||
#if defined LOCALHOSTS_SWITCH
|
||||
|
||||
#else
|
||||
std::string DNFTOOL::GetIP()
|
||||
{
|
||||
httplib::SSLClient Tencword("docs.qq.com");
|
||||
|
|
@ -306,6 +309,7 @@ std::string DNFTOOL::GetIP()
|
|||
else
|
||||
return GetIP();
|
||||
}
|
||||
#endif
|
||||
|
||||
void DNFTOOL::Wchar_tToString(std::string& szDst, wchar_t* wchar)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ void LenheartThread(void)
|
|||
void LenheartThread()
|
||||
{
|
||||
static int 可开始执行判断;
|
||||
std::string Rqip = GetIP();
|
||||
std::string Rqip = DNFTOOL::GetIP();
|
||||
|
||||
|
||||
std::string MyIp;
|
||||
|
|
@ -71,7 +71,7 @@ void LenheartThread()
|
|||
else
|
||||
{
|
||||
wchar_t* wgameip = (wchar_t*)0x1AE9CEC;
|
||||
Wchar_tToString(ippack, wgameip);
|
||||
DNFTOOL::Wchar_tToString(ippack, wgameip);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
|
||||
|
||||
#define LOCALHOSTS_SWITCH "本地免验证 开启"
|
||||
//#define LOCALHOSTS_SWITCH "本地免验证 开启"
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ int squirrel::SQloadfile(uint32_t v, const wchar_t* filename, bool printerror)
|
|||
DNFTOOL::UnicodeToAnsi(filename, fname, size);
|
||||
|
||||
FILE* file;
|
||||
file = fopen(fname, "rb+");
|
||||
file = fopen(fname, "rb");
|
||||
LSQLEXREADFUNC func = SQ_io_file_lexfeed_ASCII;
|
||||
if (file)
|
||||
{
|
||||
|
|
@ -22,13 +22,14 @@ int squirrel::SQloadfile(uint32_t v, const wchar_t* filename, bool printerror)
|
|||
rewind(file);
|
||||
|
||||
//申请一块能装下整个文件的空间
|
||||
char* ar = (char*)malloc(sizeof(char) * size);
|
||||
char* ar = (char*)malloc(sizeof(char) * size + 256);
|
||||
//读文件,每次读一个,共读size次
|
||||
fread(ar, 1, size, file);
|
||||
|
||||
int skey[] = { 5,2,3,5,0 };//定义解密数组
|
||||
ar[size] = '\0';
|
||||
int skey[] = Skey;//定义解密数组
|
||||
|
||||
Cutecode(ar, skey);//解密
|
||||
fclose(file);//关闭文件
|
||||
|
||||
FILE* outfile;
|
||||
outfile = fopen("ImagePacks2/sprite_interface_teart_zero.npk", "wb+");
|
||||
|
|
@ -38,12 +39,11 @@ int squirrel::SQloadfile(uint32_t v, const wchar_t* filename, bool printerror)
|
|||
fclose(outfile);//关闭文件
|
||||
free(ar);//释放内存
|
||||
|
||||
SQFILE* newfile = SQfopen(L"ImagePacks2/sprite_interface_teart_zero.npk", L"rb+");//定义新的文件流
|
||||
SQFILE* newfile = SQfopen(L"ImagePacks2/sprite_interface_teart_zero.npk", L"rb");//定义新的文件流
|
||||
|
||||
SQfseek(newfile, 0, 2);//定位到头
|
||||
if (SQ_Compile(v, func, newfile, filename, printerror) >= 0)
|
||||
{
|
||||
fclose(file);//关闭文件
|
||||
SQ__Fclose(newfile);//关闭文件
|
||||
remove("ImagePacks2/sprite_interface_teart_zero.npk");//删除文件
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue