diff --git a/lib/src/dllmain.cpp b/lib/src/dllmain.cpp index a29de46..eb2f88d 100644 --- a/lib/src/dllmain.cpp +++ b/lib/src/dllmain.cpp @@ -9,7 +9,7 @@ HWND unityWnd = nullptr; HANDLE hPipe = nullptr; // Allow Protocol: GetPlayerToken, PlayerLogin, AchievementAllDataNotify, Ping -std::set PacketWhitelist = { 190, 196, 189, 176, 2659, 16, 56, 152 }; +std::set PacketWhitelist = { 175, 196, 102, 172, 2678, 55, 48, 160 }; 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) == 2659) { + if (ReadMapped(data->vector, 2) == 2678) { auto headLength = ReadMapped(data->vector, 4); auto dataLength = ReadMapped(data->vector, 6); auto iStr = Genshin::ToBase64String(data, 10 + headLength, dataLength, nullptr); @@ -106,7 +106,6 @@ void Run(HMODULE* phModule) { if (hPipe == INVALID_HANDLE_VALUE) { Win32ErrorDialog(1001); ExitProcess(0); - return; } } diff --git a/lib/src/il2cpp-api-functions.h b/lib/src/il2cpp-api-functions.h index 1003c54..4625977 100644 --- a/lib/src/il2cpp-api-functions.h +++ b/lib/src/il2cpp-api-functions.h @@ -1 +1 @@ -DO_API(0x897c10, 0x8951f0, Il2CppString*, il2cpp_string_new, (const char* str)); +DO_API(0x92e180, 0x92e1f0, Il2CppString*, il2cpp_string_new, (const char* str)); diff --git a/lib/src/il2cpp-functions.h b/lib/src/il2cpp-functions.h index 8129446..43c98b3 100644 --- a/lib/src/il2cpp-functions.h +++ b/lib/src/il2cpp-functions.h @@ -2,30 +2,30 @@ using namespace Genshin; // DO_APP_FUNC(CN_OFFSET, OS_OFFSET, RETURN, FUNC_NAME, (ARGS...)); -DO_APP_FUNC(0x6790b00, 0x6839fa0, Il2CppString*, ToBase64String, (ByteArray* value, int offset, int length, void* method)); +DO_APP_FUNC(0x68df290, 0x6822570, Il2CppString*, ToBase64String, (ByteArray* value, int offset, int length, void* method)); -DO_APP_FUNC(0x379bb90, 0x3821a40, void, SetVersion, (void* obj, Il2CppString* value, void* method)); +DO_APP_FUNC(0x272fe00, 0x26df410, void, SetVersion, (void* obj, Il2CppString* value, void* method)); -DO_APP_FUNC(0x7040220, 0x70f3890, ByteArray*, RecordUserData, (int32_t nType)); +DO_APP_FUNC(0x710a730, 0x70401b0, ByteArray*, RecordUserData, (int32_t nType)); -DO_APP_FUNC(0xf85bf0, 0xf90450, void, XorEncrypt, (ByteArray** data, int length, void* method)); +DO_APP_FUNC(0x26a7940, 0x2658ae0, void, XorEncrypt, (ByteArray** data, int length, void* method)); -DO_APP_FUNC(0x156e740, 0x158a1e0, int, KcpSend, (void* client, KcpPacket* pkt, void* method)); +DO_APP_FUNC(0x19d99a0, 0x19b12f0, int, KcpSend, (void* client, KcpPacket* pkt, void* method)); -DO_APP_FUNC(0x2ce2040, 0x2d44790, bool, KcpRecv, (void* client, ClientKcpEvent* evt, void* method)); +DO_APP_FUNC(0x306e0e0, 0x3001bf0, bool, KcpRecv, (void* client, ClientKcpEvent* evt, void* method)); -DO_APP_FUNC(0x6a4e700, 0x6afb5e0, LPVOID, GetDefaultEncoding, ()); +DO_APP_FUNC(0x6b832c0, 0x6ac2040, LPVOID, GetDefaultEncoding, ()); -DO_APP_FUNC(0x6a4dfb0, 0x6afae80, Il2CppString*, GetString, (LPVOID encoding, LPVOID bytes)); +DO_APP_FUNC(0x6b82b50, 0x6ac18d0, Il2CppString*, GetString, (LPVOID encoding, LPVOID bytes)); -DO_APP_FUNC(0x6a4ce50, 0x6af9d50, ByteArray*, GetBytes, (LPVOID encoding, LPVOID str)); +DO_APP_FUNC(0x6b81980, 0x6ac0760, ByteArray*, GetBytes, (LPVOID encoding, LPVOID str)); -DO_APP_FUNC(0x36a1260, 0x3723bc0, VOID, RequestLogin, (LPVOID obj, LPVOID token, UINT uid)); +DO_APP_FUNC(0x18a0490, 0x187a070, VOID, RequestLogin, (LPVOID obj, LPVOID token, UINT uid)); -DO_APP_FUNC(0x26506b0, 0x1b0c690, VOID, SetChecksum, (LPVOID obj, Il2CppString* value)); +DO_APP_FUNC(0x3669cd0, 0x1b323c0, VOID, SetChecksum, (LPVOID obj, Il2CppString* value)); -DO_APP_FUNC(0xf25990, 0xf2f110, VOID, ForceQuit, (LPVOID obj)); +DO_APP_FUNC(0xed5d70, 0xecc910, VOID, ForceQuit, (LPVOID obj)); -DO_APP_FUNC(0x4aac4c0, 0x4b57410, LPVOID, GetSingletonManager, ()); +DO_APP_FUNC(0x57fb490, 0x574b7f0, LPVOID, GetSingletonManager, ()); -DO_APP_FUNC(0x4aac1f0, 0x4b57140, LPVOID, GetSingletonInstance, (LPVOID obj, Il2CppString* value)); +DO_APP_FUNC(0x57fb1c0, 0x574b520, LPVOID, GetSingletonInstance, (LPVOID obj, Il2CppString* value)); diff --git a/lib/src/il2cpp-unity-functions.h b/lib/src/il2cpp-unity-functions.h index 2fb7951..b1d538a 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(0x100640, 0x100640, ByteArray*, UnityEngine_RecordUserData, (int32_t nType)); +DO_UNI_FUNC(0x1003e0, 0x1003e0, ByteArray*, UnityEngine_RecordUserData, (int32_t nType)); diff --git a/res/proto/AchievementAllDataNotify.proto b/res/proto/AchievementAllDataNotify.proto index e8174d4..33dba70 100644 --- a/res/proto/AchievementAllDataNotify.proto +++ b/res/proto/AchievementAllDataNotify.proto @@ -9,13 +9,13 @@ message Achievement { FINISHED = 2; REWARD_TAKEN = 3; } - uint32 timestamp = 9; - uint32 current = 3; - uint32 total = 4; - uint32 id = 10; - Status status = 2; + uint32 timestamp = 15; + uint32 current = 5; + uint32 total = 14; + uint32 id = 3; + Status status = 10; } message AchievementAllDataNotify { - repeated Achievement list = 11; + repeated Achievement list = 4; } diff --git a/src/GlobalVars.cs b/src/GlobalVars.cs index 7e89e0a..bbe1d51 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 = 37; - public const string AppVersionName = "2.7"; + public const uint AppVersionCode = 38; + public const string AppVersionName = "2.8"; public const string PipeName = "YaeAchievementPipe"; public const string BucketHost = "https://cn-cd-1259389942.file.myqcloud.com";