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)); }
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); } }
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); } } }
public override void Process(CmdTrigger <RealmServerCmdArgs> trigger) { CallCommand.Call(trigger, trigger.Args.Character.ExtraInfo.SelectedGO, true); }