From 31b77a9fb37d80871a4bcab79f2d29e02204966c Mon Sep 17 00:00:00 2001 From: HolographicHat Date: Wed, 7 Dec 2022 23:36:18 +0800 Subject: [PATCH] fix empty result and bump version to 2.4.1 --- lib/src/dllmain.cpp | 4 +- src/GlobalVars.cs | 4 +- src/Proto/AchievementAllDataNotify.cs | 211 +++++++++++++------------- 3 files changed, 110 insertions(+), 109 deletions(-) diff --git a/lib/src/dllmain.cpp b/lib/src/dllmain.cpp index 418ac5b..4797bf7 100644 --- a/lib/src/dllmain.cpp +++ b/lib/src/dllmain.cpp @@ -70,8 +70,8 @@ namespace Hook { } void Run(HMODULE* phModule) { - AllocConsole(); - freopen_s((FILE**)stdout, "CONOUT$", "w", stdout); + //AllocConsole(); + //freopen_s((FILE**)stdout, "CONOUT$", "w", stdout); while ( GetModuleHandle("UserAssembly.dll") == nullptr || (unityWnd = FindMainWindowByPID(GetCurrentProcessId())) == 0 diff --git a/src/GlobalVars.cs b/src/GlobalVars.cs index 9d4606f..63fb00a 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 = 33; - public const string AppVersionName = "2.4"; + public const uint AppVersionCode = 34; + public const string AppVersionName = "2.4.1"; public const string PipeName = "YaeAchievementPipe"; public const string BucketHost = "https://cn-cd-1259389942.file.myqcloud.com"; diff --git a/src/Proto/AchievementAllDataNotify.cs b/src/Proto/AchievementAllDataNotify.cs index 8fbb0af..ec2205a 100644 --- a/src/Proto/AchievementAllDataNotify.cs +++ b/src/Proto/AchievementAllDataNotify.cs @@ -22,18 +22,19 @@ public static partial class AchievementAllDataNotifyReflection { static AchievementAllDataNotifyReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( - "Ch5BY2hpZXZlbWVudEFsbERhdGFOb3RpZnkucHJvdG8iowIKGEFjaGlldmVt", - "ZW50QWxsRGF0YU5vdGlmeRIzCgRsaXN0GAQgAygLMiUuQWNoaWV2ZW1lbnRB", - "bGxEYXRhTm90aWZ5LkFjaGlldmVtZW50GtEBCgtBY2hpZXZlbWVudBIKCgJp", - "ZBgOIAEoDRI8CgZzdGF0dXMYDSABKA4yLC5BY2hpZXZlbWVudEFsbERhdGFO", - "b3RpZnkuQWNoaWV2ZW1lbnQuU3RhdHVzEg8KB2N1cnJlbnQYDCABKA0SDQoF", - "dG90YWwYCCABKA0SEQoJdGltZXN0YW1wGAsgASgNIkUKBlN0YXR1cxILCgdJ", - "TlZBTElEEAASDgoKVU5GSU5JU0hFRBABEgwKCEZJTklTSEVEEAISEAoMUkVX", - "QVJEX1RBS0VOEANiBnByb3RvMw==")); + "Ch5BY2hpZXZlbWVudEFsbERhdGFOb3RpZnkucHJvdG8ivwIKGEFjaGlldmVt", + "ZW50QWxsRGF0YU5vdGlmeRIzCgRsaXN0GAggAygLMiUuQWNoaWV2ZW1lbnRB", + "bGxEYXRhTm90aWZ5LkFjaGlldmVtZW50Gu0BCgtBY2hpZXZlbWVudBIRCgl0", + "aW1lc3RhbXAYCCABKA0SDwoHY3VycmVudBgLIAEoDRINCgV0b3RhbBgGIAEo", + "DRIKCgJpZBgOIAEoDRI8CgZzdGF0dXMYDyABKA4yLC5BY2hpZXZlbWVudEFs", + "bERhdGFOb3RpZnkuQWNoaWV2ZW1lbnQuU3RhdHVzImEKBlN0YXR1cxISCg5T", + "VEFUVVNfSU5WQUxJRBAAEhUKEVNUQVRVU19VTkZJTklTSEVEEAESEwoPU1RB", + "VFVTX0ZJTklTSEVEEAISFwoTU1RBVFVTX1JFV0FSRF9UQUtFThADYgZwcm90", + "bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::AchievementAllDataNotify), global::AchievementAllDataNotify.Parser, new[]{ "List" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::AchievementAllDataNotify.Types.Achievement), global::AchievementAllDataNotify.Types.Achievement.Parser, new[]{ "Id", "Status", "Current", "Total", "Timestamp" }, null, new[]{ typeof(global::AchievementAllDataNotify.Types.Achievement.Types.Status) }, null, null)}) + new pbr::GeneratedClrTypeInfo(typeof(global::AchievementAllDataNotify), global::AchievementAllDataNotify.Parser, new[]{ "List" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::AchievementAllDataNotify.Types.Achievement), global::AchievementAllDataNotify.Types.Achievement.Parser, new[]{ "Timestamp", "Current", "Total", "Id", "Status" }, null, new[]{ typeof(global::AchievementAllDataNotify.Types.Achievement.Types.Status) }, null, null)}) })); } #endregion @@ -85,9 +86,9 @@ public sealed partial class AchievementAllDataNotify : pb::IMessageField number for the "list" field. - public const int ListFieldNumber = 4; + public const int ListFieldNumber = 8; private static readonly pb::FieldCodec _repeated_list_codec - = pb::FieldCodec.ForMessage(34, global::AchievementAllDataNotify.Types.Achievement.Parser); + = pb::FieldCodec.ForMessage(66, global::AchievementAllDataNotify.Types.Achievement.Parser); private readonly pbc::RepeatedField list_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -188,7 +189,7 @@ public sealed partial class AchievementAllDataNotify : pb::IMessageField number for the "timestamp" field. + public const int TimestampFieldNumber = 8; + private uint timestamp_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint Timestamp { + get { return timestamp_; } + set { + timestamp_ = value; + } + } + + /// Field number for the "current" field. + public const int CurrentFieldNumber = 11; + private uint current_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint Current { + get { return current_; } + set { + current_ = value; + } + } + + /// Field number for the "total" field. + public const int TotalFieldNumber = 6; + private uint total_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint Total { + get { return total_; } + set { + total_ = value; + } + } + /// Field number for the "id" field. public const int IdFieldNumber = 14; private uint id_; @@ -282,7 +319,7 @@ public sealed partial class AchievementAllDataNotify : pb::IMessageField number for the "status" field. - public const int StatusFieldNumber = 13; + public const int StatusFieldNumber = 15; private global::AchievementAllDataNotify.Types.Achievement.Types.Status status_ = global::AchievementAllDataNotify.Types.Achievement.Types.Status.Invalid; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -293,42 +330,6 @@ public sealed partial class AchievementAllDataNotify : pb::IMessageField number for the "current" field. - public const int CurrentFieldNumber = 12; - private uint current_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public uint Current { - get { return current_; } - set { - current_ = value; - } - } - - /// Field number for the "total" field. - public const int TotalFieldNumber = 8; - private uint total_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public uint Total { - get { return total_; } - set { - total_ = value; - } - } - - /// Field number for the "timestamp" field. - public const int TimestampFieldNumber = 11; - private uint timestamp_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public uint Timestamp { - get { return timestamp_; } - set { - timestamp_ = value; - } - } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { @@ -344,11 +345,11 @@ public sealed partial class AchievementAllDataNotify : pb::IMessage