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);
            }
        }
Esempio n. 3
0
        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);
			}
		}