From 1b68cc6290cd587e53a50c98d0548710387a4a50 Mon Sep 17 00:00:00 2001 From: milimoe Date: Wed, 1 Jan 2025 03:34:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E4=BB=BB=E5=8A=A1=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Entity/System/Quest.cs | 10 +++---- Library/Constant/StateEnum.cs | 49 +++++++++++++++++++++++++++++++++++ Library/Constant/TypeEnum.cs | 45 +++----------------------------- 3 files changed, 57 insertions(+), 47 deletions(-) diff --git a/Entity/System/Quest.cs b/Entity/System/Quest.cs index 08be89c..efb5a12 100644 --- a/Entity/System/Quest.cs +++ b/Entity/System/Quest.cs @@ -7,7 +7,7 @@ namespace Milimoe.FunGame.Core.Entity { public string Description { get; set; } = ""; public int EstimatedMinutes { get; set; } = 0; - public int Status { get; set; } = 0; + public QuestState Status { get; set; } = 0; public int CharacterIndex { get; set; } = 0; public Dictionary Awards { get; set; } = []; public DateTime? StartTime { get; set; } = null; @@ -19,7 +19,7 @@ namespace Milimoe.FunGame.Core.Entity $"{Description}\r\n" + $"需要时间:{EstimatedMinutes} 分钟\r\n" + (StartTime.HasValue ? $"开始时间:{StartTime.Value.ToString(General.GeneralDateTimeFormatChinese)}" + - (Status == 1 ? + (Status == QuestState.InProgress ? $"\r\n预计在 {Math.Max(Math.Round((StartTime.Value.AddMinutes(EstimatedMinutes) - DateTime.Now).TotalMinutes, MidpointRounding.ToPositiveInfinity), 1)} 分钟后完成" : "") + "\r\n" : "") + @@ -37,9 +37,9 @@ namespace Milimoe.FunGame.Core.Entity { return Status switch { - 1 => "进行中", - 2 => "已完成", - 3 => "已结算", + QuestState.InProgress => "进行中", + QuestState.Completed => "已完成", + QuestState.Settled => "已结算", _ => "未开始" }; } diff --git a/Library/Constant/StateEnum.cs b/Library/Constant/StateEnum.cs index d95854b..ec26fd8 100644 --- a/Library/Constant/StateEnum.cs +++ b/Library/Constant/StateEnum.cs @@ -20,6 +20,47 @@ namespace Milimoe.FunGame.Core.Library.Constant Complete } + /// + /// 角色目前所处的状态 + /// + public enum CharacterState + { + /// + /// 可以行动 [ 战斗相关 ] + /// + Actionable, + + /// + /// 完全行动不能 [ 战斗相关 ] + /// + NotActionable, + + /// + /// 行动受限 [ 战斗相关 ] + /// + ActionRestricted, + + /// + /// 战斗不能 [ 战斗相关 ] + /// + BattleRestricted, + + /// + /// 技能受限 [ 战斗相关 ] + /// + SkillRestricted, + + /// + /// 处于吟唱中 [ 战斗相关 ] [ 技能相关 ] + /// + Casting, + + /// + /// 预释放爆发技(插队) [ 战斗相关 ] [ 技能相关 ] + /// + PreCastSuperSkill + } + public enum SelectState { None, @@ -45,4 +86,12 @@ namespace Milimoe.FunGame.Core.Library.Constant Online, InRoom } + + public enum QuestState + { + NotStarted = 0, + InProgress = 1, + Completed = 2, + Settled = 3 + } } diff --git a/Library/Constant/TypeEnum.cs b/Library/Constant/TypeEnum.cs index 67f9941..84f7bdd 100644 --- a/Library/Constant/TypeEnum.cs +++ b/Library/Constant/TypeEnum.cs @@ -507,7 +507,9 @@ namespace Milimoe.FunGame.Core.Library.Constant PassiveSkill, GameStatistics, Character, - CharacterStatistics + CharacterStatistics, + Club, + Quest } public enum UserType @@ -562,47 +564,6 @@ namespace Milimoe.FunGame.Core.Library.Constant Particle } - /// - /// 角色目前所处的状态 - /// - public enum CharacterState - { - /// - /// 可以行动 [ 战斗相关 ] - /// - Actionable, - - /// - /// 完全行动不能 [ 战斗相关 ] - /// - NotActionable, - - /// - /// 行动受限 [ 战斗相关 ] - /// - ActionRestricted, - - /// - /// 战斗不能 [ 战斗相关 ] - /// - BattleRestricted, - - /// - /// 技能受限 [ 战斗相关 ] - /// - SkillRestricted, - - /// - /// 处于吟唱中 [ 战斗相关 ] [ 技能相关 ] - /// - Casting, - - /// - /// 预释放爆发技(插队) [ 战斗相关 ] [ 技能相关 ] - /// - PreCastSuperSkill - } - public enum PrimaryAttribute { None,