public override void OnRequest(OrbClientInfo clientInfo, OrbRequestArgs reqArgs) { FindOnlineMobile(clientInfo); if(reqArgs == null || !(reqArgs is SelectItemsRequestArgs) || !this.IsOnline) SendResponse(null); _args = (SelectItemsRequestArgs)reqArgs; if(_args.SelectType == SelectTypes.Area) { BoundingBoxPickerEx picker = new BoundingBoxPickerEx(); picker.OnCancelled += new BoundingBoxExCancelled(OnTargetCancelled); picker.Begin( this.Mobile, new BoundingBoxCallback( BoundingBox_Callback ), null ); } else { UOAR_ObjectTarget target = new UOAR_ObjectTarget(); target.OnCancelled += new UOAR_ObjectTarget.TargetCancelEvent(OnTargetCancelled); target.OnTargetObject += new UOAR_ObjectTarget.TargetObjectEvent(OnTargetObject); this.Mobile.SendMessage("Target the first item you want to select."); // send the target to the char this.Mobile.Target = target; } }
public override void OnRequest(OrbClientInfo client, OrbRequestArgs args) { FindOnlineMobile(client); if (args == null) { SendResponse(null); } else if (!(args is ExtractRequestArgs)) { SendResponse(null); } else if (!this.IsOnline) { SendResponse(null); } _args = args as ExtractRequestArgs; if (_args.ItemSerials == null) { _picker = new BoundingBoxPickerEx(); _picker.OnCancelled += new BoundingBoxExCancelled(OnTargetCancelled); _picker.Begin(this.Mobile, new BoundingBoxCallback(BoundingBox_Callback), null); } else { ExtractItems(_args.ItemSerials); } }
public override void OnRequest(OrbClientInfo clientInfo, OrbRequestArgs reqArgs) { FindOnlineMobile(clientInfo); if (reqArgs == null || !(reqArgs is SelectItemsRequestArgs) || !this.IsOnline) { SendResponse(null); } _args = (SelectItemsRequestArgs)reqArgs; if (_args.SelectType == SelectTypes.Area) { BoundingBoxPickerEx picker = new BoundingBoxPickerEx(); picker.OnCancelled += new BoundingBoxExCancelled(OnTargetCancelled); picker.Begin(this.Mobile, new BoundingBoxCallback(BoundingBox_Callback), null); } else { UOAR_ObjectTarget target = new UOAR_ObjectTarget(); target.OnCancelled += new UOAR_ObjectTarget.TargetCancelEvent(OnTargetCancelled); target.OnTargetObject += new UOAR_ObjectTarget.TargetObjectEvent(OnTargetObject); this.Mobile.SendMessage("Target the first item you want to select."); // send the target to the char this.Mobile.Target = target; } }
private void BoundingBox_Callback(Mobile from, Map map, Point3D start, Point3D end, object state) { Utility.FixPoints(ref start, ref end); Rectangle2D rect = new Rectangle2D(start, end); _map = map; _rects.Add(new Rect2D(rect.Start.X, rect.Start.Y, rect.Width, rect.Height)); if (_args.MultipleRects) { _picker.Begin(this.Mobile, new BoundingBoxCallback(BoundingBox_Callback), null); } else { ExtractItems(); } }
public override void OnRequest(OrbClientInfo client, OrbRequestArgs args) { FindOnlineMobile(client); if(args == null) SendResponse(null); else if(!(args is ExtractRequestArgs)) SendResponse(null); else if(!this.IsOnline) SendResponse(null); _args = args as ExtractRequestArgs; if(_args.ItemSerials == null) { _picker = new BoundingBoxPickerEx(); _picker.OnCancelled += new BoundingBoxExCancelled(OnTargetCancelled); _picker.Begin( this.Mobile, new BoundingBoxCallback( BoundingBox_Callback ), null ); } else { ExtractItems(_args.ItemSerials); } }