diff --git a/lib/src/dllmain.cpp b/lib/src/dllmain.cpp index 52e1348..5af644c 100644 --- a/lib/src/dllmain.cpp +++ b/lib/src/dllmain.cpp @@ -9,7 +9,7 @@ HWND unityWnd = nullptr; HANDLE hPipe = nullptr; // Allow Protocol: GetPlayerTokenRsp, PlayerLoginRsp, AchievementAllDataNotify, PingRsp -std::set PacketWhitelist = { 1347, 4424, 20342, 25731 }; +std::set PacketWhitelist = { 1574, 1548, 29462, 2794 }; bool OnPacket(KcpPacket* pkt) { if (pkt->data == nullptr) return true; @@ -30,7 +30,7 @@ bool OnPacket(KcpPacket* pkt) { return false; } printf("Passed cmdid: %d\n", ReadMapped(data->vector, 2)); - if (ReadMapped(data->vector, 2) == 20342) { + if (ReadMapped(data->vector, 2) == 29462) { const auto headLength = ReadMapped(data->vector, 4); const auto dataLength = ReadMapped(data->vector, 6); const auto cStr = base64_encode(data->vector + 10 + headLength, dataLength) + "\n"; diff --git a/lib/src/il2cpp-api-functions.h b/lib/src/il2cpp-api-functions.h index 938e1e1..b8a9c75 100644 --- a/lib/src/il2cpp-api-functions.h +++ b/lib/src/il2cpp-api-functions.h @@ -1 +1 @@ -DO_API(0x9D1AC0, 0x9CADC0, Il2CppString*, il2cpp_string_new, (const char* str)); +DO_API(0x4243d0, 0x420bf0, Il2CppString*, il2cpp_string_new, (const char* str)); diff --git a/lib/src/il2cpp-functions.h b/lib/src/il2cpp-functions.h index 2196a0b..4ba6d1e 100644 --- a/lib/src/il2cpp-functions.h +++ b/lib/src/il2cpp-functions.h @@ -2,20 +2,20 @@ using namespace Genshin; // DO_APP_FUNC(CN_OFFSET, OS_OFFSET, RETURN, FUNC_NAME, (ARGS...)); -DO_APP_FUNC(0x258fd40, 0x2548e50, void, SetVersion, (void* obj, Il2CppString* value, void* method)); +DO_APP_FUNC(0x1929870, 0x1922c30, void, SetVersion, (void* obj, Il2CppString* value, void* method)); -DO_APP_FUNC(0x7c6d0d0, 0x7bde850, ByteArray*, RecordUserData, (int32_t nType)); +DO_APP_FUNC(0x6e7d020, 0x6e38a10, ByteArray*, RecordUserData, (int32_t nType)); -DO_APP_FUNC(0x3220f00, 0x31c1650, void, XorEncrypt, (ByteArray** data, int length, void* method)); +DO_APP_FUNC(0x2b13f40, 0x2b09ce0, void, XorEncrypt, (ByteArray** data, int length, void* method)); -DO_APP_FUNC(0x12f5df0, 0x12ddd80, bool, KcpRecv, (void* client, ClientKcpEvent* evt, void* method)); +DO_APP_FUNC(0x2d79560, 0x2d6e6f0, bool, KcpRecv, (void* client, ClientKcpEvent* evt, void* method)); -DO_APP_FUNC(0x19b6f30, 0x198d6c0, VOID, RequestLogin, (LPVOID obj, LPVOID token, UINT uid)); +DO_APP_FUNC(0x20004f0, 0x1ff8530, VOID, RequestLogin, (LPVOID obj, LPVOID token, UINT uid)); -DO_APP_FUNC(0x29b18f0, 0x2960ec0, VOID, SetChecksum, (LPVOID obj, Il2CppString* value)); +DO_APP_FUNC(0x130ead0, 0x1b90950, VOID, SetChecksum, (LPVOID obj, Il2CppString* value)); -DO_APP_FUNC(0x264ee90, 0x2606720, VOID, ForceQuit, (LPVOID obj)); +DO_APP_FUNC(0x2266e40, 0x225eb50, VOID, ForceQuit, (LPVOID obj)); -DO_APP_FUNC(0x624d630, 0x61bd630, LPVOID, GetSingletonManager, ()); +DO_APP_FUNC(0x60af410, 0x60735f0, LPVOID, GetSingletonManager, ()); -DO_APP_FUNC(0x624d360, 0x61bd360, LPVOID, GetSingletonInstance, (LPVOID obj, Il2CppString* value)); +DO_APP_FUNC(0x60af140, 0x6073320, LPVOID, GetSingletonInstance, (LPVOID obj, Il2CppString* value)); diff --git a/lib/src/il2cpp-unity-functions.h b/lib/src/il2cpp-unity-functions.h index 40efc1a..76b5796 100644 --- a/lib/src/il2cpp-unity-functions.h +++ b/lib/src/il2cpp-unity-functions.h @@ -1,3 +1,3 @@ using namespace Genshin; -DO_UNI_FUNC(0x103420, 0x103420, ByteArray*, UnityEngine_RecordUserData, (int32_t nType)); +DO_UNI_FUNC(0x105550, 0x105550, ByteArray*, UnityEngine_RecordUserData, (int32_t nType)); diff --git a/res/proto/AchievementAllDataNotify.proto b/res/proto/AchievementAllDataNotify.proto index afcc0c7..beefd50 100644 --- a/res/proto/AchievementAllDataNotify.proto +++ b/res/proto/AchievementAllDataNotify.proto @@ -9,13 +9,13 @@ message Achievement { FINISHED = 2; REWARD_TAKEN = 3; } - uint32 timestamp = 3; - uint32 current = 14; - uint32 total = 8; - uint32 id = 1; - Status status = 13; + uint32 timestamp = 11; + uint32 current = 12; + uint32 total = 3; + uint32 id = 15; + Status status = 7; } message AchievementAllDataNotify { - repeated Achievement list = 2; + repeated Achievement list = 8; } diff --git a/src/GlobalVars.cs b/src/GlobalVars.cs index 87855ac..178d222 100644 --- a/src/GlobalVars.cs +++ b/src/GlobalVars.cs @@ -20,8 +20,8 @@ public static class GlobalVars { public static readonly string CachePath = Path.Combine(DataPath, "cache"); public static readonly string LibFilePath = Path.Combine(DataPath, "YaeAchievement.dll"); - public const uint AppVersionCode = 41; - public const string AppVersionName = "3.1"; + public const uint AppVersionCode = 42; + public const string AppVersionName = "3.2"; public const string PipeName = "YaeAchievementPipe"; public const string BucketHost = "https://cn-cd-1259389942.file.myqcloud.com";