adapt: adapt 1.20.72

This commit is contained in:
Tsubasa6848
2024-03-27 21:25:18 +08:00
Unverified
parent 458e2915fe
commit 4948992bb2
4 changed files with 15 additions and 2 deletions
+8
View File
@@ -24,6 +24,14 @@ auto enable(ll::plugin::NativePlugin& /*self*/) -> bool {
auto load(ll::plugin::NativePlugin& self) -> bool { auto load(ll::plugin::NativePlugin& self) -> bool {
selfPluginInstance = std::make_unique<std::reference_wrapper<ll::plugin::NativePlugin>>(self); selfPluginInstance = std::make_unique<std::reference_wrapper<ll::plugin::NativePlugin>>(self);
initPlugin(); initPlugin();
if (GMLIB::Version::getProtocolVersion() != TARGET_PROTOCOL) {
logger.error(tr("error.protocolMismatch.info"));
logger.error(
tr("error.protocolMismatch.version",
{std::to_string(TARGET_PROTOCOL), std::to_string(GMLIB::Version::getProtocolVersion())})
);
return false;
}
initPlayerDataCache(); initPlayerDataCache();
return true; return true;
} }
+1
View File
@@ -2,6 +2,7 @@
#include <include_all.h> #include <include_all.h>
#define PLUGIN_NAME "InventoryCheck" #define PLUGIN_NAME "InventoryCheck"
#define TARGET_PROTOCOL 662
extern ll::Logger logger; extern ll::Logger logger;
+4
View File
@@ -49,6 +49,8 @@ std::string defaultLanguage_en_US = R"(
checkAll.empty=You've played the entire archive alone, and you're still playing here to check the bag? \nWhy don't you go and recruit people? checkAll.empty=You've played the entire archive alone, and you're still playing here to check the bag? \nWhy don't you go and recruit people?
resumeInventory.success=Your backpack has been resumed! resumeInventory.success=Your backpack has been resumed!
resumeInventory.failed=Unable to resume your backpack, no data was found on your backpack! resumeInventory.failed=Unable to resume your backpack, no data was found on your backpack!
error.protocolMismatch.info=You are running on an unsupport protocol version! This may result in crash!
error.protocolMismatch.version=Support protocol %1$s, current protocol %2$s.
)"; )";
std::string defaultLanguage_zh_CN = R"( std::string defaultLanguage_zh_CN = R"(
@@ -99,4 +101,6 @@ std::string defaultLanguage_zh_CN = R"(
checkAll.empty=\n还不快去招人 checkAll.empty=\n还不快去招人
resumeInventory.success= resumeInventory.success=
resumeInventory.failed= resumeInventory.failed=
error.protocolMismatch.info=
error.protocolMismatch.version= %1$s %2$s
)"; )";