/
NLObP
/
AAEmu
Обзор
Документация
Войти
/
NLObP
/
AAEmu
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
AAEmu.Game/Utils/Scripts/SubCommands/World/WorldSetGeodatamodeSubCommand.cs
30 строк
1 KB
ZeromusXYZ
[Game] Rewrite SendMessage to have arguments removed (#824)
24 фев 2024, 16:37
Не верифицирован
24 фев 2024, 16:37
502f5b9
Код
Авторство
О чём код?
using System.Collections.Generic; using System.Drawing; using AAEmu.Game.Core.Managers; using AAEmu.Game.Models.Game.Char; namespace AAEmu.Game.Utils.Scripts.SubCommands.World; public class WorldSetGeodatamodeSubCommand : SubCommandBase { public WorldSetGeodatamodeSubCommand() { Title = "[World Set GeoDataMode]"; Description = "Setting the GeoDataMode"; CallPrefix = $"{CommandManager.CommandPrefix}geodatamode"; AddParameter(new StringSubCommandParameter("GeoDataMode", "GeoDataMode", true)); } public override void Execute(ICharacter character, string triggerArgument, IDictionary<string, ParameterValue> parameters, IMessageOutput messageOutput) { string geoDataMode = parameters["GeoDataMode"]; if (geoDataMode is "") { SendColorMessage(messageOutput, Color.Coral, $"GeoDataMode must be an 'true' or 'false'"); return; } character.SetGeoDataMode(geoDataMode == "true"); SendMessage(messageOutput, $"Set GeoDataMode: {geoDataMode}"); Logger.Warn($"{Title}: {geoDataMode}"); } }