/
NLObP
/
AAEmu
Обзор
Документация
Войти
/
NLObP
/
AAEmu
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
AAEmu.Game/Scripts/Commands/TestEcho.cs
41 строка
1 KB
Roger Barreto
Collection expressions check + blank lines update (#1110)
11 дек 2024, 19:38
Не верифицирован
11 дек 2024, 19:38
0ce5643
Код
Авторство
О чём код?
using AAEmu.Game.Core.Managers; using AAEmu.Game.Models.Game; using AAEmu.Game.Models.Game.Char; using AAEmu.Game.Utils.Scripts; namespace AAEmu.Game.Scripts.Commands; public class TestEcho : ICommand { public string[] CommandNames { get; set; } = ["echo"]; public void OnLoad() { CommandManager.Instance.Register(CommandNames, this); } public string GetCommandLineHelp() { return "<text>"; } public string GetCommandHelpText() { return "Repeats the provided arguments in chat as raw text"; } public void Execute(Character character, string[] args, IMessageOutput messageOutput) { var s = string.Empty; foreach (var a in args) { s = s + a + " "; } // Un-escape the string, as the client sends it escaped // It is required if you want to test things like @NPC_NAME() and |cFF00FFFF text colors |r // s = s.Replace("@@", "@").Replace("||", "|"); character.SendMessage("|cFFFFFFFF[Echo]|r " + s); } }