-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fix Public Issue #10 - Fix Rogue Event - Correct Technique Point Sync & Better Gacha chance
- Loading branch information
Showing
106 changed files
with
1,445 additions
and
501 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 was deleted.
Oops, something went wrong.
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,62 @@ | ||
using EggLink.DanhengServer.Internationalization; | ||
using EggLink.DanhengServer.Util; | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Linq; | ||
|
||
namespace EggLink.DanhengServer.Data.Config.Rogue; | ||
|
||
public class RogueDialogueBaseConfigInfo | ||
{ | ||
public string OptionPath { get; set; } = string.Empty; | ||
public string DialoguePath { get; set; } = string.Empty; | ||
|
||
public LevelGraphConfigInfo? DialogueInfo { get; set; } | ||
public RogueDialogueEventConfigInfo? OptionInfo { get; set; } | ||
|
||
public void Loaded() | ||
{ | ||
var logger = Logger.GetByClassName(); | ||
if (!string.IsNullOrEmpty(OptionPath)) | ||
{ | ||
var path = ConfigManager.Config.Path.ResourcePath + "/" + OptionPath; | ||
var file = new FileInfo(path); | ||
if (!file.Exists) return; | ||
try | ||
{ | ||
using var reader = file.OpenRead(); | ||
using StreamReader reader2 = new(reader); | ||
var text = reader2.ReadToEnd(); | ||
var info = JsonConvert.DeserializeObject<RogueDialogueEventConfigInfo>(text); | ||
OptionInfo = info; | ||
} | ||
catch (Exception ex) | ||
{ | ||
logger.Error( | ||
I18nManager.Translate("Server.ServerInfo.FailedToReadItem", file.Name, | ||
I18nManager.Translate("Word.Error")), ex); | ||
} | ||
} | ||
|
||
if (!string.IsNullOrEmpty(DialoguePath)) | ||
{ | ||
var path = ConfigManager.Config.Path.ResourcePath + "/" + DialoguePath; | ||
var file = new FileInfo(path); | ||
if (!file.Exists) return; | ||
try | ||
{ | ||
using var reader = file.OpenRead(); | ||
using StreamReader reader2 = new(reader); | ||
var text = reader2.ReadToEnd().Replace("$type", "Type"); | ||
var obj = JObject.Parse(text); | ||
var info = LevelGraphConfigInfo.LoadFromJsonObject(obj); | ||
DialogueInfo = info; | ||
} | ||
catch (Exception ex) | ||
{ | ||
logger.Error( | ||
I18nManager.Translate("Server.ServerInfo.FailedToReadItem", file.Name, | ||
I18nManager.Translate("Word.Error")), ex); | ||
} | ||
} | ||
} | ||
} |
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,6 @@ | ||
namespace EggLink.DanhengServer.Data.Config.Rogue; | ||
|
||
public class RogueDialogueEventConfigInfo | ||
{ | ||
public List<RogueDialogueEventOptionConfigInfo> OptionList { get; set; } = []; | ||
} |
13 changes: 13 additions & 0 deletions
13
Common/Data/Config/Rogue/RogueDialogueEventOptionConfigInfo.cs
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,13 @@ | ||
namespace EggLink.DanhengServer.Data.Config.Rogue; | ||
|
||
public class RogueDialogueEventOptionConfigInfo | ||
{ | ||
public int OptionID { get; set; } | ||
public int DisplayID { get; set; } | ||
public int SpecialOptionID { get; set; } | ||
public Dictionary<int, RogueDialogueEventOptionDynamicConfigInfo> DynamicMap { get; set; } = []; | ||
public int DescValue { get; set; } | ||
public int DescValue2 { get; set; } | ||
public int DescValue3 { get; set; } | ||
public int DescValue4 { get; set; } | ||
} |
7 changes: 7 additions & 0 deletions
7
Common/Data/Config/Rogue/RogueDialogueEventOptionDynamicConfigInfo.cs
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,7 @@ | ||
namespace EggLink.DanhengServer.Data.Config.Rogue; | ||
|
||
public class RogueDialogueEventOptionDynamicConfigInfo | ||
{ | ||
public int DisplayID { get; set; } | ||
public int DisplayID2 { get; set; } | ||
} |
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,20 @@ | ||
using EggLink.DanhengServer.Enums.Rogue; | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Converters; | ||
|
||
namespace EggLink.DanhengServer.Data.Config.Rogue; | ||
|
||
public class RogueNPCConfigInfo | ||
{ | ||
[JsonConverter(typeof(StringEnumConverter))] | ||
public RogueDialogueTypeEnum DialogueType { get; set; } | ||
|
||
public List<RogueNPCDialogueConfigInfo> DialogueList { get; set; } = []; | ||
|
||
public void Loaded() | ||
{ | ||
if (DialogueList.Count == 0) return; | ||
|
||
foreach (var info in DialogueList) info.Loaded(); | ||
} | ||
} |
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,8 @@ | ||
namespace EggLink.DanhengServer.Data.Config.Rogue; | ||
|
||
public class RogueNPCDialogueConfigInfo : RogueDialogueBaseConfigInfo | ||
{ | ||
public int DialogueProgress { get; set; } | ||
public int UnlockID { get; set; } | ||
public int TalkNameID { get; set; } | ||
} |
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,5 @@ | ||
namespace EggLink.DanhengServer.Data.Config.Scene; | ||
|
||
public class AnchorInfo : PositionInfo | ||
{ | ||
} |
2 changes: 1 addition & 1 deletion
2
Common/Data/Config/FloorInfo.cs → Common/Data/Config/Scene/FloorInfo.cs
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
2 changes: 1 addition & 1 deletion
2
Common/Data/Config/MonsterInfo.cs → Common/Data/Config/Scene/MonsterInfo.cs
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
2 changes: 1 addition & 1 deletion
2
Common/Data/Config/NpcInfo.cs → Common/Data/Config/Scene/NpcInfo.cs
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
2 changes: 1 addition & 1 deletion
2
Common/Data/Config/PositionInfo.cs → Common/Data/Config/Scene/PositionInfo.cs
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
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
This file was deleted.
Oops, something went wrong.
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,27 @@ | ||
using EggLink.DanhengServer.Data.Config.Rogue; | ||
|
||
namespace EggLink.DanhengServer.Data.Excel; | ||
|
||
[ResourceEntity("RogueNPC.json")] | ||
public class RogueNPCExcel : ExcelResource | ||
{ | ||
public int RogueNPCID { get; set; } | ||
public string NPCJsonPath { get; set; } = string.Empty; | ||
|
||
public RogueNPCConfigInfo? RogueNpcConfig { get; set; } | ||
|
||
public override int GetId() | ||
{ | ||
return RogueNPCID; | ||
} | ||
|
||
public override void Loaded() | ||
{ | ||
GameData.RogueNPCData.TryAdd(RogueNPCID, this); | ||
} | ||
|
||
public bool CanUseInVer(int version) | ||
{ | ||
return RogueNpcConfig != null; | ||
} | ||
} |
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,39 @@ | ||
using EggLink.DanhengServer.Enums.TournRogue; | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Converters; | ||
|
||
namespace EggLink.DanhengServer.Data.Excel; | ||
|
||
[ResourceEntity("RogueTournArea.json")] | ||
public class RogueTournAreaExcel : ExcelResource | ||
{ | ||
public List<int> MonsterDisplayItemList { get; set; } = []; | ||
public List<int> LayerIDList { get; set; } = []; | ||
public List<int> DifficultyIDList { get; set; } = []; | ||
public int WorldLevelLimit { get; set; } | ||
public int FirstReward { get; set; } | ||
|
||
[JsonConverter(typeof(StringEnumConverter))] | ||
public RogueTournDifficultyTypeEnum Difficulty { get; set; } | ||
public int ExpScoreID { get; set; } | ||
public int UnlockID { get; set; } | ||
public int AreaID { get; set; } | ||
public HashName AreaNameID { get; set; } = new(); | ||
public bool IsHard { get; set; } | ||
|
||
[JsonConverter(typeof(StringEnumConverter))] | ||
public RogueTournModeEnum TournMode { get; set; } | ||
|
||
[JsonConverter(typeof(StringEnumConverter))] | ||
public RogueTournAreaGroupIDEnum AreaGroupID { get; set; } | ||
|
||
public override int GetId() | ||
{ | ||
return AreaID; | ||
} | ||
|
||
public override void Loaded() | ||
{ | ||
GameData.RogueTournAreaData.TryAdd(AreaID, this); | ||
} | ||
} |
Oops, something went wrong.