public override void OnResponse( NetState sender, RelayInfo info )
		{
			if ( info.ButtonID == 1 )
			{
				if ( !RewardSystem.HasAccess( m_From, m_Entry ) )
					return;

				Item item = m_Entry.Construct();

				if ( item != null )
				{
					if ( item is Server.Items.RedSoulstone )
						((Server.Items.RedSoulstone) item).Account = m_From.Account.Username;	
					
					if ( RewardSystem.ConsumeRewardPoint( m_From ) )
						m_From.AddToBackpack( item );
					else
						item.Delete();
				}
			}

			int cur, max;

			RewardSystem.ComputeRewardInfo( m_From, out cur, out max );

			if ( cur < max )
				m_From.SendGump( new RewardNoticeGump( m_From ) );
		}
        public override void OnResponse(NetState sender, RelayInfo info)
        {
            if (info.ButtonID == 1)
            {
                if (!RewardSystem.HasAccess(m_From, m_Entry))
                {
                    return;
                }

                Item item = m_Entry.Construct();

                if (item != null)
                {
                    if (RewardSystem.ConsumeRewardPoint(m_From))
                    {
                        m_From.AddToBackpack(item);
                    }
                    else
                    {
                        item.Delete();
                    }
                }
            }

            int cur, max;

            RewardSystem.ComputeRewardInfo(m_From, out cur, out max);

            if (cur < max)
            {
                m_From.SendGump(new RewardNoticeGump(m_From));
            }
        }
Beispiel #3
0
        public override void OnResponse(NetState sender, RelayInfo info)
        {
            if (info.ButtonID == 1)
            {
                if (!RewardSystem.HasAccess(m_From, m_Entry))
                {
                    return;
                }

                Item item = m_Entry.Construct();

                if (item != null)
                {
                    if (item is Items.RedSoulstone)
                    {
                        ((Items.RedSoulstone)item).Account = m_From.Account.Username;
                    }

                    if (item is Items.LighthouseAddonDeed)
                    {
                        ((Items.LighthouseAddonDeed)item).Account = m_From.Account.Username;
                    }

                    if (RewardSystem.ConsumeRewardPoint(m_From))
                    {
                        #region TOL
                        if (item is Auction.AuctionSafeDeed)
                        {
                            for (int i = 0; i < 2; i++)
                            {
                                Item it = m_Entry.Construct();
                                m_From.AddToBackpack(it);
                            }
                        }
                        #endregion

                        m_From.AddToBackpack(item);
                    }
                    else
                    {
                        item.Delete();
                    }
                }
            }

            int cur, max;

            RewardSystem.ComputeRewardInfo(m_From, out cur, out max);

            if (cur < max)
            {
                m_From.SendGump(new RewardNoticeGump(m_From));
            }
        }
        public override void OnResponse(NetState sender, RelayInfo info)
        {
            if (info.ButtonID == 1)
            {
                if (!RewardSystem.HasAccess(m_From, m_Entry))
                {
                    return;
                }

                Item item = m_Entry.Construct();

                //ItemID Mods Begin
                if (item is Server.Items.BaseWeapon)
                {
                    ((Server.Items.BaseWeapon)item).Identified = true;
                }
                else if (item is Server.Items.BaseArmor)
                {
                    ((Server.Items.BaseArmor)item).Identified = true;
                }
                //ItemID Mods end

                if (item != null)
                {
                    if (item is Server.Items.RedSoulstone)
                    {
                        ((Server.Items.RedSoulstone)item).Account = m_From.Account.Username;
                    }

                    if (RewardSystem.ConsumeRewardPoint(m_From))
                    {
                        m_From.AddToBackpack(item);
                    }
                    else
                    {
                        item.Delete();
                    }
                }
            }

            int cur, max;

            RewardSystem.ComputeRewardInfo(m_From, out cur, out max);

            if (cur < max)
            {
                m_From.SendGump(new RewardNoticeGump(m_From));
            }
        }
Beispiel #5
0
        public override void OnResponse(NetState sender, RelayInfo info)
        {
            if (((sender.Mobile.Region is CustomRegion) && (((CustomRegion)sender.Mobile.Region).Controller.CannotTakeRewards)) || sender.Mobile.Region is GameRegion)
            {
                return;
            }

            if (info.ButtonID == 1)
            {
                if (!RewardSystem.HasAccess(m_From, m_Entry))
                {
                    return;
                }

                Item item = m_Entry.Construct();

                if (item != null)
                {
                    if (item is Server.Items.RedSoulstone)
                    {
                        ((Server.Items.RedSoulstone)item).Account = m_From.Account.Username;
                    }

                    if (RewardSystem.ConsumeRewardPoint(m_From))
                    {
                        m_From.AddToBackpack(item);
                    }
                    else
                    {
                        item.Delete();
                    }
                }
            }

            int cur, max;

            RewardSystem.ComputeRewardInfo(m_From, out cur, out max);

            if (cur < max)
            {
                m_From.SendGump(new RewardNoticeGump(m_From));
            }
        }
        public override void OnResponse(NetState sender, RelayInfo info)
        {
            if (info.ButtonID == 1)
            {
                if (!RewardSystem.HasAccess(this.m_From, this.m_Entry))
                {
                    return;
                }

                Item item = this.m_Entry.Construct();

                if (item != null)
                {
                    if (item is Server.Items.RedSoulstone)
                    {
                        ((Server.Items.RedSoulstone)item).Account = this.m_From.Account.Username;
                    }

                    if (item is Server.Items.LighthouseAddonDeed)
                    {
                        ((Server.Items.LighthouseAddonDeed)item).Account = this.m_From.Account.Username;
                    }

                    if (RewardSystem.ConsumeRewardPoint(this.m_From))
                    {
                        this.m_From.AddToBackpack(item);
                    }
                    else
                    {
                        item.Delete();
                    }
                }
            }

            int cur, max;

            RewardSystem.ComputeRewardInfo(this.m_From, out cur, out max);

            if (cur < max)
            {
                this.m_From.SendGump(new RewardNoticeGump(this.m_From));
            }
        }
Beispiel #7
0
        public override void OnResponse(NetState sender, RelayInfo info)
        {
            if (info.ButtonID == 1)
            {
                if (!RewardSystem.HasAccess(m_From, m_Entry))
                {
                    return;
                }

                var item = m_Entry.Construct();

                if (item != null)
                {
                    if (item is RedSoulstone soulstone)
                    {
                        soulstone.Account = m_From.Account.Username;
                    }

                    if (RewardSystem.ConsumeRewardPoint(m_From))
                    {
                        m_From.AddToBackpack(item);
                    }
                    else
                    {
                        item.Delete();
                    }
                }
            }

            RewardSystem.ComputeRewardInfo(m_From, out var cur, out var max);

            if (cur < max)
            {
                m_From.SendGump(new RewardNoticeGump(m_From));
            }
        }