public ClaimListGump(AAnimalTrainer trainer, Mobile from, List <BaseCreature> list) : base(50, 50) //ArrayList list ) : base( 50, 50 ) { m_Trainer = trainer; m_From = from; m_List = list; from.CloseGump(typeof(ClaimListGump)); AddPage(0); AddBackground(0, 0, 325, 50 + (list.Count * 20), 9250); AddAlphaRegion(5, 5, 315, 40 + (list.Count * 20)); AddHtml(15, 15, 275, 20, "<BASEFONT COLOR=#FFFFFF>Select a pet to retrieve from the stables:</BASEFONT>", false, false); for (int i = 0; i < list.Count; ++i) { BaseCreature pet = list[i]; //as BaseCreature; if (pet == null || pet.Deleted) { continue; } AddButton(15, 39 + (i * 20), 10006, 10006, i + 1, GumpButtonType.Reply, 0); AddHtml(32, 35 + (i * 20), 275, 18, String.Format("<BASEFONT COLOR=#C0C0EE>{0}</BASEFONT>", pet.Name), false, false); } }
public ClaimListGump( AAnimalTrainer trainer, Mobile from, List<BaseCreature> list ) : base( 50, 50 ) //ArrayList list ) : base( 50, 50 ) { m_Trainer = trainer; m_From = from; m_List = list; from.CloseGump( typeof( ClaimListGump ) ); AddPage( 0 ); AddBackground( 0, 0, 325, 50 + (list.Count * 20), 9250 ); AddAlphaRegion( 5, 5, 315, 40 + (list.Count * 20) ); AddHtml( 15, 15, 275, 20, "<BASEFONT COLOR=#FFFFFF>Select a pet to retrieve from the stables:</BASEFONT>", false, false ); for ( int i = 0; i < list.Count; ++i ) { BaseCreature pet = list[i]; //as BaseCreature; if ( pet == null || pet.Deleted ) continue; AddButton( 15, 39 + (i * 20), 10006, 10006, i + 1, GumpButtonType.Reply, 0 ); AddHtml( 32, 35 + (i * 20), 275, 18, String.Format( "<BASEFONT COLOR=#C0C0EE>{0}</BASEFONT>", pet.Name ), false, false ); } }
public override void OnDoubleClick( Mobile from ) { if ( !IsChildOf( from.Backpack ) ) { from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. } else if ( from.AccessLevel >= AccessLevel.GameMaster ) { from.SendLocalizedMessage( 503248 ); // Your godly powers allow you to place this vendor whereever you wish. Mobile v = new AAnimalTrainer();//( from, BaseHouse.FindHouseAt( from ) ); v.Direction = from.Direction & Direction.Mask; v.MoveToWorld( from.Location, from.Map ); this.Delete(); } else { BaseHouse house = BaseHouse.FindHouseAt( from ); if ( house == null ) { from.SendLocalizedMessage( 503240 ); // Vendors can only be placed in houses. } else if ( BaseHouse.NewVendorSystem && !house.IsOwner( from ) ) { from.SendLocalizedMessage( 1062423 ); // Only the house owner can directly place vendors. Please ask the house owner to offer you a vendor contract so that you may place a vendor in this house. } else if ( !house.Public || !house.CanPlaceNewVendor() ) { from.SendLocalizedMessage( 503241 ); // You cannot place this vendor or barkeep. Make sure the house is public and has sufficient storage available. } else { bool vendor, contract; BaseHouse.IsThereVendor( from.Location, from.Map, out vendor, out contract ); if ( vendor ) { from.SendLocalizedMessage( 1062677 ); // You cannot place a vendor or barkeep at this location. } else if ( contract ) { from.SendLocalizedMessage( 1062678 ); // You cannot place a vendor or barkeep on top of a rental contract! } else { Mobile v = new AAnimalTrainer();//( from, house ); v.Direction = from.Direction & Direction.Mask; v.MoveToWorld( from.Location, from.Map ); //v.SayTo( from, 503246 ); // Ah! it feels good to be working again. this.Delete(); } } } }
public override void GetContextMenuEntries(Mobile from, List <ContextMenuEntry> list) { BaseHouse house = BaseHouse.FindHouseAt(from); if (house != null && from.Alive) { if (house.IsOwner(from) && house.IsInside(from)) { AAnimalTrainer.GetContextMenuEntries(from, this, list); //HERE } base.GetContextMenuEntries(from, list); } }
public StableEntry(AAnimalTrainer trainer, Mobile from) : base(6126, 12) { m_Trainer = trainer; m_From = from; }
public StableTarget(AAnimalTrainer trainer) : base(12, false, TargetFlags.None) { m_Trainer = trainer; }
public ClaimAllEntry(AAnimalTrainer trainer, Mobile from) : base(6127, 12) { m_Trainer = trainer; m_From = from; }
public StableEntry( AAnimalTrainer trainer, Mobile from ) : base( 6126, 12 ) { m_Trainer = trainer; m_From = from; }
public StableTarget( AAnimalTrainer trainer ) : base( 12, false, TargetFlags.None ) { m_Trainer = trainer; }
public ClaimAllEntry( AAnimalTrainer trainer, Mobile from ) : base( 6127, 12 ) { m_Trainer = trainer; m_From = from; }