コード例 #1
0
        public object Eval(CmdTrigger <RealmServerCmdArgs> trigger, bool replySuccess)
        {
            object obj = trigger.EvalNextOrTargetOrUser();

            if (!trigger.CheckPossibleContext(obj))
            {
                return((object)null);
            }
            return(CallCommand.Call(trigger, obj, replySuccess));
        }
コード例 #2
0
        public override void Process(CmdTrigger <RealmServerCmdArgs> trigger)
        {
            object obj = trigger.EvalNextOrTargetOrUser();

            if (obj is IContextHandler)
            {
                ((IContextHandler)obj).ExecuteInContext((Action)(() => CallCommand.Call(trigger, obj, true)));
            }
            else
            {
                CallCommand.Call(trigger, obj, true);
            }
        }
コード例 #3
0
            public override void Process(CmdTrigger <RealmServerCmdArgs> trigger)
            {
                var slot = trigger.Text.NextEnum(InventorySlot.Invalid);

                if (slot == InventorySlot.Invalid)
                {
                    trigger.Reply("Invalid slot.");
                }
                else
                {
                    var item = ((Character)trigger.Args.Target).Inventory[slot];
                    if (item == null)
                    {
                        trigger.Reply("There is no Item in slot " + slot);
                    }
                    else
                    {
                        CallCommand.Call(trigger, item);
                    }
                }
            }
コード例 #4
0
 public override void Process(CmdTrigger <RealmServerCmdArgs> trigger)
 {
     CallCommand.Call(trigger, trigger.Args.Character.ExtraInfo.SelectedGO, true);
 }