Пример #1
0
        public void Send()
        {
            if (ConsoleWindow.HasInstance())
            {
                PlayerAttrType Type = (PlayerAttrType)AttrType;

                ConsoleWindow.instance.AddMessage(
                    string.Format("Server Set Player {0} to {1}", Type.ToString(), Value)
                    );
            }
        }
Пример #2
0
        protected override string Execute(string[] InArguments)
        {
            if (ConsoleWindow.HasInstance())
            {
                PlayerAttrType Type  = (PlayerAttrType)StringToEnum(InArguments[0], typeof(PlayerAttrType));
                int            Value = SmartConvert <int>(InArguments[1]);

                ConsoleWindow.instance.AddMessage(
                    string.Format("Set Player {0} to {1}", Type.ToString(), Value)
                    );

                return(Done);
            }

            return("No Console Window");
        }
Пример #3
0
        protected override string Execute(string[] InArguments)
        {
            if (ConsoleWindow.HasInstance())
            {
                ListCommandTargetType TargetType = (ListCommandTargetType)StringToEnum(InArguments[0], typeof(ListCommandTargetType));

                if (TargetType == ListCommandTargetType.Group)
                {
                    var Repositories = CheatCommandsRepository.instance.repositories;
                    var Iter         = Repositories.GetEnumerator();

                    while (Iter.MoveNext())
                    {
                        ConsoleWindow.instance.AddMessage(Iter.Current.Key);
                    }
                }
                else if (TargetType == ListCommandTargetType.Command)
                {
                    var AllCommands = CheatCommandsRepository.instance.generalRepositories.Commands;
                    var Iter        = AllCommands.GetEnumerator();

                    while (Iter.MoveNext())
                    {
                        ConsoleWindow.instance.AddMessage(Iter.Current.Value.fullyHelper);
                    }
                }
                else
                {
                    DebugHelper.Assert(false, "internal error!");
                }

                return(Done);
            }

            return("Without Console Window Instance.");
        }