//clone constructor
 public StashListEntry(StashListEntry entry)
 {
     //pass over the reference to the item
     _Item      = entry.Item;
     _Hue       = entry.Hue;
     StashEntry = entry.StashEntry;
 }
		//constructor
		public AddStashColumnGump( Mobile owner, StashEntry stashentry ) : base( 500, 20 )
		{
			_StashEntry = stashentry;
			
			_Owner = owner;
			
			//clear old gumps that are up
			_Owner.CloseGump( typeof( AddStashColumnGump ) );
			
			//set up the page
			AddPage(0);
            
			//determine page layout, sizes, and what gets displayed where
			DeterminePageLayout();

			//add the background			            
            AddBackground(0, 0, _Width, _Height, 9270);
            AddImageTiled(11, 10, _Width - 23, _Height - 20, 2624);
            AddAlphaRegion(11, 10, _Width - 22, _Height - 20);
            
            AddTitle();
            
            //if there was a problem when adding the property listing
            if( !AddColumnEntries() )
            {
	            //clear old gumps that are up
				_Owner.CloseGump( typeof( AddStashColumnGump ) );
	            return;
            }
		}
Пример #3
0
 //this performs a cloning of the stash list entries within the specified stash entry
 public void CloneStashListEntries(StashEntry sourceentry)
 {
     foreach (StashListEntry entry in sourceentry.StashListEntries)
     {
         StashListEntry cloneentry = entry.Clone();
         cloneentry.StashEntry = this;               //need to explicitly pass the reference to this new list into clone
         StashListEntries.Add(cloneentry);
     }
 }
		public static bool RefreshGump( Mobile player, StashEntry stashentry )
		{
			//if this mobile has a stash entry gump up
			if( player.HasGump( typeof( StashEntryGump ) ) )
			{
				StashEntryGump gump = (StashEntryGump)player.FindGump( typeof( StashEntryGump ) );
				
				//if this gump that's up is showing this list entry, or if none was specified, then refresh
				if( stashentry == null || gump.StashEntry == stashentry )
				{
					//then, resend this gump!
					player.SendGump( new StashEntryGump( gump ) );
					return true;
				}
			}
			
			return false;
		}
Пример #5
0
            StashEntry _StashEntry;     //reference the list entry

            //constructor
            public AddItemTarget(StashEntry stashentry) : base(1, false, TargetFlags.None)
            {
                _StashEntry = stashentry;
            }
Пример #6
0
 //clone constructor
 public StashEntry(StashEntry entry) : this(entry.Type, entry.Name, entry.MaxEntries, entry.SortData, entry.Height, entry.X, entry.Y, entry.StashListEntries)
 {
 }
		//master constructor, with page number specified
		public StashEntryGump( Mobile owner, StashEntry stashentry, int page ) : base( 50, 350 )
		{
			if( !( owner is PlayerMobile ) )
			{
				return;
			}
			
			_Owner = (PlayerMobile)owner;
			_StashEntry = stashentry;
			
			
			_FilterButtonIDOffset = _FilterButtonsPerColumn * _StashEntry.SortData.Count;
			
			//clear old gumps that are up
			_Owner.CloseGump( typeof( StashEntryGump ) );
			
			//set up the page
			AddPage(0);
            
			_Page = page;
			
			ApplyFilters();
			
			//determine page layout, sizes, and what gets displayed where
			DeterminePageLayout();

			//add the background			            
            AddBackground(0, 0, _Width, _Height, 9270);
            AddImageTiled(11, 10, _Width - 23, _Height - 20, 2624);
            AddAlphaRegion(11, 10, _Width - 22, _Height - 20);
            
            AddTitle();
            
            //if there was a problem when adding the entries
            if( !AddStashEntryListing() )
            {
	            //clear old gumps that are up
				_Owner.CloseGump( typeof( StashEntryGump ) );
	            return;
            }
            if( _MaxPages > 1 )
            {
	            AddPageButtons();
            }
            
            AddControlButtons();
		}
		//default first page constructor
		public StashEntryGump( Mobile owner, StashEntry stashentry ) : this( owner, stashentry, 0 )
		{
		}
		//clone constructor
		public StashListEntry( StashListEntry entry )
		{
			//pass over the reference to the item
			_Item = entry.Item;
			_Hue = entry.Hue;
			StashEntry = entry.StashEntry;
			
		}
Пример #10
0
		//this performs a cloning of the stash list entries within the specified stash entry		
		public void CloneStashListEntries( StashEntry sourceentry )
		{
			foreach( StashListEntry entry in sourceentry.StashListEntries )
			{
				StashListEntry cloneentry = entry.Clone();
				cloneentry.StashEntry = this;				//need to explicitly pass the reference to this new list into clone
				StashListEntries.Add( cloneentry );
			}
		}
Пример #11
0
			StashEntry _StashEntry;		//reference the list entry
			
			//constructor
			public AddItemTarget( StashEntry stashentry ) :  base ( 1, false, TargetFlags.None ) 
			{
				_StashEntry = stashentry;
			}
Пример #12
0
		//clone constructor 
		public StashEntry( StashEntry entry ) : this( entry.Type, entry.Name, entry.MaxEntries, entry.SortData, entry.Height, entry.X, entry.Y, entry.StashListEntries )
		{
		}