* #71
This commit is contained in:
HolographicHat
2023-09-28 18:48:00 +08:00
parent 78bda3f49c
commit f41fe6fb12
7 changed files with 18 additions and 18 deletions

View File

@@ -9,7 +9,7 @@ HWND unityWnd = nullptr;
HANDLE hPipe = nullptr; HANDLE hPipe = nullptr;
// Allow Protocol: GetPlayerTokenRsp, PlayerLoginRsp, AchievementAllDataNotify, PingRsp // Allow Protocol: GetPlayerTokenRsp, PlayerLoginRsp, AchievementAllDataNotify, PingRsp
std::set<UINT16> PacketWhitelist = { 2407, 29665, 27422, 8231 }; std::set<UINT16> PacketWhitelist = { 1347, 4424, 20342, 25731 };
bool OnPacket(KcpPacket* pkt) { bool OnPacket(KcpPacket* pkt) {
if (pkt->data == nullptr) return true; if (pkt->data == nullptr) return true;
@@ -30,7 +30,7 @@ bool OnPacket(KcpPacket* pkt) {
return false; return false;
} }
printf("Passed cmdid: %d\n", ReadMapped<UINT16>(data->vector, 2)); printf("Passed cmdid: %d\n", ReadMapped<UINT16>(data->vector, 2));
if (ReadMapped<UINT16>(data->vector, 2) == 27422) { if (ReadMapped<UINT16>(data->vector, 2) == 20342) {
const auto headLength = ReadMapped<UINT16>(data->vector, 4); const auto headLength = ReadMapped<UINT16>(data->vector, 4);
const auto dataLength = ReadMapped<UINT32>(data->vector, 6); const auto dataLength = ReadMapped<UINT32>(data->vector, 6);
const auto cStr = base64_encode(data->vector + 10 + headLength, dataLength) + "\n"; const auto cStr = base64_encode(data->vector + 10 + headLength, dataLength) + "\n";

View File

@@ -1 +1 @@
DO_API(0x9cc850, 0x9ca750, Il2CppString*, il2cpp_string_new, (const char* str)); DO_API(0x9D1AC0, 0x9CADC0, Il2CppString*, il2cpp_string_new, (const char* str));

View File

@@ -2,14 +2,14 @@ using namespace Genshin;
// DO_APP_FUNC(CN_OFFSET, OS_OFFSET, RETURN, FUNC_NAME, (ARGS...)); // DO_APP_FUNC(CN_OFFSET, OS_OFFSET, RETURN, FUNC_NAME, (ARGS...));
DO_APP_FUNC(0x21e4c70, 0x21bea20, void, SetVersion, (void* obj, Il2CppString* value, void* method)); DO_APP_FUNC(0x258fd40, 0x2548e50, void, SetVersion, (void* obj, Il2CppString* value, void* method));
DO_APP_FUNC(0x3173bb0, 0x3133c50, void, XorEncrypt, (ByteArray** data, int length, void* method)); DO_APP_FUNC(0x3220f00, 0x31c1650, void, XorEncrypt, (ByteArray** data, int length, void* method));
DO_APP_FUNC(0x3d69990, 0x3d12160, bool, KcpRecv, (void* client, ClientKcpEvent* evt, void* method)); DO_APP_FUNC(0x12f5df0, 0x12ddd80, bool, KcpRecv, (void* client, ClientKcpEvent* evt, void* method));
DO_APP_FUNC(0xfa24e0, 0xf994d0, VOID, ForceQuit, (LPVOID obj)); DO_APP_FUNC(0x264ee90, 0x2606720, VOID, ForceQuit, (LPVOID obj));
DO_APP_FUNC(0x72586e0, 0x7207680, LPVOID, GetSingletonManager, ()); DO_APP_FUNC(0x624d630, 0x61bd630, LPVOID, GetSingletonManager, ());
DO_APP_FUNC(0x7258410, 0x72073b0, LPVOID, GetSingletonInstance, (LPVOID obj, Il2CppString* value)); DO_APP_FUNC(0x624d360, 0x61bd360, LPVOID, GetSingletonInstance, (LPVOID obj, Il2CppString* value));

View File

@@ -1,3 +1,3 @@
using namespace Genshin; using namespace Genshin;
DO_UNI_FUNC(0x102fa0, 0x102fa0, ByteArray*, UnityEngine_RecordUserData, (int32_t nType)); DO_UNI_FUNC(0x103420, 0x103420, ByteArray*, UnityEngine_RecordUserData, (int32_t nType));

View File

@@ -116,7 +116,7 @@
<value>网络错误,请检查网络后重试 ({0}: {1})</value> <value>网络错误,请检查网络后重试 ({0}: {1})</value>
</data> </data>
<data name="GenshinHashError" xml:space="preserve"> <data name="GenshinHashError" xml:space="preserve">
<value>请将原神更新至最新版本后重试</value> <value>当前适配版本不匹配,请更新原神至最新版本后重试或等待工具更新。</value>
</data> </data>
<data name="NoWritePermission" xml:space="preserve"> <data name="NoWritePermission" xml:space="preserve">
<value>无法写入文件,请更换软件所在目录后重试</value> <value>无法写入文件,请更换软件所在目录后重试</value>

View File

@@ -9,13 +9,13 @@ message Achievement {
FINISHED = 2; FINISHED = 2;
REWARD_TAKEN = 3; REWARD_TAKEN = 3;
} }
uint32 timestamp = 15; uint32 timestamp = 3;
uint32 current = 14; uint32 current = 14;
uint32 total = 4; uint32 total = 8;
uint32 id = 5; uint32 id = 1;
Status status = 10; Status status = 13;
} }
message AchievementAllDataNotify { message AchievementAllDataNotify {
repeated Achievement list = 9; repeated Achievement list = 2;
} }

View File

@@ -20,8 +20,8 @@ public static class GlobalVars {
public static readonly string CachePath = Path.Combine(DataPath, "cache"); public static readonly string CachePath = Path.Combine(DataPath, "cache");
public static readonly string LibFilePath = Path.Combine(DataPath, "YaeAchievement.dll"); public static readonly string LibFilePath = Path.Combine(DataPath, "YaeAchievement.dll");
public const uint AppVersionCode = 40; public const uint AppVersionCode = 41;
public const string AppVersionName = "3.0"; public const string AppVersionName = "3.1";
public const string PipeName = "YaeAchievementPipe"; public const string PipeName = "YaeAchievementPipe";
public const string BucketHost = "https://cn-cd-1259389942.file.myqcloud.com"; public const string BucketHost = "https://cn-cd-1259389942.file.myqcloud.com";