mirror of
https://github.com/EggLinks/DanhengServer-OpenSource.git
synced 2026-01-02 20:26:03 +08:00
feat: command UnlockAll param rogue tutorial
This commit is contained in:
@@ -39,7 +39,62 @@ public class CommandUnlockAll : ICommand
|
||||
player.AvatarManager!.GetHero()!.PathId = 8002;
|
||||
}
|
||||
|
||||
await arg.SendMsg(I18NManager.Translate("Game.Command.UnlockAll.AllMissionsUnlocked"));
|
||||
await arg.SendMsg(I18NManager.Translate("Game.Command.UnlockAll.UnlockedAll", I18NManager.Translate("Word.Mission")));
|
||||
await arg.Target!.Player!.SendPacket(new PacketPlayerKickOutScNotify());
|
||||
arg.Target!.Stop();
|
||||
}
|
||||
|
||||
[CommandMethod("0 tutorial")]
|
||||
public async ValueTask UnlockAllTutorial(CommandArg arg)
|
||||
{
|
||||
if (arg.Target == null)
|
||||
{
|
||||
await arg.SendMsg(I18NManager.Translate("Game.Command.Notice.PlayerNotFound"));
|
||||
return;
|
||||
}
|
||||
|
||||
var player = arg.Target!.Player!;
|
||||
|
||||
foreach (var data in GameData.TutorialDataData)
|
||||
{
|
||||
player.TutorialData!.Tutorials[data.Key] = TutorialStatus.TutorialFinish;
|
||||
}
|
||||
|
||||
foreach (var data in GameData.TutorialGuideDataData)
|
||||
{
|
||||
player.TutorialGuideData!.Tutorials[data.Key] = TutorialStatus.TutorialFinish;
|
||||
}
|
||||
|
||||
await arg.SendMsg(I18NManager.Translate("Game.Command.UnlockAll.UnlockedAll", I18NManager.Translate("Word.Tutorial")));
|
||||
await arg.Target!.Player!.SendPacket(new PacketPlayerKickOutScNotify());
|
||||
arg.Target!.Stop();
|
||||
}
|
||||
|
||||
[CommandMethod("0 rogue")]
|
||||
public async ValueTask UnlockAllRogue(CommandArg arg)
|
||||
{
|
||||
if (arg.Target == null)
|
||||
{
|
||||
await arg.SendMsg(I18NManager.Translate("Game.Command.Notice.PlayerNotFound"));
|
||||
return;
|
||||
}
|
||||
|
||||
var player = arg.Target!.Player!;
|
||||
List<int> swarmList = [8013101, 8013102, 8013103, 8013104, 8013105, 8013106, 8013107, 8013108, 8013109, 8013110];
|
||||
List<int> ggList = [8016101, 8016102, 8016103, 8016104, 8016105, 8016106];
|
||||
List<int> duList = [8023401, 8023501, 8023601];
|
||||
List<int> udList = [8026401, 8026402];
|
||||
|
||||
List<int> allList = [.. swarmList, .. ggList, .. duList, .. udList];
|
||||
|
||||
foreach (var id in allList)
|
||||
{
|
||||
// finish mission
|
||||
await player.MissionManager!.AcceptMainMission(id);
|
||||
await player.MissionManager!.FinishMainMission(id);
|
||||
}
|
||||
|
||||
await arg.SendMsg(I18NManager.Translate("Game.Command.UnlockAll.UnlockedAll", I18NManager.Translate("Word.TypesOfRogue")));
|
||||
await arg.Target!.Player!.SendPacket(new PacketPlayerKickOutScNotify());
|
||||
arg.Target!.Stop();
|
||||
}
|
||||
|
||||
18
Common/Data/Excel/TutorialDataExcel.cs
Normal file
18
Common/Data/Excel/TutorialDataExcel.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
namespace EggLink.DanhengServer.Data.Excel;
|
||||
|
||||
[ResourceEntity("TutorialData.json")]
|
||||
public class TutorialDataExcel : ExcelResource
|
||||
{
|
||||
public int TutorialID { get; set; }
|
||||
public int Priority { get; set; }
|
||||
|
||||
public override int GetId()
|
||||
{
|
||||
return TutorialID;
|
||||
}
|
||||
|
||||
public override void Loaded()
|
||||
{
|
||||
GameData.TutorialDataData.Add(TutorialID, this);
|
||||
}
|
||||
}
|
||||
17
Common/Data/Excel/TutorialGuideDataExcel.cs
Normal file
17
Common/Data/Excel/TutorialGuideDataExcel.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
namespace EggLink.DanhengServer.Data.Excel;
|
||||
|
||||
[ResourceEntity("TutorialGuideData.json")]
|
||||
public class TutorialGuideDataExcel : ExcelResource
|
||||
{
|
||||
public int ID { get; set; }
|
||||
|
||||
public override int GetId()
|
||||
{
|
||||
return ID;
|
||||
}
|
||||
|
||||
public override void Loaded()
|
||||
{
|
||||
GameData.TutorialGuideDataData.Add(ID, this);
|
||||
}
|
||||
}
|
||||
@@ -287,6 +287,13 @@ public static class GameData
|
||||
|
||||
#endregion
|
||||
|
||||
#region Tutorial
|
||||
|
||||
public static Dictionary<int, TutorialDataExcel> TutorialDataData { get; private set; } = [];
|
||||
public static Dictionary<int, TutorialGuideDataExcel> TutorialGuideDataData { get; private set; } = [];
|
||||
|
||||
#endregion
|
||||
|
||||
#region Actions
|
||||
|
||||
public static void GetFloorInfo(int planeId, int floorId, out FloorInfo outer)
|
||||
|
||||
@@ -86,6 +86,7 @@ public class WordTextCHS
|
||||
public string SummonUnitInfo => "秘技生成文件";
|
||||
public string RogueTournRoom => "差分宇宙";
|
||||
public string RogueTournRoomInfo => "差分宇宙房间文件";
|
||||
public string TypesOfRogue => "类型的模拟宇宙";
|
||||
public string RogueMagicRoom => "不可知域";
|
||||
public string RogueMagicRoomInfo => "不可知域房间文件";
|
||||
public string RogueDiceSurface => "骰面效果";
|
||||
@@ -94,6 +95,7 @@ public class WordTextCHS
|
||||
public string AdventureModifierInfo => "AdventureModifier文件";
|
||||
|
||||
public string DatabaseAccount => "数据库账号";
|
||||
public string Tutorial => "教程";
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -215,10 +217,12 @@ public class UnlockAllTextCHS
|
||||
{
|
||||
public string Desc =>
|
||||
"解锁所有在类别内的对象\n" +
|
||||
"使用 /unlockall mission 以完成所有任务,使用后会被踢出,重新登录后可能会被教程卡住,请谨慎使用";
|
||||
"使用 /unlockall mission 以完成所有任务,使用后会被踢出,重新登录后可能会被教程卡住,请谨慎使用\n" +
|
||||
"使用 /unlockall tutorial 以解锁所有教程,使用后会被踢出,用于部分界面卡住无法行动的情况\n" +
|
||||
"使用 /unlockall rogue 以解锁所有类型模拟宇宙,使用后会被踢出,建议与 /unlockall tutorial 搭配使用以获取更好效果";
|
||||
|
||||
public string Usage => "用法:/unlockall mission";
|
||||
public string AllMissionsUnlocked => "所有任务已解锁!";
|
||||
public string Usage => "用法:/unlockall [mission/tutorial/rogue]";
|
||||
public string UnlockedAll => "已解锁/完成所有{0}!";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -43,7 +43,7 @@ public class WordTextCHT
|
||||
public string Equipment => "光錐";
|
||||
public string Talent => "行跡";
|
||||
public string Banner => "卡池";
|
||||
public string VideoKeys => "游戲CGKey";
|
||||
public string VideoKeys => "遊戲CG密鑰";
|
||||
public string Activity => "活動";
|
||||
public string Buff => "祝福";
|
||||
public string Miracle => "奇物";
|
||||
@@ -86,6 +86,7 @@ public class WordTextCHT
|
||||
public string SummonUnitInfo => "秘技生成文件";
|
||||
public string RogueTournRoom => "差分宇宙";
|
||||
public string RogueTournRoomInfo => "差分宇宙房間文件";
|
||||
public string TypesOfRogue => "類型的模擬宇宙";
|
||||
public string RogueMagicRoom => "不可知域";
|
||||
public string RogueMagicRoomInfo => "不可知域房間文件";
|
||||
public string RogueDiceSurface => "骰面效果";
|
||||
@@ -94,6 +95,7 @@ public class WordTextCHT
|
||||
public string AdventureModifierInfo => "AdventureModifier文件";
|
||||
|
||||
public string DatabaseAccount => "數據庫賬號";
|
||||
public string Tutorial => "教程";
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -138,7 +140,7 @@ public class CommandTextCHT
|
||||
/// </summary>
|
||||
public class WebTextCHT
|
||||
{
|
||||
public string Maintain => "服务器正在维修,请稍后尝试。";
|
||||
public string Maintain => "服務器正在維修,請稍後嘗試。";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -152,7 +154,7 @@ public class ServerInfoTextCHT
|
||||
public string LoadingItem => "正在加載 {0}…";
|
||||
public string RegisterItem => "註冊了 {0} 個 {1}。";
|
||||
public string FailedToLoadItem => "加載 {0} 失敗。";
|
||||
public string NewClientSecretKey => "客戶端密鑰不存在,正在產生新的客戶端密鑰。";
|
||||
public string NewClientSecretKey => "客戶端密鑰不存在,正在生成新的客戶端密鑰。";
|
||||
public string FailedToInitializeItem => "初始化 {0} 失敗。";
|
||||
public string FailedToReadItem => "讀取 {0} 失敗,文件{1}";
|
||||
public string GeneratedItem => "已生成 {0}。";
|
||||
@@ -167,7 +169,7 @@ public class ServerInfoTextCHT
|
||||
public string SaveDatabase => "已保存數據庫,用時 {0}s";
|
||||
public string WaitForAllDone => "現在還不可以進入遊戲,請等待所有項目加載完成後再試";
|
||||
|
||||
public string UnhandledException => "未處理的異常:{0}";
|
||||
public string UnhandledException => "發生未經處理的異常:{0}";
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -185,7 +187,7 @@ public class NoticeTextCHT
|
||||
{
|
||||
public string PlayerNotFound => "未找到玩家!";
|
||||
public string InvalidArguments => "無效的參數!";
|
||||
public string NoPermission => "你沒有權限這麼做!";
|
||||
public string NoPermission => "你沒有權限這麽做!";
|
||||
public string CommandNotFound => "未找到命令! 輸入 '/help' 來獲取幫助";
|
||||
public string TargetOffline => "目標 {0}({1}) 離線了!清除當前目標";
|
||||
public string TargetFound => "找到目標 {0}({1}),下一次命令將默認對其執行";
|
||||
@@ -199,7 +201,7 @@ public class NoticeTextCHT
|
||||
public class HeroTextCHT
|
||||
{
|
||||
public string Desc =>
|
||||
"切換主角的性別/形態\n當切換性別時,genderId為1代表男性,2代表女性\n當切換形態時,8001代表毀滅命途,8003代表存護命途,8005代表同諧命途。\n注意,切換性別時會清空所有可選命途以及行跡,為不可逆操作!";
|
||||
"切換主角的性別/形態\n當切換性別時,genderId為1代表男性,2代表女性\n當切換形態時,8001代表毀滅命途,8003代表存護命途,8005代表同諧命途。\n註意,切換性別時會清空所有可選命途以及行跡,為不可逆操作!";
|
||||
|
||||
public string Usage => "用法:/hero gender [genderId]\n\n用法:/hero type [typeId]";
|
||||
public string GenderNotSpecified => "性別不存在!";
|
||||
@@ -215,10 +217,12 @@ public class UnlockAllTextCHT
|
||||
{
|
||||
public string Desc =>
|
||||
"解鎖所有在類別內的對象\n" +
|
||||
"使用 /unlockall mission 以完成所有任務,使用後會被踢出,重新登錄後可能會被教程卡住,請謹慎使用";
|
||||
"使用 /unlockall mission 以完成所有任務,使用後會被踢出,重新登錄後可能會被教程卡住,請謹慎使用\n" +
|
||||
"使用 /unlockall tutorial 以解鎖所有教程,使用後會被踢出,用於部分界面卡住無法行動的情況\n" +
|
||||
"使用 /unlockall rogue 以解鎖所有類型模擬宇宙,使用後會被踢出,建議與 /unlockall tutorial 搭配使用以獲取更好效果";
|
||||
|
||||
public string Usage => "用法:/unlockall mission";
|
||||
public string AllMissionsUnlocked => "所有任務已解鎖!";
|
||||
public string Usage => "用法:/unlockall [mission/tutorial/rogue]";
|
||||
public string UnlockedAll => "已解鎖/完成所有{0}!";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -226,7 +230,7 @@ public class UnlockAllTextCHT
|
||||
/// </summary>
|
||||
public class AvatarTextCHT
|
||||
{
|
||||
public string Desc => "設定玩家已有角色的屬性\n設置行跡等級時,設置X級即設置所有行跡節點至X級,若大於此節點允許的最高等級,設置為最高等級\n注意:-1意為所有已擁有角色";
|
||||
public string Desc => "設定玩家已有角色的屬性\n設置行跡等級時,設置X級即設置所有行跡節點至X級,若大於此節點允許的最高等級,設置為最高等級\n註意:-1意為所有已擁有角色";
|
||||
|
||||
public string Usage =>
|
||||
"用法:/avatar talent [角色ID/-1] [行跡等級]\n\n用法:/avatar get [角色ID]\n\n用法:/avatar rank [角色ID/-1] [星魂]\n\n用法:/avatar level [角色ID/-1] [角色等級]";
|
||||
@@ -271,7 +275,7 @@ public class LineupTextCHT
|
||||
public string Desc => "管理玩家的隊伍\n秘技點一次性只能獲得兩個";
|
||||
public string Usage => "用法:/lineup mp [秘技點數量]\n\n用法:/lineup heal";
|
||||
public string PlayerGainedMp => "玩家已獲得 {0} 秘技點";
|
||||
public string HealedAllAvatars => "成功治癒當前隊伍中的所有角色";
|
||||
public string HealedAllAvatars => "成功治愈當前隊伍中的所有角色";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -283,7 +287,7 @@ public class HelpTextCHT
|
||||
public string Usage => "用法:/help\n\n用法:/help [命令]";
|
||||
public string Commands => "命令:";
|
||||
public string CommandPermission => "所需權限: ";
|
||||
public string CommandAlias => "命令彆名:";
|
||||
public string CommandAlias => "命令別名:";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -303,8 +307,8 @@ public class MissionTextCHT
|
||||
{
|
||||
public string Desc =>
|
||||
"管理玩家的任務\n" +
|
||||
"使用 pass 完成當前正在進行的所有任務,此命令易造成嚴重卡頓,請儘量使用 /mission finish 替代\n" +
|
||||
"使用 running 獲取正在進行的任務以及可能卡住的任務,使用後可能會出現較長任務列表,請注意甄別\n" +
|
||||
"使用 pass 完成當前正在進行的所有任務,此命令易造成嚴重卡頓,請盡量使用 /mission finish 替代\n" +
|
||||
"使用 running 獲取正在進行的任務以及可能卡住的任務,使用後可能會出現較長任務列表,請註意甄別\n" +
|
||||
"使用 reaccept 可重新進行指定主任務,請瀏覽 handbook 來獲取主任務ID";
|
||||
|
||||
public string Usage =>
|
||||
@@ -328,7 +332,7 @@ public class MissionTextCHT
|
||||
/// </summary>
|
||||
public class RelicTextCHT
|
||||
{
|
||||
public string Desc => "管理玩家的遺器\n主詞條可選,副詞條可選,但至少存在其中之一\n等級限制:1≤等級≤9999";
|
||||
public string Desc => "管理玩家的遺器\n主詞條可選,副詞條可選,但至少存在其中之一\n等級限製:1≤等級≤9999";
|
||||
|
||||
public string Usage =>
|
||||
"用法:/relic <遺器ID> <主詞條ID> <小詞條ID1:小詞條等級> <小詞條ID2:小詞條等級> <小詞條ID3:小詞條等級> <小詞條ID4:小詞條等級> l<等級> x<數量>";
|
||||
@@ -376,12 +380,12 @@ public class SceneTextCHT
|
||||
{
|
||||
public string Desc =>
|
||||
"管理玩家場景\n" +
|
||||
"提示:此組大多為調試使用,使用命令前,請確保你清楚你在做什麼!\n" +
|
||||
"提示:此組大多為調試使用,使用命令前,請確保你清楚你在做什麽!\n" +
|
||||
"使用 prop 來設置道具狀態,在Common/Enums/Scene/PropStateEnum.cs獲取狀態列表\n" +
|
||||
"使用 unlockall 來解鎖場景內所有道具(即將所有能設置為open狀態的道具設置為open狀態),此命令有較大可能會導致遊戲加載卡條約90%,使用 /scene reset <floorId> 來解決問題\n" +
|
||||
"使用 change 來進入指定場景,要獲取EntryId,請訪問 Resources/MapEntrance.json\n" +
|
||||
"使用 reload 來重新加載當前場景,並回到初始位置\n" +
|
||||
"使用 reset 來重置指定塲景所有道具狀態,要穫取噹前FloorId,請使用 /scene cur";
|
||||
"使用 reset 來重置指定場景所有道具狀態,要獲取當前FloorId,請使用 /scene cur";
|
||||
|
||||
public string Usage =>
|
||||
"用法:/scene prop [組ID] [道具ID] [狀態]\n\n用法:/scene remove [實體ID]\n\n用法:/scene unlockall\n\n用法:/scene change [entryId]\n\n用法:/scene reload\n\n用法:/scene reset <floorId>";
|
||||
@@ -395,7 +399,7 @@ public class SceneTextCHT
|
||||
public string SceneChanged => "已進入場景 {0}";
|
||||
public string SceneReloaded => "場景已重新加載!";
|
||||
public string SceneReset => "已重置場景 {0} 中所有道具狀態!";
|
||||
public string CurrentScene => "噹前塲景Entry Id: {0}, Plane Id: {1}, Floor Id: {2}";
|
||||
public string CurrentScene => "當前場景Entry Id: {0}, Plane Id: {1}, Floor Id: {2}";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -424,7 +428,7 @@ public class RaidTextCHT
|
||||
/// </summary>
|
||||
public class AccountTextCHT
|
||||
{
|
||||
public string Desc => "創建賬號\n注意:此命令未經測試,請謹慎使用!";
|
||||
public string Desc => "創建賬號\n註意:此命令未經測試,請謹慎使用!";
|
||||
public string Usage => "用法:/account create <用戶名>";
|
||||
public string InvalidUid => "無效UID參數!";
|
||||
public string CreateError => "出現內部錯誤 {0} ";
|
||||
|
||||
@@ -86,6 +86,7 @@ public class WordTextEN
|
||||
public string SummonUnitInfo => "Summon Unit File";
|
||||
public string RogueTournRoom => "Divergent Rogue Room";
|
||||
public string RogueTournRoomInfo => "Divergent Rogue Room File";
|
||||
public string TypesOfRogue => "types of rogue";
|
||||
public string RogueMagicRoom => "Unknowable Domain Room";
|
||||
public string RogueMagicRoomInfo => "Unknowable Domain Room File";
|
||||
public string RogueDiceSurface => "Dice Surface Effect";
|
||||
@@ -94,6 +95,7 @@ public class WordTextEN
|
||||
public string AdventureModifierInfo => "AdventureModifier File";
|
||||
|
||||
public string DatabaseAccount => "Database Account";
|
||||
public string Tutorial => "Tutorial";
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -225,10 +227,12 @@ public class UnlockAllTextEN
|
||||
{
|
||||
public string Desc =>
|
||||
"Unlock the objects in given category\n" +
|
||||
"Use '/unlockall mission' to finish all missions, and the target player will be kicked, after re-login, the player may be stuck in tutorial, please use with caution";
|
||||
"Use '/unlockall mission' to finish all missions, and the target player will be kicked, after re-login, the player may be stuck in tutorial, please use with caution" +
|
||||
"Use '/unlockall tutorial' to unlock all tutorials, and the target player will be kicked, used for being stuck in some pages\n" +
|
||||
"Use '/unlockall rogue' to unlock all types of rogue, and the target player will be kicked, used with '/unlockall tutorial' to get better performance";
|
||||
|
||||
public string Usage => "Usage: /unlockall mission";
|
||||
public string AllMissionsUnlocked => "All missions have been unlocked!";
|
||||
public string Usage => "Usage:/unlockall [mission/tutorial/rogue]";
|
||||
public string UnlockedAll => "Unlocked/Finished All {0}!";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user