示例#1
0
        //CONSOLE MSG
        public static void HandleConsole(BigEndianReader reader, WorldClient client, WorldServer server)
        {
            AdminCommandMessage message = new AdminCommandMessage();

            message.Unpack(reader);
            string[] args = message.content.Split(' ');
            switch (args[0])
            {
            case "ADDITEM":
                int Id = int.Parse(args[1]);
                client.Send(new ObjectAddedMessage(new ObjectItem(
                                                       63,
                                                       (short)Id,
                                                       0,
                                                       false,
                                                       new ObjectEffect[0],
                                                       0,
                                                       1
                                                       )));
                break;

            case "TPMAP":
                client.Send(new CurrentMapMessage(int.Parse(args[1])));
                break;

            default:
                break;
            }
        }
示例#2
0
        public static void HandleAuthAdminCommand(BigEndianReader reader, AuthClient client, AuthServer server)
        {
            //TODO HANDLE AUTH COMMANDS
            AdminCommandMessage message = new AdminCommandMessage();

            message.Unpack(reader);

            switch (message.content.Split(' ')[0])
            {
            default:
                client.Send(new ConsoleMessage((sbyte)ConsoleMessageTypeEnum.CONSOLE_ERR_MESSAGE, "Unknown command"));
                break;
            }

            Out.Debug($"User {client.account.Pseudo} performed command '{message.content}'");
        }