Feature: Total internationlisation & Rogue Buff Reroll & Reset floor

This commit is contained in:
Somebody
2024-07-13 19:47:26 +08:00
parent c8e586e45b
commit 10f5ad39eb
7 changed files with 280 additions and 118 deletions

View File

@@ -130,5 +130,30 @@ namespace EggLink.DanhengServer.Command.Cmd
player.EnterScene(player.Data.EntryId, 0, true);
arg.SendMsg(I18nManager.Translate("Game.Command.Scene.SceneReloaded"));
}
[CommandMethod("0 reset")]
public void ResetFloor(CommandArg arg)
{
if (arg.Target == null)
{
arg.SendMsg(I18nManager.Translate("Game.Command.Notice.PlayerNotFound"));
return;
}
var floorId = arg.GetInt(0);
if (floorId == 0)
{
arg.SendMsg(I18nManager.Translate("Game.Command.Notice.InvalidArguments"));
return;
}
var player = arg.Target!.Player!;
if (player.SceneData?.ScenePropData.TryGetValue(floorId, out var _) == true)
{
player.SceneData.ScenePropData[floorId] = [];
}
arg.SendMsg(I18nManager.Translate("Game.Command.Scene.SceneReset", floorId.ToString()));
}
}
}

View File

@@ -340,6 +340,7 @@ namespace EggLink.DanhengServer.Internationalization.Message
public string AllPropsUnlocked { get; } = "所有道具已解锁!";
public string SceneChanged { get; } = "已进入场景 {0}";
public string SceneReloaded { get; } = "场景已重新加载!";
public string SceneReset { get; } = "已重置场景 {0} 中所有道具状态!";
}
/// <summary>

View File

