diff --git a/lib/YaeAchievementLib.vcxproj b/lib/YaeAchievementLib.vcxproj index 2533cdf..a9c704b 100644 --- a/lib/YaeAchievementLib.vcxproj +++ b/lib/YaeAchievementLib.vcxproj @@ -105,7 +105,7 @@ detours-x64.lib;%(AdditionalDependencies) - copy $(TargetPath) $(ProjectDir)..\bin\Debug\net7.0-windows\win-x64\YaeAchievementLib.dll /y + copy $(TargetPath) $(ProjectDir)..\bin\Debug\net8.0-windows\win-x64\YaeAchievementLib.dll /y diff --git a/lib/src/dllmain.cpp b/lib/src/dllmain.cpp index c607784..aa32867 100644 --- a/lib/src/dllmain.cpp +++ b/lib/src/dllmain.cpp @@ -32,7 +32,7 @@ namespace Hook { uint16_t BitConverter_ToUInt16(ByteArray* val, const int startIndex) { const auto ret = CALL_ORIGIN(BitConverter_ToUInt16, val, startIndex); - if (ret == 0xAB89 && ReadMapped(val->vector, 2) == 20248) { + if (ret == 0xAB89 && ReadMapped(val->vector, 2) == 1655) { const auto headLength = ReadMapped(val->vector, 4); const auto dataLength = ReadMapped(val->vector, 6); const auto cStr = base64_encode(val->vector + 10 + headLength, dataLength) + "\n"; diff --git a/lib/src/il2cpp-functions.h b/lib/src/il2cpp-functions.h index 1ddda5e..a0590b9 100644 --- a/lib/src/il2cpp-functions.h +++ b/lib/src/il2cpp-functions.h @@ -2,10 +2,10 @@ using namespace Genshin; // DO_APP_FUNC(CN_OFFSET, OS_OFFSET, RETURN, FUNC_NAME, (ARGS...)); -DO_APP_FUNC(0x569170, 0x568470, LPVOID, il2cpp_object_new, (LPVOID t)); +DO_APP_FUNC(0x57A390, 0x579D00, LPVOID, il2cpp_object_new, (LPVOID t)); -DO_APP_FUNC(0x06C43A80, 0x06775280, ByteArray*, RecordUserData, (int32_t nType)); +DO_APP_FUNC(0x07315A30, 0x0710F580, ByteArray*, RecordUserData, (int32_t nType)); -DO_APP_FUNC(0x0C87B240, 0x0C89EFB0, uint16_t, BitConverter_ToUInt16, (ByteArray* val, int startIndex)); +DO_APP_FUNC(0x0D257150, 0x0D244830, uint16_t, BitConverter_ToUInt16, (ByteArray* val, int startIndex)); -DO_UNI_FUNC(0x105560, 0x105560, ByteArray*, UnityEngine_RecordUserData, (int32_t nType)); +DO_UNI_FUNC(0x10CF80, 0x10CF80, ByteArray*, UnityEngine_RecordUserData, (int32_t nType)); diff --git a/res/proto/AchievementAllDataNotify.proto b/res/proto/AchievementAllDataNotify.proto index 6055ca1..a737783 100644 --- a/res/proto/AchievementAllDataNotify.proto +++ b/res/proto/AchievementAllDataNotify.proto @@ -9,13 +9,13 @@ message Achievement { FINISHED = 2; REWARD_TAKEN = 3; } - uint32 timestamp = 14; - uint32 current = 13; + uint32 timestamp = 13; + uint32 current = 6; uint32 total = 9; - uint32 id = 7; - Status status = 10; + uint32 id = 1; + Status status = 2; } message AchievementAllDataNotify { - repeated Achievement list = 15; + repeated Achievement list = 11; } diff --git a/src/GlobalVars.cs b/src/GlobalVars.cs index ca9b380..271b3d5 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 = 45; - public const string AppVersionName = "3.5"; + public const uint AppVersionCode = 46; + public const string AppVersionName = "3.6"; public const string PipeName = "YaeAchievementPipe"; public const string BucketHost = "https://cn-cd-1259389942.file.myqcloud.com";