Adapt to 1.20.0
This commit is contained in:
+2
-2
@@ -47,13 +47,13 @@ void PluginInit(){
|
|||||||
cout << R"( )" << endl;
|
cout << R"( )" << endl;
|
||||||
cout << R"( )" << endl;
|
cout << R"( )" << endl;
|
||||||
if(GetSystemDefaultLangID() == 0x0804){
|
if(GetSystemDefaultLangID() == 0x0804){
|
||||||
logger.info("当前版本 {}.{}.{} ,支持 BDS - 1.19.6x ,版本协议 {}",PLUGIN_VERSION_MAJOR,PLUGIN_VERSION_MINOR,PLUGIN_VERSION_REVISION,TARGET_BDS_PROTOCOL_VERSION);
|
logger.info("当前版本 {}.{}.{}",PLUGIN_VERSION_MAJOR,PLUGIN_VERSION_MINOR,PLUGIN_VERSION_REVISION);
|
||||||
logger.info("插件作者 Tsubasa6848");
|
logger.info("插件作者 Tsubasa6848");
|
||||||
logger.info("正在加载 Cleaner ...");
|
logger.info("正在加载 Cleaner ...");
|
||||||
logger.info("这个插件是免费的,如果你花钱了,请立即差评并要求RNM退钱。");
|
logger.info("这个插件是免费的,如果你花钱了,请立即差评并要求RNM退钱。");
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
logger.info("Current Version: {}.{}.{} , support BDS - 1.19.6x , protocal version {}",PLUGIN_VERSION_MAJOR,PLUGIN_VERSION_MINOR,PLUGIN_VERSION_REVISION,TARGET_BDS_PROTOCOL_VERSION);
|
logger.info("Current Version: {}.{}.{}",PLUGIN_VERSION_MAJOR,PLUGIN_VERSION_MINOR,PLUGIN_VERSION_REVISION);
|
||||||
logger.info("Plugin Author: Tsubasa6848");
|
logger.info("Plugin Author: Tsubasa6848");
|
||||||
logger.info("Loading Cleaner ...");
|
logger.info("Loading Cleaner ...");
|
||||||
logger.info("This plugin is free, and if you paid for it, you must have been scammed.");
|
logger.info("This plugin is free, and if you paid for it, you must have been scammed.");
|
||||||
|
|||||||
+3
-27
@@ -41,32 +41,6 @@ void CheckEULA(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CheckProtocolVersion()
|
|
||||||
{
|
|
||||||
|
|
||||||
#ifdef TARGET_BDS_PROTOCOL_VERSION
|
|
||||||
|
|
||||||
auto current_protocol = ll::getServerProtocolVersion();
|
|
||||||
if (TARGET_BDS_PROTOCOL_VERSION != current_protocol)
|
|
||||||
{
|
|
||||||
if(GetSystemDefaultLangID() == 0x0804){
|
|
||||||
logger.error(" 不兼容的BDS版本!插件兼容 BDS-1.19.6x ,版本协议: {}。\n 强制加载可能导致服务器崩溃和发生未知错误,请更换适配的插件版本或使用适配的BDS版本。",TARGET_BDS_PROTOCOL_VERSION);
|
|
||||||
MessageBox(NULL,TEXT("不兼容的BDS版本!\n\n请更换适配的插件版本或使用适配的BDS版本。"),TEXT("Cleaner"),MB_ICONERROR | MB_OK);
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
logger.error("Incompatible BDS version! Plugin Cleaner is compatible with BDS-1.19.6x, protocal version: {}。\n To avoid crash, please update this plugin or use a compatible BDS version!",TARGET_BDS_PROTOCOL_VERSION);
|
|
||||||
MessageBox(NULL,TEXT("Incompatible BDS version!\n\nPlease update this plugin or use a compatible BDS version."),TEXT("Cleaner"),MB_ICONERROR | MB_OK);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
loadConfig();
|
|
||||||
loadLanguage();
|
|
||||||
CheckEULA();
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOL APIENTRY DllMain(HMODULE hModule,
|
BOOL APIENTRY DllMain(HMODULE hModule,
|
||||||
DWORD ul_reason_for_call,
|
DWORD ul_reason_for_call,
|
||||||
LPVOID lpReserved)
|
LPVOID lpReserved)
|
||||||
@@ -96,6 +70,8 @@ extern "C"
|
|||||||
_declspec(dllexport) void onPostInit()
|
_declspec(dllexport) void onPostInit()
|
||||||
{
|
{
|
||||||
std::ios::sync_with_stdio(false);
|
std::ios::sync_with_stdio(false);
|
||||||
CheckProtocolVersion();
|
loadConfig();
|
||||||
|
loadLanguage();
|
||||||
|
CheckEULA();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+2
-3
@@ -5,13 +5,12 @@
|
|||||||
#define PLUGIN_VERSION_RELEASE 2
|
#define PLUGIN_VERSION_RELEASE 2
|
||||||
|
|
||||||
#define PLUGIN_NAME "Cleaner"
|
#define PLUGIN_NAME "Cleaner"
|
||||||
#define PLUGIN_INTRODUCTION "自定义清理"
|
#define PLUGIN_INTRODUCTION "A Powerful Entity Cleanup Plugin"
|
||||||
#define PLUGIN_AUTHOR "Tsubasa6848"
|
#define PLUGIN_AUTHOR "Tsubasa6848"
|
||||||
#define PLUGIN_VERSION_MAJOR 1
|
#define PLUGIN_VERSION_MAJOR 1
|
||||||
#define PLUGIN_VERSION_MINOR 6
|
#define PLUGIN_VERSION_MINOR 6
|
||||||
#define PLUGIN_VERSION_REVISION 21
|
#define PLUGIN_VERSION_REVISION 40
|
||||||
#define PLUGIN_VERSION_BUILD 0
|
#define PLUGIN_VERSION_BUILD 0
|
||||||
#define TARGET_BDS_PROTOCOL_VERSION 575
|
|
||||||
#define __TO_VERSION_STRING(ver) #ver
|
#define __TO_VERSION_STRING(ver) #ver
|
||||||
#define TO_VERSION_STRING(ver) __TO_VERSION_STRING(ver)
|
#define TO_VERSION_STRING(ver) __TO_VERSION_STRING(ver)
|
||||||
#define PLUGIN_LLVERSION_STATUS ll::Version::Release
|
#define PLUGIN_LLVERSION_STATUS ll::Version::Release
|
||||||
|
|||||||
Reference in New Issue
Block a user