public InternalTarget(BaseAddonDeed deed) : base(-1, true, TargetFlags.None) { this.m_Deed = deed; this.CheckLOS = false; }
public virtual BaseAddonDeed Redeed() { BaseAddonDeed deed = Deed; if (deed != null) { if (RetainDeedHue) { int hue = 0; for (int i = 0; hue == 0 && i < m_Components.Count; ++i) { AddonComponent c = (AddonComponent)m_Components[i]; if (c.Hue != 0) { hue = c.Hue; } } deed.Hue = hue; } return(deed); } return(null); }
public virtual void OnChop(Mobile from) { BaseHouse house = BaseHouse.FindHouseAt(this); #region High Seas BaseBoat boat = BaseBoat.FindBoatAt(from, from.Map); if (boat != null && boat is BaseGalleon) { ((BaseGalleon)boat).OnChop(this, from); return; } #endregion if (house != null && (house.IsOwner(from) || (house.Addons.ContainsKey(this) && house.Addons[this] == from))) { Effects.PlaySound(GetWorldLocation(), Map, 0x3B3); from.SendLocalizedMessage(500461); // You destroy the item. int hue = 0; if (RetainDeedHue) { for (int i = 0; hue == 0 && i < m_Components.Count; ++i) { AddonComponent c = m_Components[i]; if (c.Hue != 0) { hue = c.Hue; } } } Delete(); house.Addons.Remove(this); BaseAddonDeed deed = GetDeed(); if (deed != null) { if (RetainDeedHue) { deed.Hue = hue; } else { deed.Hue = 0; } deed.IsReDeed = true; from.AddToBackpack(deed); } } else { from.SendLocalizedMessage(1113134); // You can only redeed items in your own house! } }
public InternalTarget( BaseAddonDeed deed ) : base(-1, true, TargetFlags.None) { m_Deed = deed; CheckLOS = false; }
private InternalTarget(BaseAddonDeed deed, bool secondtime, Point3D point) : base(-1, true, TargetFlags.None) { m_Deed = deed; m_SecondTime = secondtime; m_Point = point; CheckLOS = false; }
public CarpetGump(BaseAddonDeed deed, IPoint3D p, Map map, int width, int height) : base(30, 30) { m_Deed = deed; m_P3D = p; m_Map = map; m_Width = width; m_Height = height; AddPage(0); AddBackground(0, 0, 450, 180, 9200); AddAlphaRegion(12, 12, 381, 22); AddHtml(13, 13, 379, 20, "<BASEFONT COLOR=WHITE>Choose a carpet type</BASEFONT>", false, false); AddAlphaRegion(398, 12, 40, 22); AddAlphaRegion(12, 39, 426, 129); AddImage(400, 16, 9766); AddImage(420, 16, 9762); AddPage(1); int page = 1; for (int i = 0, index = 0; i < CarpetInfo.Infos.Length; ++i, ++index) { if (index >= EntryCount) { if ((EntryCount * page) == EntryCount) { AddImage(400, 16, 0x2626); } AddButton(420, 16, 0x15E1, 0x15E5, 0, GumpButtonType.Page, page + 1); ++page; index = 0; AddPage(page); AddButton(400, 16, 0x15E3, 0x15E7, 0, GumpButtonType.Page, page - 1); if ((CarpetInfo.Infos.Length - (EntryCount * page)) < EntryCount) { AddImage(420, 16, 0x2622); } } CarpetInfo info = CarpetInfo.GetInfo(i); for (int j = 0; j < info.Entries.Length; ++j) { AddItem(20 + (index * 140) + info.Entries[j].OffsetX, 46 + info.Entries[j].OffsetY, info.Entries[j].ItemID); } AddButton(20 + (index * 140), 46, 1209, 1210, i + 1, GumpButtonType.Reply, 0); } }
public virtual BaseAddonDeed GetDeed() { BaseAddonDeed deed = Deed; if (deed != null) { deed.Resource = this.Resource; } return(deed); }
public VinyardGroundGump( BaseAddonDeed deed, IPoint3D p, Map map, int width, int height ) : base( 30, 30 ) { m_Deed = deed; m_P3D = p; m_Map = map; m_Width = width; m_Height = height; AddPage( 0 ); AddBackground( 0, 0, 450, 160, 9250 ); AddAlphaRegion( 12, 12, 381, 22 ); AddHtml( 13, 13, 379, 20, "<BASEFONT COLOR=WHITE>Choose a ground type</BASEFONT>", false, false ); AddAlphaRegion( 398, 12, 40, 22 ); AddAlphaRegion( 12, 39, 426, 109 ); AddImage( 400, 16, 9766 ); AddImage( 420, 16, 9762 ); AddPage( 1 ); int page = 1; for ( int i = 0, index = 0; i < VinyardGroundInfo.Infos.Length; ++i, ++index ) { if ( index >= EntryCount ) { if ( (EntryCount * page) == EntryCount ) AddImage( 400, 16, 0x2626 ); AddButton( 420, 16, 0x15E1, 0x15E5, 0, GumpButtonType.Page, page + 1 ); ++page; index = 0; AddPage( page ); AddButton( 400, 16, 0x15E3, 0x15E7, 0, GumpButtonType.Page, page - 1 ); if ( (VinyardGroundInfo.Infos.Length - (EntryCount * page)) < EntryCount ) AddImage( 420, 16, 0x2622 ); } VinyardGroundInfo info = VinyardGroundInfo.GetInfo( i ); for ( int j = 0; j < info.Entries.Length; ++j ) { if (info.Entries[j].OffsetX >= 0 && info.Entries[j].OffsetY >= 0 ) AddItem( 20 + (index * 140 ) + info.Entries[j].OffsetX, 46 + info.Entries[j].OffsetY, info.Entries[j].ItemID ); } AddButton( 20 + (index * 140 ), 46, 1209, 1210, i+1, GumpButtonType.Reply, 0); } }
public virtual void OnChop(Mobile from) { BaseHouse house = BaseHouse.FindHouseAt(this); #region High Seas BaseBoat boat = BaseBoat.FindBoatAt(from, from.Map); if (boat != null && boat is BaseGalleon) { ((BaseGalleon)boat).OnChop(this, from); return; } #endregion if (house != null && house.IsOwner(from) && house.Addons.Contains(this)) { Effects.PlaySound(this.GetWorldLocation(), this.Map, 0x3B3); from.SendLocalizedMessage(500461); // You destroy the item. int hue = 0; if (this.RetainDeedHue) { for (int i = 0; hue == 0 && i < this.m_Components.Count; ++i) { AddonComponent c = this.m_Components[i]; if (c.Hue != 0) { hue = c.Hue; } } } this.Delete(); house.Addons.Remove(this); BaseAddonDeed deed = this.GetDeed(); if (deed != null) { if (this.RetainDeedHue) { deed.Hue = hue; } else { deed.Hue = 0; } from.AddToBackpack(deed); } } }
public void OnChop(Mobile from) { BaseHouse house = BaseHouse.FindHouseAt(this); PlayerMobile pm = (PlayerMobile)from; //NEW for Player city bool ismayor = false; if (pm.City != null && pm.City.Mayor == pm && PlayerGovernmentSystem.IsAtCity(from)) { ismayor = true; } if (house != null && house.IsOwner(from) && house.Addons.Contains(this) || ismayor) { Effects.PlaySound(GetWorldLocation(), Map, 0x3B3); from.SendLocalizedMessage(500461); // You destroy the item. int hue = 0; if (RetainDeedHue) { for (int i = 0; hue == 0 && i < m_Components.Count; ++i) { AddonComponent c = m_Components[i]; if (c.Hue != 0) { hue = c.Hue; } } } Delete(); if (house != null) { house.Addons.Remove(this); } BaseAddonDeed deed = Deed; if (deed != null) { if (RetainDeedHue) { deed.Hue = hue; } from.AddToBackpack(deed); } } }
public virtual void OnChop(Mobile from) { BaseHouse house = BaseHouse.FindHouseAt(this); if (house != null && house.IsOwner(from) && house.Addons.Contains(this)) { Effects.PlaySound(GetWorldLocation(), Map, 0x3B3); from.SendLocalizedMessage(500461); // You destroy the item. int hue = 0; if (RetainDeedHue) { for (int i = 0; hue == 0 && i < m_Components.Count; ++i) { AddonComponent c = m_Components[i]; if (c.Hue != 0) { hue = c.Hue; } } } Delete(); house.Addons.Remove(this); BaseAddonDeed deed = Deed; if (deed != null) { #region Mondain's Legacy deed.Resource = m_Resource; #endregion if (RetainDeedHue) { deed.Hue = hue; } from.AddToBackpack(deed); } } }
public void OnChop(Mobile from) { var house = HousingHelper.FindHouseAt(this); if (house != null && house.IsOwner(from) && house.Addons.Contains(this)) { Effects.PlaySound(GetWorldLocation(), Map, 0x3B3); from.SendLocalizedMessage(500461); // You destroy the item. Delete(); house.Addons.Remove(this); BaseAddonDeed deed = Redeed(); if (deed != null) { if (!from.AddToBackpack(deed)) { deed.MoveToWorld(this.Location, this.Map); } } } }
public VinyardGroundPlacedGump( BaseAddonDeed deed ) : base( 30, 30 ) { m_Deed = deed; AddPage( 0 ); AddBackground( 0, 0, 450, 250, 9250 ); AddAlphaRegion( 12, 12, 426, 22 ); AddHtml( 13, 13, 379, 20, "<BASEFONT COLOR=WHITE>Vinyard Ground Addon Placement Successful</BASEFONT>", false, false ); AddAlphaRegion( 12, 39, 426, 199 ); AddHtml( 15, 50, 420, 185, "<BODY>" + "<BASEFONT COLOR=YELLOW>Your vinyard ground addon has been successfully placed!<BR>" + "<BASEFONT COLOR=YELLOW>You may now begin placing grapevines in your vinyard using a " + "<BASEFONT COLOR=YELLOW>grapevine placement tool.<BR><BR>" + "<BASEFONT COLOR=YELLOW>You may delete this vinyard ground addon at any time. " + "<BASEFONT COLOR=YELLOW>To do so... <BR>" + "<BASEFONT COLOR=YELLOW> 1. Delete all grapevines first.<BR>" + "<BASEFONT COLOR=YELLOW> 2. Double click the vinyard addon and accept prompt to delete.<BR>" + "<BASEFONT COLOR=YELLOW> *Note* You must be within 3 tiles of western corner to delete addon.<BR><BR>" + "</BODY>", false, false ); AddButton( 190, 210, 0xF7, 0xF8, 0, GumpButtonType.Reply, 0 ); }
private InternalTarget( BaseAddonDeed deed, bool secondtime, Point3D point ) : base( -1, true, TargetFlags.None ) { m_Deed = deed; m_SecondTime = secondtime; m_Point = point; CheckLOS = false; }
public InternalTarget(BaseAddonDeed deed) : this(deed, false, Point3D.Zero) { }
public virtual void OnChop(Mobile from) { BaseHouse house = BaseHouse.FindHouseAt(this); StaticHouseSign staticHouse = StaticHouseSign.StaticFindHouseAt(this); if (house != null && house.IsOwner(from) && house.Addons.Contains(this)) { Effects.PlaySound(GetWorldLocation(), Map, 0x3B3); from.SendLocalizedMessage(500461); // You destroy the item. int hue = 0; if (RetainDeedHue) { for (int i = 0; hue == 0 && i < m_Components.Count; ++i) { AddonComponent c = (AddonComponent)m_Components[i]; if (c.Hue != 0) { hue = c.Hue; } } } Delete(); house.Addons.Remove(this); BaseAddonDeed deed = Deed; if (deed != null) { if (RetainDeedHue) { deed.Hue = hue; } from.AddToBackpack(deed); } } else if (staticHouse != null && staticHouse.IsOwner(from)) //&& staticHouse.Addons.Contains( this ) ) { Effects.PlaySound(GetWorldLocation(), Map, 0x3B3); from.SendLocalizedMessage(500461); // You destroy the item. int hue = 0; if (RetainDeedHue) { for (int i = 0; hue == 0 && i < m_Components.Count; ++i) { AddonComponent c = (AddonComponent)m_Components[i]; if (c.Hue != 0) { hue = c.Hue; } } } Delete(); //house.Addons.Remove( this ); BaseAddonDeed deed = Deed; if (deed != null) { if (RetainDeedHue) { deed.Hue = hue; } from.AddToBackpack(deed); } } }
public InternalTarget( BaseAddonDeed deed ) : this( deed, false, Point3D.Zero ) { }
public VariableCarpetPlacedGump( BaseAddonDeed deed ) : base( 30, 30 ) { m_Deed = deed; AddPage( 0 ); AddBackground( 0, 0, 450, 250, 9250 ); AddAlphaRegion( 12, 12, 426, 22 ); AddHtml( 13, 13, 379, 20, "<BASEFONT COLOR=WHITE>Carpet successfully placed</BASEFONT>", false, false ); AddAlphaRegion( 12, 39, 426, 199 ); AddHtml( 15, 50, 420, 185, "<BODY>" + "<BASEFONT COLOR=YELLOW>Your carpet has been placed!<BR>" + "<BASEFONT COLOR=YELLOW>You may remove this carpet again easily. " + "<BASEFONT COLOR=YELLOW>Simply use an axe on the carpet.<BR>" + "<BASEFONT COLOR=YELLOW>*Notice* You have to be within 3 tiles of the west corner of the addon to remove it.<BR><BR>" + "</BODY>", false, false ); AddButton( 190, 210, 0xF7, 0xF8, 0, GumpButtonType.Reply, 0 ); }