fix empty result and bump version to 2.4.1

This commit is contained in:
HolographicHat
2022-12-07 23:36:18 +08:00
parent d2d5bafcd6
commit 31b77a9fb3
3 changed files with 110 additions and 109 deletions

View File

@@ -70,8 +70,8 @@ namespace Hook {
} }
void Run(HMODULE* phModule) { void Run(HMODULE* phModule) {
AllocConsole(); //AllocConsole();
freopen_s((FILE**)stdout, "CONOUT$", "w", stdout); //freopen_s((FILE**)stdout, "CONOUT$", "w", stdout);
while ( while (
GetModuleHandle("UserAssembly.dll") == nullptr || GetModuleHandle("UserAssembly.dll") == nullptr ||
(unityWnd = FindMainWindowByPID(GetCurrentProcessId())) == 0 (unityWnd = FindMainWindowByPID(GetCurrentProcessId())) == 0

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 = 33; public const uint AppVersionCode = 34;
public const string AppVersionName = "2.4"; public const string AppVersionName = "2.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";

View File

@@ -22,18 +22,19 @@ public static partial class AchievementAllDataNotifyReflection {
static AchievementAllDataNotifyReflection() { static AchievementAllDataNotifyReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String( byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat( string.Concat(
"Ch5BY2hpZXZlbWVudEFsbERhdGFOb3RpZnkucHJvdG8iowIKGEFjaGlldmVt", "Ch5BY2hpZXZlbWVudEFsbERhdGFOb3RpZnkucHJvdG8ivwIKGEFjaGlldmVt",
"ZW50QWxsRGF0YU5vdGlmeRIzCgRsaXN0GAQgAygLMiUuQWNoaWV2ZW1lbnRB", "ZW50QWxsRGF0YU5vdGlmeRIzCgRsaXN0GAggAygLMiUuQWNoaWV2ZW1lbnRB",
"bGxEYXRhTm90aWZ5LkFjaGlldmVtZW50GtEBCgtBY2hpZXZlbWVudBIKCgJp", "bGxEYXRhTm90aWZ5LkFjaGlldmVtZW50Gu0BCgtBY2hpZXZlbWVudBIRCgl0",
"ZBgOIAEoDRI8CgZzdGF0dXMYDSABKA4yLC5BY2hpZXZlbWVudEFsbERhdGFO", "aW1lc3RhbXAYCCABKA0SDwoHY3VycmVudBgLIAEoDRINCgV0b3RhbBgGIAEo",
"b3RpZnkuQWNoaWV2ZW1lbnQuU3RhdHVzEg8KB2N1cnJlbnQYDCABKA0SDQoF", "DRIKCgJpZBgOIAEoDRI8CgZzdGF0dXMYDyABKA4yLC5BY2hpZXZlbWVudEFs",
"dG90YWwYCCABKA0SEQoJdGltZXN0YW1wGAsgASgNIkUKBlN0YXR1cxILCgdJ", "bERhdGFOb3RpZnkuQWNoaWV2ZW1lbnQuU3RhdHVzImEKBlN0YXR1cxISCg5T",
"TlZBTElEEAASDgoKVU5GSU5JU0hFRBABEgwKCEZJTklTSEVEEAISEAoMUkVX", "VEFUVVNfSU5WQUxJRBAAEhUKEVNUQVRVU19VTkZJTklTSEVEEAESEwoPU1RB",
"QVJEX1RBS0VOEANiBnByb3RvMw==")); "VFVTX0ZJTklTSEVEEAISFwoTU1RBVFVTX1JFV0FSRF9UQUtFThADYgZwcm90",
"bzM="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { }, new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { 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 #endregion
@@ -85,9 +86,9 @@ public sealed partial class AchievementAllDataNotify : pb::IMessage<AchievementA
} }
/// <summary>Field number for the "list" field.</summary> /// <summary>Field number for the "list" field.</summary>
public const int ListFieldNumber = 4; public const int ListFieldNumber = 8;
private static readonly pb::FieldCodec<global::AchievementAllDataNotify.Types.Achievement> _repeated_list_codec private static readonly pb::FieldCodec<global::AchievementAllDataNotify.Types.Achievement> _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<global::AchievementAllDataNotify.Types.Achievement> list_ = new pbc::RepeatedField<global::AchievementAllDataNotify.Types.Achievement>(); private readonly pbc::RepeatedField<global::AchievementAllDataNotify.Types.Achievement> list_ = new pbc::RepeatedField<global::AchievementAllDataNotify.Types.Achievement>();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
@@ -188,7 +189,7 @@ public sealed partial class AchievementAllDataNotify : pb::IMessage<AchievementA
default: default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break; break;
case 34: { case 66: {
list_.AddEntriesFrom(input, _repeated_list_codec); list_.AddEntriesFrom(input, _repeated_list_codec);
break; break;
} }
@@ -207,7 +208,7 @@ public sealed partial class AchievementAllDataNotify : pb::IMessage<AchievementA
default: default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
break; break;
case 34: { case 66: {
list_.AddEntriesFrom(ref input, _repeated_list_codec); list_.AddEntriesFrom(ref input, _repeated_list_codec);
break; break;
} }
@@ -255,11 +256,11 @@ public sealed partial class AchievementAllDataNotify : pb::IMessage<AchievementA
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public Achievement(Achievement other) : this() { public Achievement(Achievement other) : this() {
id_ = other.id_; timestamp_ = other.timestamp_;
status_ = other.status_;
current_ = other.current_; current_ = other.current_;
total_ = other.total_; total_ = other.total_;
timestamp_ = other.timestamp_; id_ = other.id_;
status_ = other.status_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
} }
@@ -269,6 +270,42 @@ public sealed partial class AchievementAllDataNotify : pb::IMessage<AchievementA
return new Achievement(this); return new Achievement(this);
} }
/// <summary>Field number for the "timestamp" field.</summary>
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;
}
}
/// <summary>Field number for the "current" field.</summary>
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;
}
}
/// <summary>Field number for the "total" field.</summary>
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;
}
}
/// <summary>Field number for the "id" field.</summary> /// <summary>Field number for the "id" field.</summary>
public const int IdFieldNumber = 14; public const int IdFieldNumber = 14;
private uint id_; private uint id_;
@@ -282,7 +319,7 @@ public sealed partial class AchievementAllDataNotify : pb::IMessage<AchievementA
} }
/// <summary>Field number for the "status" field.</summary> /// <summary>Field number for the "status" field.</summary>
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; private global::AchievementAllDataNotify.Types.Achievement.Types.Status status_ = global::AchievementAllDataNotify.Types.Achievement.Types.Status.Invalid;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
@@ -293,42 +330,6 @@ public sealed partial class AchievementAllDataNotify : pb::IMessage<AchievementA
} }
} }
/// <summary>Field number for the "current" field.</summary>
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;
}
}
/// <summary>Field number for the "total" field.</summary>
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;
}
}
/// <summary>Field number for the "timestamp" field.</summary>
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.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override bool Equals(object other) { public override bool Equals(object other) {
@@ -344,11 +345,11 @@ public sealed partial class AchievementAllDataNotify : pb::IMessage<AchievementA
if (ReferenceEquals(other, this)) { if (ReferenceEquals(other, this)) {
return true; return true;
} }
if (Id != other.Id) return false; if (Timestamp != other.Timestamp) return false;
if (Status != other.Status) return false;
if (Current != other.Current) return false; if (Current != other.Current) return false;
if (Total != other.Total) return false; if (Total != other.Total) return false;
if (Timestamp != other.Timestamp) return false; if (Id != other.Id) return false;
if (Status != other.Status) return false;
return Equals(_unknownFields, other._unknownFields); return Equals(_unknownFields, other._unknownFields);
} }
@@ -356,11 +357,11 @@ public sealed partial class AchievementAllDataNotify : pb::IMessage<AchievementA
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override int GetHashCode() { public override int GetHashCode() {
int hash = 1; int hash = 1;
if (Id != 0) hash ^= Id.GetHashCode(); if (Timestamp != 0) hash ^= Timestamp.GetHashCode();
if (Status != global::AchievementAllDataNotify.Types.Achievement.Types.Status.Invalid) hash ^= Status.GetHashCode();
if (Current != 0) hash ^= Current.GetHashCode(); if (Current != 0) hash ^= Current.GetHashCode();
if (Total != 0) hash ^= Total.GetHashCode(); if (Total != 0) hash ^= Total.GetHashCode();
if (Timestamp != 0) hash ^= Timestamp.GetHashCode(); if (Id != 0) hash ^= Id.GetHashCode();
if (Status != global::AchievementAllDataNotify.Types.Achievement.Types.Status.Invalid) hash ^= Status.GetHashCode();
if (_unknownFields != null) { if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode(); hash ^= _unknownFields.GetHashCode();
} }
@@ -380,25 +381,25 @@ public sealed partial class AchievementAllDataNotify : pb::IMessage<AchievementA
output.WriteRawMessage(this); output.WriteRawMessage(this);
#else #else
if (Total != 0) { if (Total != 0) {
output.WriteRawTag(64); output.WriteRawTag(48);
output.WriteUInt32(Total); output.WriteUInt32(Total);
} }
if (Timestamp != 0) { if (Timestamp != 0) {
output.WriteRawTag(88); output.WriteRawTag(64);
output.WriteUInt32(Timestamp); output.WriteUInt32(Timestamp);
} }
if (Current != 0) { if (Current != 0) {
output.WriteRawTag(96); output.WriteRawTag(88);
output.WriteUInt32(Current); output.WriteUInt32(Current);
} }
if (Status != global::AchievementAllDataNotify.Types.Achievement.Types.Status.Invalid) {
output.WriteRawTag(104);
output.WriteEnum((int) Status);
}
if (Id != 0) { if (Id != 0) {
output.WriteRawTag(112); output.WriteRawTag(112);
output.WriteUInt32(Id); output.WriteUInt32(Id);
} }
if (Status != global::AchievementAllDataNotify.Types.Achievement.Types.Status.Invalid) {
output.WriteRawTag(120);
output.WriteEnum((int) Status);
}
if (_unknownFields != null) { if (_unknownFields != null) {
_unknownFields.WriteTo(output); _unknownFields.WriteTo(output);
} }
@@ -410,25 +411,25 @@ public sealed partial class AchievementAllDataNotify : pb::IMessage<AchievementA
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
if (Total != 0) { if (Total != 0) {
output.WriteRawTag(64); output.WriteRawTag(48);
output.WriteUInt32(Total); output.WriteUInt32(Total);
} }
if (Timestamp != 0) { if (Timestamp != 0) {
output.WriteRawTag(88); output.WriteRawTag(64);
output.WriteUInt32(Timestamp); output.WriteUInt32(Timestamp);
} }
if (Current != 0) { if (Current != 0) {
output.WriteRawTag(96); output.WriteRawTag(88);
output.WriteUInt32(Current); output.WriteUInt32(Current);
} }
if (Status != global::AchievementAllDataNotify.Types.Achievement.Types.Status.Invalid) {
output.WriteRawTag(104);
output.WriteEnum((int) Status);
}
if (Id != 0) { if (Id != 0) {
output.WriteRawTag(112); output.WriteRawTag(112);
output.WriteUInt32(Id); output.WriteUInt32(Id);
} }
if (Status != global::AchievementAllDataNotify.Types.Achievement.Types.Status.Invalid) {
output.WriteRawTag(120);
output.WriteEnum((int) Status);
}
if (_unknownFields != null) { if (_unknownFields != null) {
_unknownFields.WriteTo(ref output); _unknownFields.WriteTo(ref output);
} }
@@ -439,11 +440,8 @@ public sealed partial class AchievementAllDataNotify : pb::IMessage<AchievementA
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public int CalculateSize() { public int CalculateSize() {
int size = 0; int size = 0;
if (Id != 0) { if (Timestamp != 0) {
size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Id); size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Timestamp);
}
if (Status != global::AchievementAllDataNotify.Types.Achievement.Types.Status.Invalid) {
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Status);
} }
if (Current != 0) { if (Current != 0) {
size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Current); size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Current);
@@ -451,8 +449,11 @@ public sealed partial class AchievementAllDataNotify : pb::IMessage<AchievementA
if (Total != 0) { if (Total != 0) {
size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Total); size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Total);
} }
if (Timestamp != 0) { if (Id != 0) {
size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Timestamp); size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Id);
}
if (Status != global::AchievementAllDataNotify.Types.Achievement.Types.Status.Invalid) {
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Status);
} }
if (_unknownFields != null) { if (_unknownFields != null) {
size += _unknownFields.CalculateSize(); size += _unknownFields.CalculateSize();
@@ -466,11 +467,8 @@ public sealed partial class AchievementAllDataNotify : pb::IMessage<AchievementA
if (other == null) { if (other == null) {
return; return;
} }
if (other.Id != 0) { if (other.Timestamp != 0) {
Id = other.Id; Timestamp = other.Timestamp;
}
if (other.Status != global::AchievementAllDataNotify.Types.Achievement.Types.Status.Invalid) {
Status = other.Status;
} }
if (other.Current != 0) { if (other.Current != 0) {
Current = other.Current; Current = other.Current;
@@ -478,8 +476,11 @@ public sealed partial class AchievementAllDataNotify : pb::IMessage<AchievementA
if (other.Total != 0) { if (other.Total != 0) {
Total = other.Total; Total = other.Total;
} }
if (other.Timestamp != 0) { if (other.Id != 0) {
Timestamp = other.Timestamp; Id = other.Id;
}
if (other.Status != global::AchievementAllDataNotify.Types.Achievement.Types.Status.Invalid) {
Status = other.Status;
} }
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
} }
@@ -496,26 +497,26 @@ public sealed partial class AchievementAllDataNotify : pb::IMessage<AchievementA
default: default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break; break;
case 64: { case 48: {
Total = input.ReadUInt32(); Total = input.ReadUInt32();
break; break;
} }
case 88: { case 64: {
Timestamp = input.ReadUInt32(); Timestamp = input.ReadUInt32();
break; break;
} }
case 96: { case 88: {
Current = input.ReadUInt32(); Current = input.ReadUInt32();
break; break;
} }
case 104: {
Status = (global::AchievementAllDataNotify.Types.Achievement.Types.Status) input.ReadEnum();
break;
}
case 112: { case 112: {
Id = input.ReadUInt32(); Id = input.ReadUInt32();
break; break;
} }
case 120: {
Status = (global::AchievementAllDataNotify.Types.Achievement.Types.Status) input.ReadEnum();
break;
}
} }
} }
#endif #endif
@@ -531,26 +532,26 @@ public sealed partial class AchievementAllDataNotify : pb::IMessage<AchievementA
default: default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
break; break;
case 64: { case 48: {
Total = input.ReadUInt32(); Total = input.ReadUInt32();
break; break;
} }
case 88: { case 64: {
Timestamp = input.ReadUInt32(); Timestamp = input.ReadUInt32();
break; break;
} }
case 96: { case 88: {
Current = input.ReadUInt32(); Current = input.ReadUInt32();
break; break;
} }
case 104: {
Status = (global::AchievementAllDataNotify.Types.Achievement.Types.Status) input.ReadEnum();
break;
}
case 112: { case 112: {
Id = input.ReadUInt32(); Id = input.ReadUInt32();
break; break;
} }
case 120: {
Status = (global::AchievementAllDataNotify.Types.Achievement.Types.Status) input.ReadEnum();
break;
}
} }
} }
} }
@@ -562,10 +563,10 @@ public sealed partial class AchievementAllDataNotify : pb::IMessage<AchievementA
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static partial class Types { public static partial class Types {
public enum Status { public enum Status {
[pbr::OriginalName("INVALID")] Invalid = 0, [pbr::OriginalName("STATUS_INVALID")] Invalid = 0,
[pbr::OriginalName("UNFINISHED")] Unfinished = 1, [pbr::OriginalName("STATUS_UNFINISHED")] Unfinished = 1,
[pbr::OriginalName("FINISHED")] Finished = 2, [pbr::OriginalName("STATUS_FINISHED")] Finished = 2,
[pbr::OriginalName("REWARD_TAKEN")] RewardTaken = 3, [pbr::OriginalName("STATUS_REWARD_TAKEN")] RewardTaken = 3,
} }
} }