コード例 #1
0
ファイル: Commands.cs プロジェクト: tflynt91/TrueUO
        public override void ExecuteList(CommandEventArgs e, ArrayList list)
        {
            try
            {
                string[]          args      = e.Arguments;
                ObjectConditional condition = ObjectConditional.Parse(e.Mobile, ref args);

                for (int i = 0; i < list.Count; ++i)
                {
                    if (condition.CheckCondition(list[i]))
                    {
                        AddResponse("True - that object matches the condition.");
                    }
                    else
                    {
                        AddResponse("False - that object does not match the condition.");
                    }
                }
            }
            catch (Exception ex)
            {
                e.Mobile.SendMessage(ex.Message);
                Diagnostics.ExceptionLogging.LogException(ex);
            }
        }
コード例 #2
0
        public override void ExecuteList(CommandEventArgs e, List <object> list)
        {
            try
            {
                var args      = e.Arguments;
                var condition = ObjectConditional.Parse(e.Mobile, ref args);

                for (var i = 0; i < list.Count; ++i)
                {
                    if (condition.CheckCondition(list[i]))
                    {
                        AddResponse("True - that object matches the condition.");
                    }
                    else
                    {
                        AddResponse("False - that object does not match the condition.");
                    }
                }
            }
            catch (Exception ex)
            {
                e.Mobile.SendMessage(ex.Message);
            }
        }