@@ -8,11 +8,11 @@ namespace EggLink.DanhengServer.Internationalization.Message
{
#region Root
public class LanguageCHT
public class LanguageCHS
{
public GameTextCHT Game { get; } = new();
public ServerTextCHT Server { get; } = new();
public WordTextCHT Word { get; } = new(); // a placeholder for the actual word text
public GameTextCHS Game { get; } = new();
public ServerTextCHS Server { get; } = new();
public WordTextCHS Word { get; } = new(); // a placeholder for the actual word text
}
#endregion
@@ -22,23 +22,24 @@ namespace EggLink.DanhengServer.Internationalization.Message
/// <summary>
/// path: Game
/// </summary>
public class GameTextCHT
public class GameTextCHS
{
public CommandTextCHT Command { get; } = new();
public CommandTextCHS Command { get; } = new();
}
/// <summary>
/// path: Server
/// </summary>
public class ServerTextCHT
public class ServerTextCHS
{
public WebTextCHT Web { get; } = new();
public WebTextCHS Web { get; } = new();
public ServerInfoTextCHS ServerInfo { get; } = new();
}
/// <summary>
/// path: Word
/// </summary>
public class WordTextCHT
public class WordTextCHS
{
public string Rank { get; } = "星魂";
public string Avatar { get; } = "角色";
@@ -51,6 +52,38 @@ namespace EggLink.DanhengServer.Internationalization.Message
public string Buff { get; } = "祝福";
public string Miracle { get; } = "奇物";
public string Unlock { get; } = "奢侈品";
// server info
public string Config { get; } = "配置文件";
public string Language { get; } = "語言";
public string Log { get; } = "日誌";
public string GameData { get; } = "遊戲數據";
public string Database { get; } = "數據庫";
public string Command { get; } = "命令";
public string WebServer { get; } = "Web服務器";
public string Plugin { get; } = "插件";
public string Handler { get; } = "包處理器";
public string Dispatch { get; } = "全局分發";
public string Game { get; } = "遊戲";
public string Handbook { get; } = "手冊";
public string NotFound { get; } = "未找到";
public string Error { get; } = "錯誤";
public string FloorInfo { get; } = "區域文件";
public string FloorGroupInfo { get; } = "區域組文件";
public string FloorMissingResult { get; } = "傳送與世界生成";
public string FloorGroupMissingResult { get; } = "傳送、怪物戰鬥與世界生成";
public string Mission { get; } = "任務";
public string MissionInfo { get; } = "任務文件";
public string MazeSkill { get; } = "角色秘技";
public string MazeSkillInfo { get; } = "角色秘技文件";
public string Dialogue { get; } = "模擬宇宙事件";
public string DialogueInfo { get; } = "模擬宇宙事件文件";
public string Performance { get; } = "劇情操作";
public string PerformanceInfo { get; } = "劇情操作文件";
public string RogueChestMap { get; } = "模擬宇宙地圖";
public string RogueChestMapInfo { get; } = "模擬宇宙地圖文件";
public string ChessRogueRoom { get; } = "模擬宇宙DLC";
public string ChessRogueRoomInfo { get; } = "模擬宇宙DLC文件";
}
#endregion
@@ -62,24 +95,25 @@ namespace EggLink.DanhengServer.Internationalization.Message
/// <summary>
/// path: Game.Command
/// </summary>
public class CommandTextCHT
public class CommandTextCHS
{
public NoticeTextCHT Notice { get; } = new();
public NoticeTextCHS Notice { get; } = new();
public HeroTextCHT Hero { get; } = new();
public AvatarTextCHT Avatar { get; } = new();
public GiveTextCHT Give { get; } = new();
public GiveAllTextCHT GiveAll { get; } = new();
public LineupTextCHT Lineup { get; } = new();
public HelpTextCHT Help { get; } = new();
public KickTextCHT Kick { get; } = new();
public MissionTextCHT Mission { get; } = new();
public RelicTextCHT Relic { get; } = new();
public ReloadTextCHT Reload { get; } = new();
public RogueTextCHT Rogue { get; } = new();
public SceneTextCHT Scene { get; } = new();
public UnlockAllTextCHT UnlockAll { get; } = new();
public MailTextCHT Mail { get; } = new();
public HeroTextCHS Hero { get; } = new();
public AvatarTextCHS Avatar { get; } = new();
public GiveTextCHS Give { get; } = new();
public GiveAllTextCHS GiveAll { get; } = new();
public LineupTextCHS Lineup { get; } = new();
public HelpTextCHS Help { get; } = new();
public KickTextCHS Kick { get; } = new();
public MissionTextCHS Mission { get; } = new();
public RelicTextCHS Relic { get; } = new();
public ReloadTextCHS Reload { get; } = new();
public RogueTextCHS Rogue { get; } = new();
public SceneTextCHS Scene { get; } = new();
public UnlockAllTextCHS UnlockAll { get; } = new();
public MailTextCHS Mail { get; } = new();
public RaidTextCHS Raid { get; } = new();
}
#endregion
@@ -89,10 +123,35 @@ namespace EggLink.DanhengServer.Internationalization.Message
/// <summary>
/// path: Server.Web
/// </summary>
public class WebTextCHT
public class WebTextCHS
{
}
/// <summary>
/// path: Server.ServerInfo
/// </summary>
public class ServerInfoTextCHS
{
public string Shutdown { get; } = "關閉中…";
public string CancelKeyPressed { get; } = "已按下取消鍵 (Ctrl + C),服務器即將關閉…";
public string StartingServer { get; } = "正在啟動 DanhengServer…";
public string LoadingItem { get; } = "正在加載 {0}…";
public string RegisterItem { get; } = "註冊了 {0} 個 {1}。";
public string FailedToLoadItem { get; } = "加載 {0} 失敗。";
public string FailedToInitializeItem { get; } = "初始化 {0} 失敗。";
public string FailedToReadItem { get; } = "讀取 {0} 失敗,文件{1}";
public string GeneratedItem { get; } = "已生成 {0}。";
public string LoadedItem { get; } = "已加載 {0}。";
public string LoadedItems { get; } = "已加載 {0} 個 {1}。";
public string ServerRunning { get; } = "{0} 服務器正在監聽 {1}";
public string ServerStarted { get; } = "啟動完成!用時 {0}s擊敗了99%的用戶,輸入 『help』 來獲取命令幫助"; // 玩梗,考慮英語版本將其本土化
public string MissionEnabled { get; } = "任務系統已啟用此功能仍在開發中且可能不會按預期工作如果遇見任何bug請匯報給開發者。";
public string ConfigMissing { get; } = "{0} 缺失,請檢查你的資源文件夾:{1}{2} 可能不能使用。";
public string UnloadedItems { get; } = "卸載了所有 {0}。";
public string SaveDatabase { get; } = "已保存數據庫,用時 {0}s";
}
#endregion
#endregion
@@ -104,158 +163,158 @@ namespace EggLink.DanhengServer.Internationalization.Message
/// <summary>
/// path: Game.Command.Notice
/// </summary>
public class NoticeTextCHT
public class NoticeTextCHS
{
public string PlayerNotFound { get; } = "未找到玩家";
public string InvalidArguments { get; } = "無效的參數";
public string NoPermission { get; } = "你沒有權限執行此動作!";
public string CommandNotFound { get; } = "該指令不存在!輸入 '/help' 來取幫助";
public string TargetOffline { get; } = "目標玩家 {0}({1}) 離線!清除前目標";
public string TargetFound { get; } = "找到目標玩家 {0}({1}),下次輸入指令時將預設對其執行";
public string TargetNotFound { get; } = "未找到目標玩家 {0}!";
public string InternalError { get; } = "處理令時發生內部錯誤";
public string PlayerNotFound { get; } = "未找到玩家!";
public string InvalidArguments { get; } = "無效的參數!";
public string NoPermission { get; } = "你沒有權限這麼做!";
public string CommandNotFound { get; } = "未找到命令! 輸入 '/help' 來取幫助";
public string TargetOffline { get; } = "目標 {0}({1}) 離線!清除前目標";
public string TargetFound { get; } = "找到目標 {0}({1}),下一次命令將默認對其執行";
public string TargetNotFound { get; } = "未找到目標 {0}!";
public string InternalError { get; } = "處理令時發生內部錯誤!";
}
/// <summary>
/// path: Game.Command.Hero
/// </summary>
public class HeroTextCHT
public class HeroTextCHS
{
public string Desc { get; } = "切換主角的性別或型態";
public string Desc { get; } = "切換主角的性別/形態";
public string Usage { get; } = "/hero <gender [1/2 - 1為男性,2為女性]>/<type [8001/8003/8005 - 分別為 毀滅 存護 同諧]>";
public string GenderNotSpecified { get; } = "性別不存在";
public string HeroTypeNotSpecified { get; } = "主角類型不存在";
public string GenderChanged { get; } = "性別已變更!";
public string HeroTypeChanged { get; } = "主角類型已變更!";
public string GenderNotSpecified { get; } = "性別不存在!";
public string HeroTypeNotSpecified { get; } = "主角類型不存在!";
public string GenderChanged { get; } = "性別已更改!";
public string HeroTypeChanged { get; } = "主角類型已更改!";
}
/// <summary>
/// path: Game.Command.UnlockAll
/// </summary>
public class UnlockAllTextCHT
public class UnlockAllTextCHS
{
public string Desc { get; } = "解鎖所有在類別內的對象";
public string Usage { get; } = "/unlockall <mission - mission為任務>";
public string AllMissionsUnlocked { get; } = "已解鎖所有任務";
public string AllMissionsUnlocked { get; } = "所有任務已解鎖!";
}
/// <summary>
/// path: Game.Command.Avatar
/// </summary>
public class AvatarTextCHT
public class AvatarTextCHS
{
public string Desc { get; } = "設定玩家已有角色屬性";
public string Usage { get; } = "/avatar <talent [角色ID/-1] [行跡等級] - 設行跡等級 角色ID為-1」將鎖定所有角色>/<get [角色ID] - 獲取角色>/<rank [角色ID/-1] [星魂]>/<level [角色ID/-1] [角色等級]>";
public string InvalidLevel { get; } = "無效{0}等級";
public string AllAvatarsLevelSet { get; } = "已將所有角色 {0} 等級設定為{1}";
public string AvatarLevelSet { get; } = "已將 {0} 角色 {1} 等級設定為{2}";
public string AvatarNotFound { get; } = "角色不存在";
public string AvatarGet { get; } = "已成功取得角色 {0}";
public string AvatarFailedGet { get; } = "取角色 {0} 失敗";
public string Desc { get; } = "設定玩家已有角色屬性";
public string Usage { get; } = "/avatar <talent [角色ID/-1] [行跡等級] - 設行跡等級 角色ID為-1意為所有擁有角色>/<get [角色ID] - 獲取角色>/<rank [角色ID/-1] [星魂]>/<level [角色ID/-1] [角色等級]>";
public string InvalidLevel { get; } = "無效 {0}等級";
public string AllAvatarsLevelSet { get; } = "已將全部角色 {0}等級設置為 {1}";
public string AvatarLevelSet { get; } = "已將 {0} 角色 {1}等級設置為 {2}";
public string AvatarNotFound { get; } = "角色不存在!";
public string AvatarGet { get; } = "獲取到角色 {0}!";
public string AvatarFailedGet { get; } = "取角色 {0} 失敗!";
}
/// <summary>
/// path: Game.Command.Give
/// </summary>
public class GiveTextCHT
public class GiveTextCHS
{
public string Desc { get; } = "給予玩家物品";
public string Usage { get; } = "/give <物品ID> l<等級> x<數量> r<疊影>";
public string ItemNotFound { get; } = "該物品不存在!";
public string GiveItem { get; } = "給予玩家 @{0} {1} 個物品 {2}";
public string ItemNotFound { get; } = "未找到物品!";
public string GiveItem { get; } = "給予 @{0} {1} 個物品 {2}";
}
/// <summary>
/// path: Game.Command.GiveAll
/// </summary>
public class GiveAllTextCHT
public class GiveAllTextCHS
{
public string Desc { get; } = "給予玩家全部指類型物品";
public string Usage { get; } = "/giveall <avatar - 角色/equipment - 光錐/relic - 遺器/unlock - 泡等奢侈品> r<疊影> l<等級> x<數量>";
public string Desc { get; } = "給予玩家全部指類型物品";
public string Usage { get; } = "/giveall <avatar - 角色/equipment - 光錐/relic - 遺器/unlock - 泡等奢侈品> r<疊影> l<等級> x<數量>";
public string GiveAllItems { get; } = "已給予所有 {0}, 各 {1} 個";
}
/// <summary>
/// path: Game.Command.Lineup
/// </summary>
public class LineupTextCHT
public class LineupTextCHS
{
public string Desc { get; } = "管理玩家隊伍";
public string Usage { get; } = "/lineup <mp [技點數量 - 最高為2]>/<heal - 治癒>";
public string PlayerGainedMp { get; } = "玩家已獲得 {0} 技點";
public string HealedAllAvatars { get; } = "成功治癒所有於目前隊伍中角色";
public string Desc { get; } = "管理玩家隊伍";
public string Usage { get; } = "/lineup <mp [技點數量 - 最高兩個]>/<heal - 治癒>";
public string PlayerGainedMp { get; } = "玩家已獲得 {0} 技點";
public string HealedAllAvatars { get; } = "成功治癒前隊伍中的所有角色";
}
/// <summary>
/// path: Game.Command.Help
/// </summary>
public class HelpTextCHT
public class HelpTextCHS
{
public string Desc { get; } = "顯示幫助息";
public string Desc { get; } = "顯示幫助息";
public string Usage { get; } = "/help";
public string Commands { get; } = "指令:";
public string CommandUsage { get; } = "|使用方法:";
public string Commands { get; } = "命令:";
public string CommandUsage { get; } = "用法: ";
}
/// <summary>
/// path: Game.Command.Kick
/// </summary>
public class KickTextCHT
public class KickTextCHS
{
public string Desc { get; } = "踢出玩家";
public string Usage { get; } = "/kick";
public string PlayerKicked { get; } = "玩家 {0} 已被踢出";
public string PlayerKicked { get; } = "玩家 {0} 已被踢出!";
}
/// <summary>
/// path: Game.Command.Mission
/// </summary>
public class MissionTextCHT
public class MissionTextCHS
{
public string Desc { get; } = "管理玩家任務";
public string Usage { get; } = "/mission <unlockall - 完成所有任務>/<pass - 完成所有進行中之任務>/<finish [副任務ID] - 完成指定任務>/<running - 取正在進行以及可能存在問題之任務>/<reaccept [主任務ID] - 重新進行指定主任務>";
public string AllMissionsFinished { get; } = "已完成所有任務";
public string AllRunningMissionsFinished { get; } = "已完成共 {0} 個進行中任務";
public string MissionFinished { get; } = "任務 {0} 已完成";
public string InvalidMissionId { get; } = "無效任務ID";
public string NoRunningMissions { get; } = "目前沒有進行中之任務";
public string Desc { get; } = "管理玩家任務";
public string Usage { get; } = "/mission <unlockall - 完成所有任務>/<pass - 完成所有正在進行的任務>/<finish [副任務ID] - 完成指定任務>/<running - 取正在進行的任務以及可能卡住的任務>/<reaccept [主任務ID] - 重新進行指定主任務>";
public string AllMissionsFinished { get; } = "所有任務已完成!";
public string AllRunningMissionsFinished { get; } = "共 {0} 個進行中任務已完成!";
public string MissionFinished { get; } = "任務 {0} 已完成!";
public string InvalidMissionId { get; } = "無效任務ID!";
public string NoRunningMissions { get; } = "沒有正在進行的任務!";
public string RunningMissions { get; } = "正在進行的任務";
public string PossibleStuckMissions { get; } = "可岑存在問題之任務";
public string RunningMissions { get; } = "正在進行的任務:";
public string PossibleStuckMissions { get; } = "可能卡住的任務:";
public string MainMission { get; } = "主任務";
public string MissionReAccepted { get; } = "重新接受任務 {0}";
public string MissionReAccepted { get; } = "重新接受任務 {0}!";
}
/// <summary>
/// path: Game.Command.Relic
/// </summary>
public class RelicTextCHT
public class RelicTextCHS
{
public string Desc { get; } = "管理玩家遺器";
public string Desc { get; } = "管理玩家遺器";
public string Usage { get; } = "/relic <遺器ID> <主詞條ID> <小詞條ID1:小詞條等級> <小詞條ID2:小詞條等級> <小詞條ID3:小詞條等級> <小詞條ID4:小詞條等級> l<等級> x<數量>";
public string RelicNotFound { get; } = "遺器不存在";
public string InvalidMainAffixId { get; } = "主詞條ID不存在!";
public string InvalidSubAffixId { get; } = "副詞條ID不存在!";
public string RelicGiven { get; } = "給予玩家 @{0} {1} 個遺器 {2}, 主詞條 {3}";
public string RelicNotFound { get; } = "遺器不存在!";
public string InvalidMainAffixId { get; } = "主詞條ID無效";
public string InvalidSubAffixId { get; } = "副詞條ID無效";
public string RelicGiven { get; } = "給予玩家 @{0} {1} 個遺器 {2}, 主詞條 {3}";
}
/// <summary>
/// path: Game.Command.Reload
/// </summary>
public class ReloadTextCHT
public class ReloadTextCHS
{
public string Desc { get; } = "重新載指定的設定";
public string Usage { get; } = "/reload <設定名稱>(banner - 卡池, activity - 活動)";
public string ConfigReloaded { get; } = "設定 {0} 已重新載入完成!";
public string Desc { get; } = "重新載指定的配置";
public string Usage { get; } = "/reload <配置名>(banner - 卡池, activity - 活動)";
public string ConfigReloaded { get; } = "配置 {0} 已重新加載!";
}
/// <summary>
/// path: Game.Command.Rogue
/// </summary>
public class RogueTextCHT
public class RogueTextCHS
{
public string Desc { get; } = "管理玩家模擬宇宙中的資料";
public string Desc { get; } = "管理玩家模擬宇宙中的數據";
public string Usage { get; } = "/rogue <money [宇宙碎片數量]>/<buff [祝福ID/-1 (-1 - 全部祝福)]>/<miracle [奇物ID]>/<enhance [祝福ID/-1]>/<unstuck - 脫離事件>";
public string PlayerGainedMoney { get; } = "玩家已獲得 {0} 宇宙碎片";
public string PlayerGainedAllItems { get; } = "玩家已獲得所有{0}";
@@ -263,35 +322,46 @@ namespace EggLink.DanhengServer.Internationalization.Message
public string PlayerEnhancedBuff { get; } = "玩家已強化祝福 {0}";
public string PlayerEnhancedAllBuffs { get; } = "玩家已強化所有祝福";
public string PlayerUnstuck { get; } = "玩家已脫離事件";
public string NotFoundItem { get; } = "{0} 不存在!";
public string NotFoundItem { get; } = "未找到 {0}!";
}
/// <summary>
/// path: Game.Command.Scene
/// </summary>
public class SceneTextCHT
public class SceneTextCHS
{
public string Desc { get; } = "管理玩家場景";
public string Usage { get; } = "/scene <prop [組ID] [道具ID] [狀態] - 設道具狀態>/<remove [實體ID] - 移除實體>/<unlockall - 解鎖所有道具>/<change [場景entranceId] - 進入指定場景>/<reload - 重新入場景>";
public string LoadedGroups { get; } = "已載組: {0}";
public string PropStateChanged { get; } = "道具: {0} 的狀態已設為 {1}";
public string PropNotFound { get; } = "該道具不存在!";
public string Desc { get; } = "管理玩家場景";
public string Usage { get; } = "/scene <prop [組ID] [道具ID] [狀態] - 設道具狀態>/<remove [實體ID] - 移除實體>/<unlockall - 解鎖所有道具>/<change [場景entranceId] - 進入指定場景>/<reload - 重新入場景>";
public string LoadedGroups { get; } = "已載組: {0}";
public string PropStateChanged { get; } = "道具: {0} 的狀態已設為 {1}";
public string PropNotFound { get; } = "未找到道具!";
public string EntityRemoved { get; } = "實體 {0} 已被移除";
public string EntityNotFound { get; } = "該實體不存在!";
public string AllPropsUnlocked { get; } = "已解鎖全部道具!";
public string EntityNotFound { get; } = "未找到實體!";
public string AllPropsUnlocked { get; } = "所有道具已解鎖!";
public string SceneChanged { get; } = "已進入場景 {0}";
public string SceneReloaded { get; } = "場景已重新讀取!";
public string SceneReloaded { get; } = "場景已重新加載!";
public string SceneReset { get; } = "已重置場景 {0} 中所有道具狀態!";
}
/// <summary>
/// path: Game.Command.Mail
/// </summary>
public class MailTextCHT
public class MailTextCHS
{
public string Desc { get; } = "管理家的郵件";
public string Desc { get; } = "管理家的郵件";
public string Usage { get; } = "/mail <send [發送名稱] [標題] [內容] [模板ID] [過期天數] - 發送郵件>/<send [發送者] [標題] [內容] [模板ID] [過期天數] [附件] - 發送帶附件的郵件>";
public string MailSent { get; } = "郵件已發送";
public string MailSentWithAttachment { get; } = "帶附件的郵件已發送";
public string MailSent { get; } = "郵件已發送!";
public string MailSentWithAttachment { get; } = "帶附件的郵件已發送!";
}
/// <summary>
/// path: Game.Command.Raid
/// </summary>
public class RaidTextCHS
{
public string Desc { get; } = "管理玩家的任務臨時場景";
public string Usage { get; } = "/raid <leave - 離開臨時場景>";
public string Leaved { get; } = "已離開臨時場景!";
}
#endregion

View File

@@ -31,6 +31,7 @@ namespace EggLink.DanhengServer.Internationalization.Message
public class ServerTextEN
{
public WebTextEN Web { get; } = new();
public ServerInfoTextEN ServerInfo { get; } = new();
}
/// <summary>
@@ -49,6 +50,38 @@ namespace EggLink.DanhengServer.Internationalization.Message
public string Buff { get; } = "Blessing";
public string Miracle { get; } = "Curio";
public string Unlock { get; } = "Luxury";
// server info
public string Config { get; } = "Config File";
public string Language { get; } = "Language";
public string Log { get; } = "Log";
public string GameData { get; } = "Game Data";
public string Database { get; } = "Database";
public string Command { get; } = "Command";
public string WebServer { get; } = "Web Server";
public string Plugin { get; } = "Plugin";
public string Handler { get; } = "Packet Handler";
public string Dispatch { get; } = "Global Dispatch";
public string Game { get; } = "Game";
public string Handbook { get; } = "Handbook";
public string NotFound { get; } = "Not Found";
public string Error { get; } = "Error";
public string FloorInfo { get; } = "Floor Info";
public string FloorGroupInfo { get; } = "Floor Group Info";
public string FloorMissingResult { get; } = "Teleportation and World Generation";
public string FloorGroupMissingResult { get; } = "Teleportation, Monster Battles, and World Generation";
public string Mission { get; } = "Mission";
public string MissionInfo { get; } = "Mission Info";
public string MazeSkill { get; } = "Maze Skill";
public string MazeSkillInfo { get; } = "Maze Skill Info";
public string Dialogue { get; } = "Simulated Universe Event";
public string DialogueInfo { get; } = "Simulated Universe Event Info";
public string Performance { get; } = "Performance";
public string PerformanceInfo { get; } = "Performance Info";
public string RogueChestMap { get; } = "Simulated Universe Map";
public string RogueChestMapInfo { get; } = "Simulated Universe Map Info";
public string ChessRogueRoom { get; } = "Simulated Universe DLC";
public string ChessRogueRoomInfo { get; } = "Simulated Universe DLC Info";
}
#endregion
@@ -78,6 +111,7 @@ namespace EggLink.DanhengServer.Internationalization.Message
public SceneTextEN Scene { get; } = new();
public UnlockAllTextEN UnlockAll { get; } = new();
public MailTextEN Mail { get; } = new();
public RaidTextEN Raid { get; } = new();
}
#endregion
@@ -91,6 +125,32 @@ namespace EggLink.DanhengServer.Internationalization.Message
{
}
/// <summary>
/// path: Server.ServerInfo
/// </summary>
public class ServerInfoTextEN
{
public string Shutdown { get; } = "Shutting down...";
public string CancelKeyPressed { get; } = "Cancel key pressed (Ctrl + C), server shutting down...";
public string StartingServer { get; } = "Starting DanhengServer...";
public string LoadingItem { get; } = "Loading {0}...";
public string RegisterItem { get; } = "Registered {0} {1}(s).";
public string FailedToLoadItem { get; } = "Failed to load {0}.";
public string FailedToInitializeItem { get; } = "Failed to initialize {0}.";
public string FailedToReadItem { get; } = "Failed to read {0}, file {1}";
public string GeneratedItem { get; } = "Generated {0}.";
public string LoadedItem { get; } = "Loaded {0}.";
public string LoadedItems { get; } = "Loaded {0} {1}(s).";
public string ServerRunning { get; } = "{0} server listening on {1}";
public string ServerStarted { get; } = "Startup complete! Took {0}s, better than 99% of users. Type 'help' for command help"; // This is a meme, consider localizing in English
public string MissionEnabled { get; } = "Mission system enabled. This feature is still in development and may not work as expected. Please report any bugs to the developers.";
public string ConfigMissing { get; } = "{0} is missing. Please check your resource folder: {1}, {2} may not be available.";
public string UnloadedItems { get; } = "Unloaded all {0}.";
public string SaveDatabase { get; } = "Database saved in {0}s";
}
#endregion
#endregion
@@ -279,6 +339,7 @@ namespace EggLink.DanhengServer.Internationalization.Message
public string AllPropsUnlocked { get; } = "All props have been unlocked!";
public string SceneChanged { get; } = "Entered scene {0}";
public string SceneReloaded { get; } = "Scene has been reloaded!";
public string SceneReset { get; } = "The prop state in floor {0} has been reset!";
}
/// <summary>
@@ -287,11 +348,21 @@ namespace EggLink.DanhengServer.Internationalization.Message
public class MailTextEN
{
public string Desc { get; } = "Manage player's mails";
public string Usage { get; } = "/mail <send [Sender Name] [Title] [Content] [Template ID] [Expire Days] - 發送郵件>/<send [Sender] [Title] [Content] [Template ID] [Expire Days] [Attachments] - 發送帶附件的郵件>";
public string Usage { get; } = "/mail <send [Sender Name] [Title] [Content] [Template ID] [Expire Days] - Send Mail>/<send [Sender] [Title] [Content] [Template ID] [Expire Days] [Attachments] - Send Mail with attachment>";
public string MailSent { get; } = "Mail has been sent!";
public string MailSentWithAttachment { get; } = "Mail with attachments has been sent!";
}
/// <summary>
/// path: Game.Command.Raid
/// </summary>
public class RaidTextEN
{
public string Desc { get; } = "Manage player's temporary scene";
public string Usage { get; } = "/raid <leave - leave temporary scene>";
public string Leaved { get; } = "Leaved temporary scene!";
}
#endregion
#endregion

