/
NLObP
/
AAEmu
Обзор
Документация
Войти
/
NLObP
/
AAEmu
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
AAEmu.Game/Scripts/Commands/MoveAll.cs
43 строки
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.Core.Managers.World; using AAEmu.Game.Core.Packets.G2C; using AAEmu.Game.Models.Game; using AAEmu.Game.Models.Game.Char; using AAEmu.Game.Models.Game.Teleport; using AAEmu.Game.Utils.Scripts; namespace AAEmu.Game.Scripts.Commands; public class MoveAll : ICommand { public string[] CommandNames { get; set; } = ["moveall", "move_all"]; public void Execute(Character character, string[] args, IMessageOutput messageOutput) { foreach (var otherChar in WorldManager.Instance.GetAllCharacters()) { if (otherChar != character) { otherChar.DisabledSetPosition = true; otherChar.SendPacket(new SCTeleportUnitPacket(TeleportReason.Gm, 0, character.Transform.World.Position.X, character.Transform.World.Position.Y, character.Transform.World.Position.Z + 1.0f, 0f)); } } } public void OnLoad() { CommandManager.Instance.Register(CommandNames, this); } public string GetCommandLineHelp() { return ""; } public string GetCommandHelpText() { return "Moves every player to your location"; } }