-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
now supports 3.2,4.0.1,4.6,4.7 by using simple copy method instead of…
… complicated thing and some functions are temporarily removed.
- Loading branch information
Yuuki
committed
Jun 29, 2024
1 parent
aa5b5b0
commit b6cdf0c
Showing
14 changed files
with
327 additions
and
1,703 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Converters; | ||
using System; | ||
using static YuukiPS_Launcher.Game.Genshin.Settings; | ||
|
||
public class ServerRegionIDConverter : StringEnumConverter | ||
{ | ||
public override object? ReadJson(JsonReader reader, Type objectType, object? existingValue, JsonSerializer serializer) | ||
{ | ||
if (reader.TokenType == JsonToken.String) | ||
{ | ||
string enumText = reader.Value.ToString(); | ||
Check warning on line 12 in Game/Genshin/ServerRegionID.cs GitHub Actions / build
|
||
foreach (ServerRegionID enumValue in Enum.GetValues(typeof(ServerRegionID))) | ||
{ | ||
if (enumValue.ToString().Equals(enumText, StringComparison.OrdinalIgnoreCase)) | ||
{ | ||
return enumValue; | ||
} | ||
} | ||
// Handle unknown value here | ||
return ServerRegionID.os_usa; // Default value | ||
} | ||
return base.ReadJson(reader, objectType, existingValue, serializer); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,27 @@ | ||
namespace YuukiPS_Launcher.Json.GameClient | ||
{ | ||
public class Cn | ||
{ | ||
public string userassembly { get; set; } | ||
public string metadata { get; set; } | ||
} | ||
|
||
public class KeyFind | ||
{ | ||
public string cn { get; set; } | ||
public string os { get; set; } | ||
} | ||
|
||
public class Md5Check | ||
{ | ||
public Os os { get; set; } | ||
public Cn cn { get; set; } | ||
} | ||
|
||
public class Md5Vaild | ||
{ | ||
public string os { get; set; } | ||
public string cn { get; set; } | ||
} | ||
|
||
public class Original | ||
{ | ||
public string resources { get; set; } | ||
public KeyFind key_find { get; set; } | ||
public Md5Check md5_check { get; set; } | ||
} | ||
|
||
public class Os | ||
{ | ||
public string userassembly { get; set; } | ||
public string metadata { get; set; } | ||
public string file { get; set; } | ||
public string location { get; set; } | ||
public string md5 { get; set; } | ||
} | ||
|
||
public class Patched | ||
{ | ||
public string metode { get; set; } | ||
public string resources { get; set; } | ||
public string key_patch { get; set; } | ||
public Md5Vaild md5_vaild { get; set; } | ||
public string file { get; set; } | ||
public string location { get; set; } | ||
public string md5 { get; set; } | ||
} | ||
|
||
public class Patch | ||
{ | ||
public string version { get; set; } = "0.0.0"; | ||
public string channel { get; set; } = "Global"; | ||
public string release { get; set; } = "Official"; | ||
public string method { get; set; } = "copy"; // rare use | ||
public string nosupport { get; set; } = ""; | ||
public Patched? patched { get; set; } | ||
public Original? original { get; set; } | ||
public List<Patched> patched { get; set; } | ||
public List<Original> original { get; set; } | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.