mirror of
https://github.com/EggLinks/DanhengServer-OpenSource.git
synced 2026-01-03 12:46:03 +08:00
Add a new cmd
This commit is contained in:
27
Command/Command/Cmd/CommandRaid.cs
Normal file
27
Command/Command/Cmd/CommandRaid.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using EggLink.DanhengServer.Internationalization;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EggLink.DanhengServer.Command.Command.Cmd
|
||||
{
|
||||
[CommandInfo("raid", "Game.Command.Raid.Desc", "Game.Command.Raid.Usage", permission: "")]
|
||||
public class CommandRaid : ICommand
|
||||
{
|
||||
[CommandMethod("0 leave")]
|
||||
public void Leave(CommandArg arg)
|
||||
{
|
||||
if (arg.Target == null)
|
||||
{
|
||||
arg.SendMsg(I18nManager.Translate("Game.Command.Notice.PlayerNotFound"));
|
||||
return;
|
||||
}
|
||||
|
||||
arg.Target.Player!.RaidManager!.LeaveRaid(false);
|
||||
|
||||
arg.SendMsg(I18nManager.Translate("Game.Command.Raid.Leaved"));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -113,6 +113,7 @@ namespace EggLink.DanhengServer.Internationalization.Message
|
||||
public SceneTextCHS Scene { get; } = new();
|
||||
public UnlockAllTextCHS UnlockAll { get; } = new();
|
||||
public MailTextCHS Mail { get; } = new();
|
||||
public RaidTextCHS Raid { get; } = new();
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -352,6 +353,16 @@ namespace EggLink.DanhengServer.Internationalization.Message
|
||||
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
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user