mirror of
https://github.com/HolographicHat/Yae.git
synced 2025-12-13 18:08:15 +08:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bf5525d2ea | ||
|
|
cf3749f887 |
@@ -32,7 +32,7 @@ namespace Hook {
|
|||||||
|
|
||||||
uint16_t BitConverter_ToUInt16(ByteArray* val, const int startIndex) {
|
uint16_t BitConverter_ToUInt16(ByteArray* val, const int startIndex) {
|
||||||
const auto ret = CALL_ORIGIN(BitConverter_ToUInt16, val, startIndex);
|
const auto ret = CALL_ORIGIN(BitConverter_ToUInt16, val, startIndex);
|
||||||
if (ret == 0xAB89 && ReadMapped<UINT16>(val->vector, 2) == 259) {
|
if (ret == 0xAB89 && ReadMapped<UINT16>(val->vector, 2) == 24082) {
|
||||||
const auto headLength = ReadMapped<UINT16>(val->vector, 4);
|
const auto headLength = ReadMapped<UINT16>(val->vector, 4);
|
||||||
const auto dataLength = ReadMapped<UINT32>(val->vector, 6);
|
const auto dataLength = ReadMapped<UINT32>(val->vector, 6);
|
||||||
const auto cStr = base64_encode(val->vector + 10 + headLength, dataLength) + "\n";
|
const auto cStr = base64_encode(val->vector + 10 + headLength, dataLength) + "\n";
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ 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(0x00572860, 0x0056DB70, ByteArray*, il2cpp_array_new_specific, (void* arrayTypeInfo, uint64_t length));
|
DO_APP_FUNC(0x002ED400, 0x002ED390, ByteArray*, il2cpp_array_new_specific, (void* arrayTypeInfo, uint64_t length));
|
||||||
|
|
||||||
DO_APP_FUNC(0x01663180, 0x0165E180, ByteArray*, RecordUserData, (int32_t nType));
|
DO_APP_FUNC(0x0113ADC0, 0x0113AFC0, ByteArray*, RecordUserData, (int32_t nType));
|
||||||
|
|
||||||
DO_APP_FUNC(0x10986650, 0x10981A40, uint16_t, BitConverter_ToUInt16, (ByteArray* val, int startIndex));
|
DO_APP_FUNC(0x0F826CF0, 0x0F825F10, uint16_t, BitConverter_ToUInt16, (ByteArray* val, int startIndex));
|
||||||
|
|||||||
@@ -9,13 +9,13 @@ message Achievement {
|
|||||||
FINISHED = 2;
|
FINISHED = 2;
|
||||||
REWARD_TAKEN = 3;
|
REWARD_TAKEN = 3;
|
||||||
}
|
}
|
||||||
uint32 timestamp = 8;
|
uint32 timestamp = 11;
|
||||||
uint32 current = 3;
|
uint32 current = 5;
|
||||||
uint32 total = 4;
|
uint32 total = 15;
|
||||||
uint32 id = 15;
|
uint32 id = 2;
|
||||||
Status status = 9;
|
Status status = 7;
|
||||||
}
|
}
|
||||||
|
|
||||||
message AchievementAllDataNotify {
|
message AchievementAllDataNotify {
|
||||||
repeated Achievement list = 8;
|
repeated Achievement list = 4;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -120,19 +120,14 @@ public static class Export {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static void ToPaimon(AchievementAllDataNotify data) {
|
private static void ToPaimon(AchievementAllDataNotify data) {
|
||||||
var info = LoadAchievementInfo();
|
var info = LoadAchievementInfo().Items.ToDictionary(pair => pair.Key, pair => pair.Value.Group);
|
||||||
var output = new Dictionary<uint, Dictionary<uint, bool>>();
|
|
||||||
foreach (var ach in data.List.Where(a => a.Status is Status.Finished or Status.RewardTaken)) {
|
|
||||||
if (!info.Items.TryGetValue(ach.Id, out var achInfo) || achInfo == null) {
|
|
||||||
Console.WriteLine($@"Unable to find {ach.Id} in metadata.");
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
var map = output.GetValueOrDefault(achInfo.Group, new Dictionary<uint, bool>());
|
|
||||||
map[ach.Id == 81222 ? 81219 : ach.Id] = true;
|
|
||||||
output[achInfo.Group] = map;
|
|
||||||
}
|
|
||||||
var final = new Dictionary<string, Dictionary<uint, Dictionary<uint, bool>>> {
|
var final = new Dictionary<string, Dictionary<uint, Dictionary<uint, bool>>> {
|
||||||
["achievement"] = output.OrderBy(pair => pair.Key).ToDictionary(pair => pair.Key, pair => pair.Value)
|
["achievement"] = data.List
|
||||||
|
.Where(achievement => achievement.Status is Status.Finished or Status.RewardTaken)
|
||||||
|
.Where(achievement => info.ContainsKey(achievement.Id))
|
||||||
|
.GroupBy(achievement => info[achievement.Id], achievement => achievement.Id)
|
||||||
|
.OrderBy(group => group.Key)
|
||||||
|
.ToDictionary(group => group.Key, group => group.ToDictionary(id => id, _ => true))
|
||||||
};
|
};
|
||||||
var path = Path.GetFullPath($"export-{DateTime.Now:yyyyMMddHHmmss}-paimon.json");
|
var path = Path.GetFullPath($"export-{DateTime.Now:yyyyMMddHHmmss}-paimon.json");
|
||||||
if (TryWriteToFile(path, JsonSerializer.Serialize(final))) {
|
if (TryWriteToFile(path, JsonSerializer.Serialize(final))) {
|
||||||
@@ -143,7 +138,7 @@ public static class Export {
|
|||||||
private static void ToSeelie(AchievementAllDataNotify data) {
|
private static void ToSeelie(AchievementAllDataNotify data) {
|
||||||
var output = new Dictionary<uint, Dictionary<string, bool>>();
|
var output = new Dictionary<uint, Dictionary<string, bool>>();
|
||||||
foreach (var ach in data.List.Where(a => a.Status is Status.Finished or Status.RewardTaken)) {
|
foreach (var ach in data.List.Where(a => a.Status is Status.Finished or Status.RewardTaken)) {
|
||||||
output[ach.Id == 81222 ? 81219 : ach.Id] = new Dictionary<string, bool> {
|
output[ach.Id] = new Dictionary<string, bool> {
|
||||||
["done"] = true
|
["done"] = true
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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 = 50;
|
public const uint AppVersionCode = 51;
|
||||||
public const string AppVersionName = "4.0";
|
public const string AppVersionName = "4.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";
|
||||||
|
|||||||
Reference in New Issue
Block a user