View File

@@ -29,17 +29,13 @@ using EggLink.DanhengServer.Server.Packet.Send.Scene;
using EggLink.DanhengServer.Util;
using EggLink.DanhengServer.Enums.Avatar;
using EggLink.DanhengServer.Server.Packet.Send.Avatar;
using System.Numerics;
using EggLink.DanhengServer.Game.Challenge;
using EggLink.DanhengServer.Game.Drop;
using static EggLink.DanhengServer.Plugin.Event.PluginEvent;
using EggLink.DanhengServer.Plugin.Event;
using EggLink.DanhengServer.Game.Task;
using EggLink.DanhengServer.GameServer.Game.Mail;
using EggLink.DanhengServer.GameServer.Game.Raid;
using EggLink.DanhengServer.GameServer.Game.Mission;
using SqlSugar;
using EggLink.DanhengServer.Database.Lineup;
namespace EggLink.DanhengServer.Game.Player
{
@@ -290,7 +286,6 @@ namespace EggLink.DanhengServer.Game.Player
}
OnLevelChange();
DatabaseHelper.Instance?.UpdateInstance(Data);
}
public void OnLevelChange()
@@ -454,7 +449,7 @@ namespace EggLink.DanhengServer.Game.Player
return null;
}
public bool EnterScene(int entryId, int teleportId, bool sendPacket, ChangeStoryLineAction storyLineAction = ChangeStoryLineAction.None, int storyLineId = 0)
public bool EnterScene(int entryId, int teleportId, bool sendPacket, ChangeStoryLineAction storyLineAction = ChangeStoryLineAction.None, int storyLineId = 0, bool mapTp = false)
{
if (storyLineId != StoryLineManager?.StoryLineData.CurStoryLineId)
{
@@ -489,7 +484,7 @@ namespace EggLink.DanhengServer.Game.Player
var beforeEntryId = Data.EntryId;
LoadScene(entrance.PlaneID, entrance.FloorID, entryId, anchor!.ToPositionProto(), anchor.ToRotationProto(), sendPacket, storyLineAction);
LoadScene(entrance.PlaneID, entrance.FloorID, entryId, anchor!.ToPositionProto(), anchor.ToRotationProto(), sendPacket, storyLineAction, mapTp);
var afterEntryId = Data.EntryId;
@@ -536,7 +531,7 @@ namespace EggLink.DanhengServer.Game.Player
SendPacket(new PacketSceneEntityMoveScNotify(this));
}
public void LoadScene(int planeId, int floorId, int entryId, Position pos, Position rot, bool sendPacket, ChangeStoryLineAction storyLineAction = ChangeStoryLineAction.None)
public void LoadScene(int planeId, int floorId, int entryId, Position pos, Position rot, bool sendPacket, ChangeStoryLineAction storyLineAction = ChangeStoryLineAction.None, bool mapTp = false)
{
GameData.MazePlaneData.TryGetValue(planeId, out var plane);
if (plane == null) return;
@@ -566,7 +561,7 @@ namespace EggLink.DanhengServer.Game.Player
Data.FloorId = floorId;
Data.EntryId = entryId;
}
else if (StoryLineManager?.StoryLineData.CurStoryLineId == 0)
else if (StoryLineManager?.StoryLineData.CurStoryLineId == 0 && mapTp) // only send move packet when not in story line and mapTp
{
notSendMove = false;
}

View File

@@ -14,7 +14,7 @@ namespace EggLink.DanhengServer.Game.Rogue.Buff
public int HintId { get; set; } = 1;
public List<RogueBuffExcel> Buffs { get; set; } = [];
public int RollMaxCount { get; set; } = rogue.BaseRerollCount;
public int RollCount { get; set; } = 0;
public int RollCount { get; set; } = rogue.BaseRerollCount;
public int RollFreeCount { get; set; } = rogue.BaseRerollFreeCount;
public int RollCost { get; set; } = rogue.CurRerollCost;
public int QueueAppend { get; set; } = 3;

View File

@@ -14,7 +14,7 @@ namespace EggLink.DanhengServer.Server.Packet.Recv.Scene
public override void OnHandle(Connection connection, byte[] header, byte[] data)
{
var req = EnterSceneCsReq.Parser.ParseFrom(data);
var overMapTp = connection.Player?.EnterScene((int)req.EntryId, (int)req.TeleportId, true, storyLineId:(int) req.GameStoryLineId);
var overMapTp = connection.Player?.EnterScene((int)req.EntryId, (int)req.TeleportId, true, storyLineId:(int)req.GameStoryLineId, mapTp:req.MapTp);
connection.SendPacket(new PacketEnterSceneScRsp(overMapTp == true, req.MapTp, (int)req.GameStoryLineId));
}