コード例 #1
0
		public ConfirmRewardGump( IComunityCollection collection, Point3D location, CollectionItem item, int hue ) : base()
		{
			m_Collection = collection;
			m_Location = location;
			m_Item = item;
			m_Hue = hue;
			
			if ( m_Item != null )			
				AddItem( 150, 100, m_Item.ItemID, m_Item.Hue );
		}
コード例 #2
0
		public virtual void Reward( PlayerMobile player, CollectionItem reward, int hue )
		{
			Item item = QuestHelper.Construct( reward.Type ) as Item;
			
			if ( item != null && player.AddToBackpack( item ) )
			{
				if ( hue > 0 )
					item.Hue = hue;
				
				player.AddCollectionPoints( CollectionID, (int) reward.Points * -1 );
				player.SendLocalizedMessage( 1073621 ); // Your reward has been placed in your backpack.
				player.PlaySound( 0x5A7 );	
			}			
			else if ( item != null )
			{
				player.SendLocalizedMessage( 1074361 ); // The reward could not be given.  Make sure you have room in your pack.
				item.Delete();
			}
			
			reward.OnGiveReward( player, this, hue );	
			
			player.SendGump( new ComunityCollectionGump( player, this, Location ) );
		}
コード例 #3
0
		public virtual void Donate( PlayerMobile player, CollectionItem item, int amount )
		{
			int points = (int) ( amount * item.Points );
		
			player.AddCollectionPoints( CollectionID, points );
			
			player.SendLocalizedMessage( 1072816 ); // Thank you for your donation!
			player.SendLocalizedMessage( 1072817, points.ToString() ); // You have earned ~1_POINTS~ reward points for this donation.	
			player.SendLocalizedMessage( 1072818, points.ToString() ); // The Collection has been awarded ~1_POINTS~ points
			
			Points += points;
			
			InvalidateProperties();
		}
コード例 #4
0
ファイル: Gumps.cs プロジェクト: Ravenwolfe/ServUO
        public override void OnConfirmed(CollectionItem citem, int index)
        {
            base.OnConfirmed(citem, index);

            PointsSystem.Blackthorn.DeductPoints(User, citem.Points);
        }
コード例 #5
0
			public InternalPrompt( IComunityCollection collection, CollectionItem selected, Point3D location )
			{
				m_Collection = collection;
				m_Selected = selected;
				m_Location = location;
			}
コード例 #6
0
		public ConfirmRewardGump( IComunityCollection collection, Point3D location, CollectionItem item ) : this( collection, location, item, 0 )
		{
		}
コード例 #7
0
ファイル: BaseRewardGump.cs プロジェクト: Ravenwolfe/ServUO
		public aConfirmRewardGump(Mobile owner, CollectionItem item, int index, Action<CollectionItem, int> callback)
		{
			Item = item;
            Index = index;
			Owner = owner;

            ConfirmCallback = callback;
		}
コード例 #8
0
ファイル: BaseRewardGump.cs プロジェクト: Ravenwolfe/ServUO
        public virtual int GetItemHue(Item i, CollectionItem item)
        {
            int hue = 0x3E9;

            if (Points >= item.Points)
                hue = item.Hue;

            return hue;
        }
コード例 #9
0
ファイル: BaseRewardGump.cs プロジェクト: Ravenwolfe/ServUO
        public virtual void OnConfirmed(CollectionItem citem, int index)
        {
            Item item = Activator.CreateInstance(citem.Type) as Item;

            if (item != null)
            {
                if (User.Backpack == null || !User.Backpack.TryDropItem(User, item, false))
                {
                    User.SendLocalizedMessage(1074361); // The reward could not be given.  Make sure you have room in your pack.
                    item.Delete();
                }
                else
                {
                    User.SendLocalizedMessage(1073621); // Your reward has been placed in your backpack.
                    User.PlaySound(0x5A8);
                }
            }
        }
コード例 #10
0
ファイル: Gumps.cs プロジェクト: Ravenwolfe/ServUO
        public override void OnConfirmed(CollectionItem citem, int index)
        {
            base.OnConfirmed(citem, index);

            PointsSystem.CleanUpBritannia.DeductPoints(User, citem.Points);
        }
コード例 #11
0
ファイル: Gumps.cs プロジェクト: Crome696/ServUO
		public ConfirmRewardGump(Mobile owner, CollectionItem item, int index)
		{
			Item = item;
            Index = index;
			Owner = owner;
		}