Clean up: Bugs, LINQ, constructors, default values, and null checks (#18)
This commit is contained in:
parent
e748af4430
commit
513e54f70e
1094 changed files with 15913 additions and 21892 deletions
|
|
@ -91,7 +91,7 @@ namespace Server.Items
|
|||
|
||||
public override void OnClick()
|
||||
{
|
||||
if (m_Ankh == null || m_Ankh.Deleted)
|
||||
if (m_Ankh?.Deleted != false)
|
||||
return;
|
||||
|
||||
Resurrect(m_Mobile as PlayerMobile, m_Ankh);
|
||||
|
|
@ -131,7 +131,7 @@ namespace Server.Items
|
|||
|
||||
private class AnkhResurrectGump : ResurrectGump
|
||||
{
|
||||
public AnkhResurrectGump(Mobile owner, ResurrectMessage msg) : base(owner, owner, msg, false)
|
||||
public AnkhResurrectGump(Mobile owner, ResurrectMessage msg) : base(owner, owner, msg)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -141,7 +141,7 @@ namespace Server.Items
|
|||
|
||||
if (info.ButtonID == 1 || info.ButtonID == 2)
|
||||
{
|
||||
if (from.Map == null || !from.Map.CanFit(from.Location, 16, false, false))
|
||||
if (from.Map?.CanFit(from.Location, 16, false, false) != true)
|
||||
{
|
||||
from.SendLocalizedMessage(502391); // Thou can not be resurrected there!
|
||||
return;
|
||||
|
|
@ -241,12 +241,7 @@ namespace Server.Items
|
|||
private bool m_IsRewardItem;
|
||||
|
||||
[Constructible]
|
||||
public AnkhOfSacrificeDeed() : this(false)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public AnkhOfSacrificeDeed(bool isRewardItem)
|
||||
public AnkhOfSacrificeDeed(bool isRewardItem = false)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
|
||||
|
|
@ -305,7 +300,7 @@ namespace Server.Items
|
|||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (m_IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this, null))
|
||||
if (m_IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this))
|
||||
return;
|
||||
|
||||
if (IsChildOf(from.Backpack))
|
||||
|
|
@ -345,4 +340,4 @@ namespace Server.Items
|
|||
m_IsRewardItem = reader.ReadBool();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ namespace Server.Items
|
|||
{
|
||||
BaseHouse house = BaseHouse.FindHouseAt(this);
|
||||
|
||||
if (house != null && house.IsOwner(from))
|
||||
if (house?.IsOwner(from) == true)
|
||||
{
|
||||
from.CloseGump<RewardDemolitionGump>();
|
||||
from.SendGump(new RewardDemolitionGump(this, 1018318)); // Do you wish to re-deed this banner?
|
||||
|
|
@ -155,14 +155,14 @@ namespace Server.Items
|
|||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (m_IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this, null))
|
||||
if (m_IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this))
|
||||
return;
|
||||
|
||||
if (IsChildOf(from.Backpack))
|
||||
{
|
||||
BaseHouse house = BaseHouse.FindHouseAt(from);
|
||||
|
||||
if (house != null && house.IsOwner(from))
|
||||
if (house?.IsOwner(from) == true)
|
||||
{
|
||||
from.CloseGump<InternalGump>();
|
||||
from.SendGump(new InternalGump(this));
|
||||
|
|
@ -227,7 +227,7 @@ namespace Server.Items
|
|||
for (int j = 0; j < 8; j++, itemID += 2)
|
||||
{
|
||||
AddItem(50 + 60 * j, 70, itemID);
|
||||
AddButton(50 + 60 * j, 50, 0x845, 0x846, itemID, GumpButtonType.Reply, 0);
|
||||
AddButton(50 + 60 * j, 50, 0x845, 0x846, itemID);
|
||||
}
|
||||
|
||||
if (i > 1)
|
||||
|
|
@ -240,17 +240,15 @@ namespace Server.Items
|
|||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
{
|
||||
if ((m_Banner == null) | m_Banner.Deleted)
|
||||
if (m_Banner?.Deleted != false)
|
||||
return;
|
||||
|
||||
Mobile m = sender.Mobile;
|
||||
|
||||
if (info.ButtonID >= Start && info.ButtonID <= End)
|
||||
if ((info.ButtonID & 0x1) == 0)
|
||||
{
|
||||
m.SendLocalizedMessage(1042037); // Where would you like to place this banner?
|
||||
m.Target = new InternalTarget(m_Banner, info.ButtonID);
|
||||
}
|
||||
if (info.ButtonID < Start || info.ButtonID > End || (info.ButtonID & 0x1) != 0) return;
|
||||
|
||||
m.SendLocalizedMessage(1042037); // Where would you like to place this banner?
|
||||
m.Target = new InternalTarget(m_Banner, info.ButtonID);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -267,14 +265,14 @@ namespace Server.Items
|
|||
|
||||
protected override void OnTarget(Mobile from, object targeted)
|
||||
{
|
||||
if (m_Banner == null || m_Banner.Deleted)
|
||||
if (m_Banner?.Deleted != false)
|
||||
return;
|
||||
|
||||
if (m_Banner.IsChildOf(from.Backpack))
|
||||
{
|
||||
BaseHouse house = BaseHouse.FindHouseAt(from);
|
||||
|
||||
if (house != null && house.IsOwner(from))
|
||||
if (house?.IsOwner(from) == true)
|
||||
{
|
||||
IPoint3D p = targeted as IPoint3D;
|
||||
Map map = from.Map;
|
||||
|
|
@ -289,7 +287,7 @@ namespace Server.Items
|
|||
{
|
||||
house = BaseHouse.FindHouseAt(p3d, map, id.Height);
|
||||
|
||||
if (house != null && house.IsOwner(from))
|
||||
if (house?.IsOwner(from) == true)
|
||||
{
|
||||
bool north = BaseAddon.IsWall(p3d.X, p3d.Y - 1, p3d.Z, map);
|
||||
bool west = BaseAddon.IsWall(p3d.X - 1, p3d.Y, p3d.Z, map);
|
||||
|
|
@ -362,20 +360,20 @@ namespace Server.Items
|
|||
AddItem(90, 30, itemID + 1);
|
||||
AddItem(180, 30, itemID);
|
||||
|
||||
AddButton(50, 35, 0x868, 0x869, (int)Buttons.East, GumpButtonType.Reply, 0);
|
||||
AddButton(145, 35, 0x868, 0x869, (int)Buttons.South, GumpButtonType.Reply, 0);
|
||||
AddButton(50, 35, 0x868, 0x869, (int)Buttons.East);
|
||||
AddButton(145, 35, 0x868, 0x869, (int)Buttons.South);
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
{
|
||||
if (m_Banner == null || m_Banner.Deleted || m_House == null)
|
||||
if (m_Banner?.Deleted != false || m_House == null)
|
||||
return;
|
||||
|
||||
Banner banner = null;
|
||||
|
||||
if (info.ButtonID == (int)Buttons.East)
|
||||
banner = new Banner(m_ItemID + 1);
|
||||
if (info.ButtonID == (int)Buttons.South)
|
||||
else if (info.ButtonID == (int)Buttons.South)
|
||||
banner = new Banner(m_ItemID);
|
||||
|
||||
if (banner != null)
|
||||
|
|
@ -398,4 +396,4 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ namespace Server.Items
|
|||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (m_IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this, null))
|
||||
if (m_IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this))
|
||||
return;
|
||||
|
||||
base.OnDoubleClick(from);
|
||||
|
|
@ -195,4 +195,4 @@ namespace Server.Items
|
|||
m_IsRewardItem = reader.ReadBool();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ namespace Server.Items
|
|||
{
|
||||
BaseHouse house = BaseHouse.FindHouseAt(from);
|
||||
|
||||
if (house != null && house.IsCoOwner(from))
|
||||
if (house?.IsCoOwner(from) == true)
|
||||
{
|
||||
if (m_Fire != null)
|
||||
TurnOff();
|
||||
|
|
@ -163,7 +163,7 @@ namespace Server.Items
|
|||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (m_IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this, null))
|
||||
if (m_IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this))
|
||||
return;
|
||||
|
||||
if (IsChildOf(from.Backpack))
|
||||
|
|
@ -223,35 +223,34 @@ namespace Server.Items
|
|||
AddLabel(45, 15, 0, "Choose a Brazier:");
|
||||
|
||||
AddItem(40, 75, 0x19AA);
|
||||
AddButton(55, 50, 0x845, 0x846, 0x19AA, GumpButtonType.Reply, 0);
|
||||
AddButton(55, 50, 0x845, 0x846, 0x19AA);
|
||||
|
||||
AddItem(100, 75, 0x19BB);
|
||||
AddButton(115, 50, 0x845, 0x846, 0x19BB, GumpButtonType.Reply, 0);
|
||||
AddButton(115, 50, 0x845, 0x846, 0x19BB);
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
{
|
||||
if ((m_Brazier == null) | m_Brazier.Deleted)
|
||||
if (m_Brazier?.Deleted != false)
|
||||
return;
|
||||
|
||||
Mobile m = sender.Mobile;
|
||||
|
||||
if (info.ButtonID == 0x19AA || info.ButtonID == 0x19BB)
|
||||
{
|
||||
RewardBrazier brazier = new RewardBrazier(info.ButtonID);
|
||||
brazier.IsRewardItem = m_Brazier.IsRewardItem;
|
||||
if (info.ButtonID != 0x19AA && info.ButtonID != 0x19BB)
|
||||
return;
|
||||
|
||||
if (!m.PlaceInBackpack(brazier))
|
||||
{
|
||||
brazier.Delete();
|
||||
m.SendLocalizedMessage(1078837); // Your backpack is full! Please make room and try again.
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Brazier.Delete();
|
||||
}
|
||||
RewardBrazier brazier = new RewardBrazier(info.ButtonID) { IsRewardItem = m_Brazier.IsRewardItem };
|
||||
|
||||
if (!m.PlaceInBackpack(brazier))
|
||||
{
|
||||
brazier.Delete();
|
||||
m.SendLocalizedMessage(1078837); // Your backpack is full! Please make room and try again.
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Brazier.Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -175,9 +175,9 @@ namespace Server.Items
|
|||
|
||||
public int Validate(PotionKeg keg)
|
||||
{
|
||||
if (keg == null || keg.Deleted || keg.Held != 100)
|
||||
if (keg?.Deleted != false || keg.Held != 100)
|
||||
return 0;
|
||||
|
||||
|
||||
switch (keg.Type)
|
||||
{
|
||||
case PotionEffect.ExplosionLesser:
|
||||
|
|
@ -261,7 +261,7 @@ namespace Server.Items
|
|||
|
||||
protected override void OnTarget(Mobile from, object targeted)
|
||||
{
|
||||
if (m_Cannon == null || m_Cannon.Deleted)
|
||||
if (m_Cannon?.Deleted != false)
|
||||
return;
|
||||
|
||||
if (!(targeted is IPoint3D p))
|
||||
|
|
@ -342,22 +342,18 @@ namespace Server.Items
|
|||
AddBackground(0, 0, 291, 133, 0x13BE);
|
||||
AddImageTiled(5, 5, 280, 100, 0xA40);
|
||||
|
||||
AddHtmlLocalized(9, 9, 272, 100, 1076196, cannon.Validate(keg).ToString(), 0x7FFF, false,
|
||||
false); // You will need a full keg of explosion potions to recharge the cannon. Your keg will provide ~1_CHARGES~ charges.
|
||||
AddHtmlLocalized(9, 9, 272, 100, 1076196, cannon.Validate(keg).ToString(), 0x7FFF); // You will need a full keg of explosion potions to recharge the cannon. Your keg will provide ~1_CHARGES~ charges.
|
||||
|
||||
AddButton(5, 107, 0xFB1, 0xFB2, (int)Buttons.Cancel, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(40, 109, 100, 20, 1060051, 0x7FFF, false, false); // CANCEL
|
||||
AddButton(5, 107, 0xFB1, 0xFB2, (int)Buttons.Cancel);
|
||||
AddHtmlLocalized(40, 109, 100, 20, 1060051, 0x7FFF); // CANCEL
|
||||
|
||||
AddButton(160, 107, 0xFB7, 0xFB8, (int)Buttons.Recharge, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(195, 109, 120, 20, 1076197, 0x7FFF, false, false); // Recharge
|
||||
AddButton(160, 107, 0xFB7, 0xFB8, (int)Buttons.Recharge);
|
||||
AddHtmlLocalized(195, 109, 120, 20, 1076197, 0x7FFF); // Recharge
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState state, RelayInfo info)
|
||||
{
|
||||
if (m_Cannon == null || m_Cannon.Deleted)
|
||||
return;
|
||||
|
||||
if (info.ButtonID == (int)Buttons.Recharge)
|
||||
if (m_Cannon?.Deleted == false && info.ButtonID == (int)Buttons.Recharge)
|
||||
m_Cannon.Fill(state.Mobile, m_Keg);
|
||||
}
|
||||
|
||||
|
|
@ -388,17 +384,10 @@ namespace Server.Items
|
|||
|
||||
public override int LabelNumber => 1076195; // A deed for a cannon
|
||||
|
||||
public override BaseAddon Addon
|
||||
public override BaseAddon Addon => new CannonAddon(m_Direction)
|
||||
{
|
||||
get
|
||||
{
|
||||
CannonAddon addon = new CannonAddon(m_Direction);
|
||||
addon.Charges = m_Charges;
|
||||
addon.IsRewardItem = m_IsRewardItem;
|
||||
|
||||
return addon;
|
||||
}
|
||||
}
|
||||
Charges = m_Charges, IsRewardItem = m_IsRewardItem
|
||||
};
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int Charges
|
||||
|
|
@ -450,7 +439,7 @@ namespace Server.Items
|
|||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (m_IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this, null))
|
||||
if (m_IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this))
|
||||
return;
|
||||
|
||||
if (IsChildOf(from.Backpack))
|
||||
|
|
@ -484,4 +473,4 @@ namespace Server.Items
|
|||
m_IsRewardItem = reader.ReadBool();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,12 +11,7 @@ namespace Server.Items
|
|||
private bool m_IsRewardItem;
|
||||
|
||||
[Constructible]
|
||||
public DecorativeShield() : this(0x156C)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public DecorativeShield(int itemID) : base(itemID)
|
||||
public DecorativeShield(int itemID = 0x156C) : base(itemID)
|
||||
{
|
||||
Movable = false;
|
||||
}
|
||||
|
|
@ -51,12 +46,9 @@ namespace Server.Items
|
|||
|
||||
public bool CouldFit(IPoint3D p, Map map)
|
||||
{
|
||||
if (map == null || !map.CanFit(p.X, p.Y, p.Z, ItemData.Height))
|
||||
return false;
|
||||
|
||||
if (FacingSouth)
|
||||
return BaseAddon.IsWall(p.X, p.Y - 1, p.Z, map); // north wall
|
||||
return BaseAddon.IsWall(p.X - 1, p.Y, p.Z, map); // west wall
|
||||
return map?.CanFit(p.X, p.Y, p.Z, ItemData.Height) == true && (FacingSouth
|
||||
&& BaseAddon.IsWall(p.X, p.Y - 1, p.Z, map)
|
||||
|| BaseAddon.IsWall(p.X - 1, p.Y, p.Z, map));
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
|
|
@ -84,7 +76,7 @@ namespace Server.Items
|
|||
{
|
||||
BaseHouse house = BaseHouse.FindHouseAt(this);
|
||||
|
||||
if (house != null && house.IsOwner(from))
|
||||
if (house?.IsOwner(from) == true)
|
||||
{
|
||||
from.CloseGump<RewardDemolitionGump>();
|
||||
from.SendGump(new RewardDemolitionGump(this, 1049783)); // Do you wish to re-deed this decoration?
|
||||
|
|
@ -158,7 +150,7 @@ namespace Server.Items
|
|||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (m_IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this, null))
|
||||
if (m_IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this))
|
||||
return;
|
||||
|
||||
if (IsChildOf(from.Backpack))
|
||||
|
|
@ -233,7 +225,7 @@ namespace Server.Items
|
|||
for (int j = 0; j < 9 - i; j++)
|
||||
{
|
||||
AddItem(40 + j * 60, 70, itemID);
|
||||
AddButton(60 + j * 60, 50, 0x845, 0x846, itemID, GumpButtonType.Reply, 0);
|
||||
AddButton(60 + j * 60, 50, 0x845, 0x846, itemID);
|
||||
|
||||
if (itemID < 0x1582)
|
||||
itemID += 2;
|
||||
|
|
@ -255,18 +247,13 @@ namespace Server.Items
|
|||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
{
|
||||
if ((m_Shield == null) | m_Shield.Deleted)
|
||||
if (m_Shield?.Deleted != false || info.ButtonID < Start || info.ButtonID > End ||
|
||||
((info.ButtonID & 0x1) != 0 || info.ButtonID >= 0x1582) &&
|
||||
(info.ButtonID < 0x1582 || info.ButtonID > 0x1585))
|
||||
return;
|
||||
|
||||
Mobile m = sender.Mobile;
|
||||
|
||||
if (info.ButtonID >= Start && info.ButtonID <= End)
|
||||
if ((info.ButtonID & 0x1) == 0 && info.ButtonID < 0x1582 ||
|
||||
info.ButtonID >= 0x1582 && info.ButtonID <= 0x1585)
|
||||
{
|
||||
m.SendLocalizedMessage(1049780); // Where would you like to place this decoration?
|
||||
m.Target = new InternalTarget(m_Shield, info.ButtonID);
|
||||
}
|
||||
sender.Mobile.SendLocalizedMessage(1049780); // Where would you like to place this decoration?
|
||||
sender.Mobile.Target = new InternalTarget(m_Shield, info.ButtonID);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -283,72 +270,68 @@ namespace Server.Items
|
|||
|
||||
protected override void OnTarget(Mobile from, object targeted)
|
||||
{
|
||||
if (m_Shield == null || m_Shield.Deleted)
|
||||
if (m_Shield?.Deleted != false)
|
||||
return;
|
||||
|
||||
if (m_Shield.IsChildOf(from.Backpack))
|
||||
if (!m_Shield.IsChildOf(from.Backpack))
|
||||
{
|
||||
BaseHouse house = BaseHouse.FindHouseAt(from);
|
||||
from.SendLocalizedMessage(1042038); // You must have the object in your backpack to use it.
|
||||
return;
|
||||
}
|
||||
|
||||
if (house != null && house.IsOwner(from))
|
||||
{
|
||||
IPoint3D p = targeted as IPoint3D;
|
||||
Map map = from.Map;
|
||||
BaseHouse house = BaseHouse.FindHouseAt(from);
|
||||
|
||||
if (p == null || map == null)
|
||||
return;
|
||||
if (house?.IsOwner(from) != true)
|
||||
{
|
||||
from.SendLocalizedMessage(502092); // You must be in your house to do this.
|
||||
return;
|
||||
}
|
||||
|
||||
Point3D p3d = new Point3D(p);
|
||||
ItemData id = TileData.ItemTable[m_ItemID & TileData.MaxItemValue];
|
||||
IPoint3D p = targeted as IPoint3D;
|
||||
Map map = from.Map;
|
||||
|
||||
if (map.CanFit(p3d, id.Height))
|
||||
{
|
||||
house = BaseHouse.FindHouseAt(p3d, map, id.Height);
|
||||
if (p == null || map == null)
|
||||
return;
|
||||
|
||||
if (house != null && house.IsOwner(from))
|
||||
{
|
||||
bool north = BaseAddon.IsWall(p3d.X, p3d.Y - 1, p3d.Z, map);
|
||||
bool west = BaseAddon.IsWall(p3d.X - 1, p3d.Y, p3d.Z, map);
|
||||
Point3D p3d = new Point3D(p);
|
||||
ItemData id = TileData.ItemTable[m_ItemID & TileData.MaxItemValue];
|
||||
|
||||
if (north && west)
|
||||
{
|
||||
from.CloseGump<FacingGump>();
|
||||
from.SendGump(new FacingGump(m_Shield, m_ItemID, p3d, house));
|
||||
}
|
||||
else if (north || west)
|
||||
{
|
||||
DecorativeShield shield = new DecorativeShield(west ? GetWestItemID(m_ItemID) : m_ItemID);
|
||||
if (!map.CanFit(p3d, id.Height))
|
||||
{
|
||||
from.SendLocalizedMessage(500269); // You cannot build that there.
|
||||
return;
|
||||
}
|
||||
|
||||
house.Addons.Add(shield);
|
||||
house = BaseHouse.FindHouseAt(p3d, map, id.Height);
|
||||
|
||||
shield.IsRewardItem = m_Shield.IsRewardItem;
|
||||
shield.MoveToWorld(p3d, map);
|
||||
if (house?.IsOwner(from) != true)
|
||||
{
|
||||
from.SendLocalizedMessage(1042036); // That location is not in your house.
|
||||
return;
|
||||
}
|
||||
|
||||
m_Shield.Delete();
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1049781); // This decoration must be placed next to a wall.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1042036); // That location is not in your house.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(500269); // You cannot build that there.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(502092); // You must be in your house to do this.
|
||||
}
|
||||
bool north = BaseAddon.IsWall(p3d.X, p3d.Y - 1, p3d.Z, map);
|
||||
bool west = BaseAddon.IsWall(p3d.X - 1, p3d.Y, p3d.Z, map);
|
||||
|
||||
if (north && west)
|
||||
{
|
||||
from.CloseGump<FacingGump>();
|
||||
from.SendGump(new FacingGump(m_Shield, m_ItemID, p3d, house));
|
||||
}
|
||||
else if (north || west)
|
||||
{
|
||||
DecorativeShield shield = new DecorativeShield(west ? GetWestItemID(m_ItemID) : m_ItemID);
|
||||
|
||||
house.Addons.Add(shield);
|
||||
|
||||
shield.IsRewardItem = m_Shield.IsRewardItem;
|
||||
shield.MoveToWorld(p3d, map);
|
||||
|
||||
m_Shield.Delete();
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1042038); // You must have the object in your backpack to use it.
|
||||
from.SendLocalizedMessage(1049781); // This decoration must be placed next to a wall.
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -377,13 +360,13 @@ namespace Server.Items
|
|||
AddItem(90, 30, GetWestItemID(itemID));
|
||||
AddItem(180, 30, itemID);
|
||||
|
||||
AddButton(50, 35, 0x867, 0x869, (int)Buttons.East, GumpButtonType.Reply, 0);
|
||||
AddButton(145, 35, 0x867, 0x869, (int)Buttons.South, GumpButtonType.Reply, 0);
|
||||
AddButton(50, 35, 0x867, 0x869, (int)Buttons.East);
|
||||
AddButton(145, 35, 0x867, 0x869, (int)Buttons.South);
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
{
|
||||
if (m_Shield == null || m_Shield.Deleted || m_House == null)
|
||||
if (m_Shield?.Deleted != false || m_House == null)
|
||||
return;
|
||||
|
||||
DecorativeShield shield = null;
|
||||
|
|
@ -413,4 +396,4 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,12 +11,7 @@ namespace Server.Items
|
|||
private bool m_IsRewardItem;
|
||||
|
||||
[Constructible]
|
||||
public FlamingHead() : this(StoneFaceTrapType.NorthWall)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public FlamingHead(StoneFaceTrapType type)
|
||||
public FlamingHead(StoneFaceTrapType type = StoneFaceTrapType.NorthWall)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
Movable = false;
|
||||
|
|
@ -82,7 +77,7 @@ namespace Server.Items
|
|||
{
|
||||
BaseHouse house = BaseHouse.FindHouseAt(this);
|
||||
|
||||
if (house != null && house.IsOwner(from))
|
||||
if (house?.IsOwner(from) == true)
|
||||
{
|
||||
from.CloseGump<RewardDemolitionGump>();
|
||||
from.SendGump(new RewardDemolitionGump(this, 1018329)); // Do you wish to re-deed this skull?
|
||||
|
|
@ -156,14 +151,14 @@ namespace Server.Items
|
|||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (m_IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this, null))
|
||||
if (m_IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this))
|
||||
return;
|
||||
|
||||
if (IsChildOf(from.Backpack))
|
||||
{
|
||||
BaseHouse house = BaseHouse.FindHouseAt(from);
|
||||
|
||||
if (house != null && house.IsOwner(from))
|
||||
if (house?.IsOwner(from) == true)
|
||||
{
|
||||
from.SendLocalizedMessage(1042264); // Where would you like to place this head?
|
||||
from.Target = new InternalTarget(this);
|
||||
|
|
@ -208,76 +203,72 @@ namespace Server.Items
|
|||
|
||||
protected override void OnTarget(Mobile from, object targeted)
|
||||
{
|
||||
if (m_Head == null || m_Head.Deleted)
|
||||
if (m_Head?.Deleted != false)
|
||||
return;
|
||||
|
||||
if (m_Head.IsChildOf(from.Backpack))
|
||||
if (!m_Head.IsChildOf(from.Backpack))
|
||||
{
|
||||
BaseHouse house = BaseHouse.FindHouseAt(from);
|
||||
from.SendLocalizedMessage(1042038); // You must have the object in your backpack to use it.
|
||||
return;
|
||||
}
|
||||
|
||||
if (house != null && house.IsOwner(from))
|
||||
{
|
||||
IPoint3D p = targeted as IPoint3D;
|
||||
Map map = from.Map;
|
||||
BaseHouse house = BaseHouse.FindHouseAt(from);
|
||||
|
||||
if (p == null || map == null)
|
||||
return;
|
||||
if (house?.IsOwner(from) != true)
|
||||
{
|
||||
from.SendLocalizedMessage(502115); // You must be in your house to do this.
|
||||
return;
|
||||
}
|
||||
|
||||
Point3D p3d = new Point3D(p);
|
||||
ItemData id = TileData.ItemTable[0x10F5];
|
||||
IPoint3D p = targeted as IPoint3D;
|
||||
Map map = from.Map;
|
||||
|
||||
house = BaseHouse.FindHouseAt(p3d, map, id.Height);
|
||||
if (p == null || map == null)
|
||||
return;
|
||||
|
||||
if (house != null && house.IsOwner(from))
|
||||
{
|
||||
if (map.CanFit(p3d, id.Height))
|
||||
{
|
||||
bool north = BaseAddon.IsWall(p3d.X, p3d.Y - 1, p3d.Z, map);
|
||||
bool west = BaseAddon.IsWall(p3d.X - 1, p3d.Y, p3d.Z, map);
|
||||
Point3D p3d = new Point3D(p);
|
||||
ItemData id = TileData.ItemTable[0x10F5];
|
||||
|
||||
FlamingHead head = null;
|
||||
house = BaseHouse.FindHouseAt(p3d, map, id.Height);
|
||||
|
||||
if (north && west)
|
||||
head = new FlamingHead(StoneFaceTrapType.NorthWestWall);
|
||||
else if (north)
|
||||
head = new FlamingHead(StoneFaceTrapType.NorthWall);
|
||||
else if (west)
|
||||
head = new FlamingHead(StoneFaceTrapType.WestWall);
|
||||
if (house?.IsOwner(from) != true)
|
||||
{
|
||||
from.SendLocalizedMessage(1042036); // That location is not in your house.
|
||||
return;
|
||||
}
|
||||
|
||||
if (north || west)
|
||||
{
|
||||
house.Addons.Add(head);
|
||||
if (!map.CanFit(p3d, id.Height))
|
||||
{
|
||||
from.SendLocalizedMessage(1042266); // The head must be placed next to a wall.
|
||||
return;
|
||||
}
|
||||
|
||||
head.IsRewardItem = m_Head.IsRewardItem;
|
||||
head.MoveToWorld(p3d, map);
|
||||
bool north = BaseAddon.IsWall(p3d.X, p3d.Y - 1, p3d.Z, map);
|
||||
bool west = BaseAddon.IsWall(p3d.X - 1, p3d.Y, p3d.Z, map);
|
||||
|
||||
m_Head.Delete();
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1042266); // The head must be placed next to a wall.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1042266); // The head must be placed next to a wall.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1042036); // That location is not in your house.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(502115); // You must be in your house to do this.
|
||||
}
|
||||
FlamingHead head = null;
|
||||
|
||||
if (north && west)
|
||||
head = new FlamingHead(StoneFaceTrapType.NorthWestWall);
|
||||
else if (north)
|
||||
head = new FlamingHead();
|
||||
else if (west)
|
||||
head = new FlamingHead(StoneFaceTrapType.WestWall);
|
||||
|
||||
if (north || west)
|
||||
{
|
||||
house.Addons.Add(head);
|
||||
|
||||
head.IsRewardItem = m_Head.IsRewardItem;
|
||||
head.MoveToWorld(p3d, map);
|
||||
|
||||
m_Head.Delete();
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1042038); // You must have the object in your backpack to use it.
|
||||
from.SendLocalizedMessage(1042266); // The head must be placed next to a wall.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,12 +11,7 @@ namespace Server.Items
|
|||
private bool m_IsRewardItem;
|
||||
|
||||
[Constructible]
|
||||
public HangingSkeleton() : this(0x1596)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public HangingSkeleton(int itemID) : base(itemID)
|
||||
public HangingSkeleton(int itemID = 0x1596) : base(itemID)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
Movable = false;
|
||||
|
|
@ -86,7 +81,7 @@ namespace Server.Items
|
|||
{
|
||||
BaseHouse house = BaseHouse.FindHouseAt(this);
|
||||
|
||||
if (house != null && house.IsOwner(from))
|
||||
if (house?.IsOwner(from) == true)
|
||||
{
|
||||
from.CloseGump<RewardDemolitionGump>();
|
||||
from.SendGump(new RewardDemolitionGump(this, 1049783)); // Do you wish to re-deed this decoration?
|
||||
|
|
@ -160,14 +155,14 @@ namespace Server.Items
|
|||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (m_IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this, null))
|
||||
if (m_IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this))
|
||||
return;
|
||||
|
||||
if (IsChildOf(from.Backpack))
|
||||
{
|
||||
BaseHouse house = BaseHouse.FindHouseAt(from);
|
||||
|
||||
if (house != null && house.IsOwner(from))
|
||||
if (house?.IsOwner(from) == true)
|
||||
{
|
||||
from.CloseGump<InternalGump>();
|
||||
from.SendGump(new InternalGump(this));
|
||||
|
|
@ -231,34 +226,29 @@ namespace Server.Items
|
|||
AddPage(1);
|
||||
|
||||
AddItem(130, 70, 0x1A03);
|
||||
AddButton(150, 50, 0x845, 0x846, 0x1A03, GumpButtonType.Reply, 0);
|
||||
AddButton(150, 50, 0x845, 0x846, 0x1A03);
|
||||
|
||||
AddItem(190, 70, 0x1A05);
|
||||
AddButton(210, 50, 0x845, 0x846, 0x1A05, GumpButtonType.Reply, 0);
|
||||
AddButton(210, 50, 0x845, 0x846, 0x1A05);
|
||||
|
||||
AddItem(250, 70, 0x1A09);
|
||||
AddButton(270, 50, 0x845, 0x846, 0x1A09, GumpButtonType.Reply, 0);
|
||||
AddButton(270, 50, 0x845, 0x846, 0x1A09);
|
||||
|
||||
AddItem(310, 70, 0x1B1E);
|
||||
AddButton(330, 50, 0x845, 0x846, 0x1B1E, GumpButtonType.Reply, 0);
|
||||
AddButton(330, 50, 0x845, 0x846, 0x1B1E);
|
||||
|
||||
AddItem(370, 70, 0x1B7F);
|
||||
AddButton(390, 50, 0x845, 0x846, 0x1B7F, GumpButtonType.Reply, 0);
|
||||
AddButton(390, 50, 0x845, 0x846, 0x1B7F);
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
{
|
||||
if ((m_Skeleton == null) | m_Skeleton.Deleted)
|
||||
if (m_Skeleton?.Deleted != false || info.ButtonID != 0x1A03 && info.ButtonID != 0x1A05 &&
|
||||
info.ButtonID != 0x1A09 && info.ButtonID != 0x1B1E && info.ButtonID != 0x1B7F)
|
||||
return;
|
||||
|
||||
Mobile m = sender.Mobile;
|
||||
|
||||
if (info.ButtonID == 0x1A03 || info.ButtonID == 0x1A05 || info.ButtonID == 0x1A09 ||
|
||||
info.ButtonID == 0x1B1E || info.ButtonID == 0x1B7F)
|
||||
{
|
||||
m.SendLocalizedMessage(1049780); // Where would you like to place this decoration?
|
||||
m.Target = new InternalTarget(m_Skeleton, info.ButtonID);
|
||||
}
|
||||
sender.Mobile.SendLocalizedMessage(1049780); // Where would you like to place this decoration?
|
||||
sender.Mobile.Target = new InternalTarget(m_Skeleton, info.ButtonID);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -275,72 +265,68 @@ namespace Server.Items
|
|||
|
||||
protected override void OnTarget(Mobile from, object targeted)
|
||||
{
|
||||
if (m_Skeleton == null || m_Skeleton.Deleted)
|
||||
if (m_Skeleton?.Deleted != false)
|
||||
return;
|
||||
|
||||
if (m_Skeleton.IsChildOf(from.Backpack))
|
||||
if (!m_Skeleton.IsChildOf(from.Backpack))
|
||||
{
|
||||
BaseHouse house = BaseHouse.FindHouseAt(from);
|
||||
from.SendLocalizedMessage(1042038); // You must have the object in your backpack to use it.
|
||||
return;
|
||||
}
|
||||
|
||||
if (house != null && house.IsOwner(from))
|
||||
{
|
||||
IPoint3D p = targeted as IPoint3D;
|
||||
Map map = from.Map;
|
||||
BaseHouse house = BaseHouse.FindHouseAt(from);
|
||||
|
||||
if (p == null || map == null)
|
||||
return;
|
||||
if (house?.IsOwner(from) != true)
|
||||
{
|
||||
from.SendLocalizedMessage(502092); // You must be in your house to do this.
|
||||
return;
|
||||
}
|
||||
|
||||
Point3D p3d = new Point3D(p);
|
||||
ItemData id = TileData.ItemTable[m_ItemID & TileData.MaxItemValue];
|
||||
IPoint3D p = targeted as IPoint3D;
|
||||
Map map = from.Map;
|
||||
|
||||
if (map.CanFit(p3d, id.Height))
|
||||
{
|
||||
house = BaseHouse.FindHouseAt(p3d, map, id.Height);
|
||||
if (p == null || map == null)
|
||||
return;
|
||||
|
||||
if (house != null && house.IsOwner(from))
|
||||
{
|
||||
bool north = BaseAddon.IsWall(p3d.X, p3d.Y - 1, p3d.Z, map);
|
||||
bool west = BaseAddon.IsWall(p3d.X - 1, p3d.Y, p3d.Z, map);
|
||||
Point3D p3d = new Point3D(p);
|
||||
ItemData id = TileData.ItemTable[m_ItemID & TileData.MaxItemValue];
|
||||
|
||||
if (north && west)
|
||||
{
|
||||
from.CloseGump<FacingGump>();
|
||||
from.SendGump(new FacingGump(m_Skeleton, m_ItemID, p3d, house));
|
||||
}
|
||||
else if (north || west)
|
||||
{
|
||||
HangingSkeleton banner = new HangingSkeleton(west ? GetWestItemID(m_ItemID) : m_ItemID);
|
||||
if (!map.CanFit(p3d, id.Height))
|
||||
{
|
||||
from.SendLocalizedMessage(500269); // You cannot build that there.
|
||||
return;
|
||||
}
|
||||
|
||||
house.Addons.Add(banner);
|
||||
house = BaseHouse.FindHouseAt(p3d, map, id.Height);
|
||||
|
||||
banner.IsRewardItem = m_Skeleton.IsRewardItem;
|
||||
banner.MoveToWorld(p3d, map);
|
||||
if (house?.IsOwner(from) != true)
|
||||
{
|
||||
from.SendLocalizedMessage(1042036); // That location is not in your house.
|
||||
return;
|
||||
}
|
||||
|
||||
m_Skeleton.Delete();
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1042039); // The banner must be placed next to a wall.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1042036); // That location is not in your house.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(500269); // You cannot build that there.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(502092); // You must be in your house to do this.
|
||||
}
|
||||
bool north = BaseAddon.IsWall(p3d.X, p3d.Y - 1, p3d.Z, map);
|
||||
bool west = BaseAddon.IsWall(p3d.X - 1, p3d.Y, p3d.Z, map);
|
||||
|
||||
if (north && west)
|
||||
{
|
||||
from.CloseGump<FacingGump>();
|
||||
from.SendGump(new FacingGump(m_Skeleton, m_ItemID, p3d, house));
|
||||
}
|
||||
else if (north || west)
|
||||
{
|
||||
HangingSkeleton banner = new HangingSkeleton(west ? GetWestItemID(m_ItemID) : m_ItemID);
|
||||
|
||||
house.Addons.Add(banner);
|
||||
|
||||
banner.IsRewardItem = m_Skeleton.IsRewardItem;
|
||||
banner.MoveToWorld(p3d, map);
|
||||
|
||||
m_Skeleton.Delete();
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1042038); // You must have the object in your backpack to use it.
|
||||
from.SendLocalizedMessage(1042039); // The banner must be placed next to a wall.
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -370,13 +356,13 @@ namespace Server.Items
|
|||
AddItem(90, 30, GetWestItemID(itemID));
|
||||
AddItem(180, 30, itemID);
|
||||
|
||||
AddButton(50, 35, 0x868, 0x869, (int)Buttons.East, GumpButtonType.Reply, 0);
|
||||
AddButton(145, 35, 0x868, 0x869, (int)Buttons.South, GumpButtonType.Reply, 0);
|
||||
AddButton(50, 35, 0x868, 0x869, (int)Buttons.East);
|
||||
AddButton(145, 35, 0x868, 0x869, (int)Buttons.South);
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
{
|
||||
if (m_Skeleton == null || m_Skeleton.Deleted || m_House == null)
|
||||
if (m_Skeleton?.Deleted != false || m_House == null)
|
||||
return;
|
||||
|
||||
HangingSkeleton banner = null;
|
||||
|
|
@ -406,4 +392,4 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ namespace Server.Items
|
|||
|
||||
if (!from.InRange(GetWorldLocation(), 2) || !from.InLOS(this) || !(from.Z - Z > -3 && from.Z - Z < 3))
|
||||
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
|
||||
else if (house != null && house.HasSecureAccess(from, SecureLevel.Friends))
|
||||
else if (house?.HasSecureAccess(from, SecureLevel.Friends) == true)
|
||||
switch (CartType)
|
||||
{
|
||||
case MiningCartType.OreSouth:
|
||||
|
|
@ -404,7 +404,7 @@ namespace Server.Items
|
|||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (m_IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this, null))
|
||||
if (m_IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this))
|
||||
return;
|
||||
|
||||
if (IsChildOf(from.Backpack))
|
||||
|
|
@ -440,4 +440,4 @@ namespace Server.Items
|
|||
Ore = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ namespace Server.Items
|
|||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (m_IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this, null))
|
||||
if (m_IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this))
|
||||
return;
|
||||
|
||||
if (IsChildOf(from.Backpack))
|
||||
|
|
@ -185,4 +185,4 @@ namespace Server.Items
|
|||
m_IsRewardItem = reader.ReadBool();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ namespace Server.Items
|
|||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (m_IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this, null))
|
||||
if (m_IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this))
|
||||
return;
|
||||
|
||||
if (IsChildOf(from.Backpack))
|
||||
|
|
@ -151,47 +151,44 @@ namespace Server.Items
|
|||
AddLabel(45, 15, 0, "Choose a Potted Cactus:");
|
||||
|
||||
AddItem(45, 75, 0x1E0F);
|
||||
AddButton(55, 50, 0x845, 0x846, 0x1E0F, GumpButtonType.Reply, 0);
|
||||
AddButton(55, 50, 0x845, 0x846, 0x1E0F);
|
||||
|
||||
AddItem(105, 75, 0x1E10);
|
||||
AddButton(115, 50, 0x845, 0x846, 0x1E10, GumpButtonType.Reply, 0);
|
||||
AddButton(115, 50, 0x845, 0x846, 0x1E10);
|
||||
|
||||
AddItem(160, 75, 0x1E14);
|
||||
AddButton(175, 50, 0x845, 0x846, 0x1E14, GumpButtonType.Reply, 0);
|
||||
AddButton(175, 50, 0x845, 0x846, 0x1E14);
|
||||
|
||||
AddItem(220, 75, 0x1E11);
|
||||
AddButton(235, 50, 0x845, 0x846, 0x1E11, GumpButtonType.Reply, 0);
|
||||
AddButton(235, 50, 0x845, 0x846, 0x1E11);
|
||||
|
||||
AddItem(280, 75, 0x1E12);
|
||||
AddButton(295, 50, 0x845, 0x846, 0x1E12, GumpButtonType.Reply, 0);
|
||||
AddButton(295, 50, 0x845, 0x846, 0x1E12);
|
||||
|
||||
AddItem(340, 75, 0x1E13);
|
||||
AddButton(355, 50, 0x845, 0x846, 0x1E13, GumpButtonType.Reply, 0);
|
||||
AddButton(355, 50, 0x845, 0x846, 0x1E13);
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
{
|
||||
if ((m_Cactus == null) | m_Cactus.Deleted)
|
||||
if (m_Cactus?.Deleted != false || info.ButtonID < 0x1E0F || info.ButtonID > 0x1E14)
|
||||
return;
|
||||
|
||||
Mobile m = sender.Mobile;
|
||||
|
||||
if (info.ButtonID >= 0x1E0F && info.ButtonID <= 0x1E14)
|
||||
RewardPottedCactus cactus = new RewardPottedCactus(info.ButtonID)
|
||||
{
|
||||
RewardPottedCactus cactus = new RewardPottedCactus(info.ButtonID);
|
||||
cactus.IsRewardItem = m_Cactus.IsRewardItem;
|
||||
IsRewardItem = m_Cactus.IsRewardItem
|
||||
};
|
||||
|
||||
if (!m.PlaceInBackpack(cactus))
|
||||
{
|
||||
cactus.Delete();
|
||||
m.SendLocalizedMessage(1078837); // Your backpack is full! Please make room and try again.
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Cactus.Delete();
|
||||
}
|
||||
if (!sender.Mobile.PlaceInBackpack(cactus))
|
||||
{
|
||||
cactus.Delete();
|
||||
sender.Mobile.SendLocalizedMessage(1078837); // Your backpack is full! Please make room and try again.
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Cactus.Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,12 +46,7 @@ namespace Server.Items
|
|||
private bool m_IsRewardItem;
|
||||
|
||||
[Constructible]
|
||||
public StoneAnkh() : this(true)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public StoneAnkh(bool east)
|
||||
public StoneAnkh(bool east = true)
|
||||
{
|
||||
if (east)
|
||||
{
|
||||
|
|
@ -110,7 +105,7 @@ namespace Server.Items
|
|||
{
|
||||
BaseHouse house = BaseHouse.FindHouseAt(this);
|
||||
|
||||
if (house != null && house.IsOwner(from))
|
||||
if (house?.IsOwner(from) == true)
|
||||
{
|
||||
from.CloseGump<RewardDemolitionGump>();
|
||||
from.SendGump(new RewardDemolitionGump(this, 1049783)); // Do you wish to re-deed this decoration?
|
||||
|
|
@ -187,7 +182,7 @@ namespace Server.Items
|
|||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (m_IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this, null))
|
||||
if (m_IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this))
|
||||
return;
|
||||
|
||||
if (IsChildOf(from.Backpack))
|
||||
|
|
@ -251,23 +246,20 @@ namespace Server.Items
|
|||
|
||||
AddItem(90, 30, 0x4);
|
||||
AddItem(112, 30, 0x5);
|
||||
AddButton(50, 35, 0x867, 0x869, (int)Buttons.South, GumpButtonType.Reply, 0); // South
|
||||
AddButton(50, 35, 0x867, 0x869, (int)Buttons.South); // South
|
||||
|
||||
AddItem(170, 30, 0x2);
|
||||
AddItem(192, 30, 0x3);
|
||||
AddButton(145, 35, 0x867, 0x869, (int)Buttons.East, GumpButtonType.Reply, 0); // East
|
||||
AddButton(145, 35, 0x867, 0x869, (int)Buttons.East); // East
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
{
|
||||
if (m_Deed == null || m_Deed.Deleted)
|
||||
if (m_Deed?.Deleted != false || info.ButtonID == (int)Buttons.Cancel)
|
||||
return;
|
||||
|
||||
if (info.ButtonID != (int)Buttons.Cancel)
|
||||
{
|
||||
m_Deed.m_East = info.ButtonID == (int)Buttons.East;
|
||||
m_Deed.SendTarget(sender.Mobile);
|
||||
}
|
||||
m_Deed.m_East = info.ButtonID == (int)Buttons.East;
|
||||
m_Deed.SendTarget(sender.Mobile);
|
||||
}
|
||||
|
||||
private enum Buttons
|
||||
|
|
@ -278,4 +270,4 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ namespace Server.Items
|
|||
{
|
||||
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
|
||||
}
|
||||
else if (house != null && house.HasSecureAccess(from, SecureLevel.Friends))
|
||||
else if (house?.HasSecureAccess(from, SecureLevel.Friends) == true)
|
||||
{
|
||||
if (m_Logs > 0)
|
||||
{
|
||||
|
|
@ -275,7 +275,7 @@ namespace Server.Items
|
|||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (m_IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this, null))
|
||||
if (m_IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this))
|
||||
return;
|
||||
|
||||
if (IsChildOf(from.Backpack))
|
||||
|
|
@ -309,4 +309,4 @@ namespace Server.Items
|
|||
m_Logs = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -312,7 +312,7 @@ namespace Server.Items
|
|||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (m_IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this, null))
|
||||
if (m_IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this))
|
||||
return;
|
||||
|
||||
if (IsChildOf(from.Backpack))
|
||||
|
|
@ -372,27 +372,27 @@ namespace Server.Items
|
|||
AddItem(55, 110, 0x161D);
|
||||
AddItem(75, 90, 0x161E);
|
||||
AddItem(95, 70, 0x161F);
|
||||
AddButton(70, 50, 0x845, 0x846, 1, GumpButtonType.Reply, 0);
|
||||
AddButton(70, 50, 0x845, 0x846, 1);
|
||||
AddItem(105, 70, 0x1586);
|
||||
AddItem(125, 90, 0x1587);
|
||||
AddItem(145, 110, 0x1588);
|
||||
AddButton(145, 50, 0x845, 0x846, 2, GumpButtonType.Reply, 0);
|
||||
AddButton(145, 50, 0x845, 0x846, 2);
|
||||
AddItem(200, 110, 0x1620);
|
||||
AddItem(220, 90, 0x1621);
|
||||
AddItem(240, 70, 0x1622);
|
||||
AddButton(220, 50, 0x845, 0x846, 3, GumpButtonType.Reply, 0);
|
||||
AddButton(220, 50, 0x845, 0x846, 3);
|
||||
AddItem(250, 70, 0x1589);
|
||||
AddItem(270, 90, 0x158A);
|
||||
AddItem(290, 110, 0x158B);
|
||||
AddButton(300, 50, 0x845, 0x846, 4, GumpButtonType.Reply, 0);
|
||||
AddButton(300, 50, 0x845, 0x846, 4);
|
||||
AddItem(350, 110, 0x1623);
|
||||
AddItem(370, 90, 0x1624);
|
||||
AddItem(390, 70, 0x1625);
|
||||
AddButton(365, 50, 0x845, 0x846, 5, GumpButtonType.Reply, 0);
|
||||
AddButton(365, 50, 0x845, 0x846, 5);
|
||||
AddItem(400, 70, 0x158C);
|
||||
AddItem(420, 90, 0x158D);
|
||||
AddItem(440, 110, 0x158E);
|
||||
AddButton(445, 50, 0x845, 0x846, 6, GumpButtonType.Reply, 0);
|
||||
AddButton(445, 50, 0x845, 0x846, 6);
|
||||
AddButton(455, 205, 0x8B0, 0x8B0, 0, GumpButtonType.Page, 2);
|
||||
|
||||
AddPage(2);
|
||||
|
|
@ -400,27 +400,27 @@ namespace Server.Items
|
|||
AddItem(52, 110, 0x1626);
|
||||
AddItem(72, 90, 0x1627);
|
||||
AddItem(95, 70, 0x1628);
|
||||
AddButton(70, 50, 0x845, 0x846, 7, GumpButtonType.Reply, 0);
|
||||
AddButton(70, 50, 0x845, 0x846, 7);
|
||||
AddItem(105, 70, 0x1590);
|
||||
AddItem(125, 90, 0x1591);
|
||||
AddItem(145, 110, 0x158F);
|
||||
AddButton(145, 50, 0x845, 0x846, 8, GumpButtonType.Reply, 0);
|
||||
AddButton(145, 50, 0x845, 0x846, 8);
|
||||
AddItem(197, 110, 0x1626);
|
||||
AddItem(217, 90, 0x1629);
|
||||
AddItem(240, 70, 0x162A);
|
||||
AddButton(220, 50, 0x845, 0x846, 9, GumpButtonType.Reply, 0);
|
||||
AddButton(220, 50, 0x845, 0x846, 9);
|
||||
AddItem(250, 70, 0x1592);
|
||||
AddItem(270, 90, 0x1593);
|
||||
AddItem(290, 110, 0x158F);
|
||||
AddButton(300, 50, 0x845, 0x846, 10, GumpButtonType.Reply, 0);
|
||||
AddButton(300, 50, 0x845, 0x846, 10);
|
||||
AddItem(340, 110, 0x162B);
|
||||
AddItem(363, 90, 0x162C);
|
||||
AddItem(385, 70, 0x162D);
|
||||
AddButton(365, 50, 0x845, 0x846, 11, GumpButtonType.Reply, 0);
|
||||
AddButton(365, 50, 0x845, 0x846, 11);
|
||||
AddItem(395, 70, 0x1594);
|
||||
AddItem(417, 90, 0x1595);
|
||||
AddItem(439, 111, 0x1596);
|
||||
AddButton(445, 50, 0x845, 0x846, 12, GumpButtonType.Reply, 0);
|
||||
AddButton(445, 50, 0x845, 0x846, 12);
|
||||
AddButton(70, 205, 0x8AF, 0x8AF, 0, GumpButtonType.Page, 1);
|
||||
AddButton(455, 205, 0x8B0, 0x8B0, 0, GumpButtonType.Page, 3);
|
||||
|
||||
|
|
@ -429,25 +429,25 @@ namespace Server.Items
|
|||
AddItem(55, 110, 0x162E);
|
||||
AddItem(75, 93, 0x1631);
|
||||
AddItem(95, 70, 0x1632);
|
||||
AddButton(70, 50, 0x845, 0x846, 13, GumpButtonType.Reply, 0);
|
||||
AddButton(70, 50, 0x845, 0x846, 13);
|
||||
AddItem(118, 70, 0x1598);
|
||||
AddItem(138, 94, 0x159B);
|
||||
AddItem(159, 113, 0x159C);
|
||||
AddButton(160, 50, 0x845, 0x846, 14, GumpButtonType.Reply, 0);
|
||||
AddButton(160, 50, 0x845, 0x846, 14);
|
||||
AddItem(219, 111, 0x162F);
|
||||
AddItem(238, 94, 0x1630);
|
||||
AddItem(258, 70, 0x1633);
|
||||
AddButton(240, 50, 0x845, 0x846, 15, GumpButtonType.Reply, 0);
|
||||
AddButton(240, 50, 0x845, 0x846, 15);
|
||||
AddItem(279, 70, 0x1599);
|
||||
AddItem(298, 93, 0x159A);
|
||||
AddItem(319, 113, 0x159D);
|
||||
AddButton(320, 50, 0x845, 0x846, 16, GumpButtonType.Reply, 0);
|
||||
AddButton(320, 50, 0x845, 0x846, 16);
|
||||
AddItem(380, 90, 0x160F);
|
||||
AddItem(400, 70, 0x1610);
|
||||
AddButton(390, 50, 0x845, 0x846, 17, GumpButtonType.Reply, 0);
|
||||
AddButton(390, 50, 0x845, 0x846, 17);
|
||||
AddItem(420, 70, 0x15A0);
|
||||
AddItem(440, 90, 0x15A1);
|
||||
AddButton(455, 50, 0x845, 0x846, 18, GumpButtonType.Reply, 0);
|
||||
AddButton(455, 50, 0x845, 0x846, 18);
|
||||
AddButton(70, 205, 0x8AF, 0x8AF, 0, GumpButtonType.Page, 2);
|
||||
AddButton(455, 205, 0x8B0, 0x8B0, 0, GumpButtonType.Page, 4);
|
||||
|
||||
|
|
@ -455,22 +455,22 @@ namespace Server.Items
|
|||
|
||||
AddItem(55, 90, 0x1611);
|
||||
AddItem(75, 70, 0x1612);
|
||||
AddButton(70, 50, 0x845, 0x846, 19, GumpButtonType.Reply, 0);
|
||||
AddButton(70, 50, 0x845, 0x846, 19);
|
||||
AddItem(105, 70, 0x15A2);
|
||||
AddItem(125, 90, 0x15A3);
|
||||
AddButton(145, 50, 0x845, 0x846, 20, GumpButtonType.Reply, 0);
|
||||
AddButton(145, 50, 0x845, 0x846, 20);
|
||||
AddItem(200, 84, 0x1613);
|
||||
AddItem(220, 70, 0x1614);
|
||||
AddButton(215, 50, 0x845, 0x846, 21, GumpButtonType.Reply, 0);
|
||||
AddButton(215, 50, 0x845, 0x846, 21);
|
||||
AddItem(250, 70, 0x15A4);
|
||||
AddItem(270, 84, 0x15A5);
|
||||
AddButton(290, 50, 0x845, 0x846, 22, GumpButtonType.Reply, 0);
|
||||
AddButton(290, 50, 0x845, 0x846, 22);
|
||||
AddItem(350, 90, 0x1615);
|
||||
AddItem(370, 70, 0x1616);
|
||||
AddButton(365, 50, 0x845, 0x846, 23, GumpButtonType.Reply, 0);
|
||||
AddButton(365, 50, 0x845, 0x846, 23);
|
||||
AddItem(400, 70, 0x15A6);
|
||||
AddItem(420, 90, 0x15A7);
|
||||
AddButton(445, 50, 0x845, 0x846, 24, GumpButtonType.Reply, 0);
|
||||
AddButton(445, 50, 0x845, 0x846, 24);
|
||||
AddButton(70, 205, 0x8AF, 0x8AF, 0, GumpButtonType.Page, 3);
|
||||
AddButton(455, 205, 0x8B0, 0x8B0, 0, GumpButtonType.Page, 5);
|
||||
|
||||
|
|
@ -478,33 +478,32 @@ namespace Server.Items
|
|||
|
||||
AddItem(55, 90, 0x1617);
|
||||
AddItem(77, 70, 0x1618);
|
||||
AddButton(70, 50, 0x845, 0x846, 25, GumpButtonType.Reply, 0);
|
||||
AddButton(70, 50, 0x845, 0x846, 25);
|
||||
AddItem(105, 70, 0x15A8);
|
||||
AddItem(127, 90, 0x15A9);
|
||||
AddButton(145, 50, 0x845, 0x846, 26, GumpButtonType.Reply, 0);
|
||||
AddButton(145, 50, 0x845, 0x846, 26);
|
||||
AddItem(200, 90, 0x1619);
|
||||
AddItem(222, 70, 0x161A);
|
||||
AddButton(220, 50, 0x845, 0x846, 27, GumpButtonType.Reply, 0);
|
||||
AddButton(220, 50, 0x845, 0x846, 27);
|
||||
AddItem(250, 70, 0x15AA);
|
||||
AddItem(272, 90, 0x15AB);
|
||||
AddButton(300, 50, 0x845, 0x846, 28, GumpButtonType.Reply, 0);
|
||||
AddButton(300, 50, 0x845, 0x846, 28);
|
||||
AddItem(350, 90, 0x161B);
|
||||
AddItem(372, 70, 0x161C);
|
||||
AddButton(365, 50, 0x845, 0x846, 29, GumpButtonType.Reply, 0);
|
||||
AddButton(365, 50, 0x845, 0x846, 29);
|
||||
AddItem(400, 70, 0x15AC);
|
||||
AddItem(422, 90, 0x15AD);
|
||||
AddButton(445, 50, 0x845, 0x846, 30, GumpButtonType.Reply, 0);
|
||||
AddButton(445, 50, 0x845, 0x846, 30);
|
||||
AddButton(70, 205, 0x8AF, 0x8AF, 0, GumpButtonType.Page, 4);
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
{
|
||||
if (m_WallBanner == null || m_WallBanner.Deleted)
|
||||
if (m_WallBanner?.Deleted != false || info.ButtonID <= 0 || info.ButtonID >= 31)
|
||||
return;
|
||||
|
||||
if (info.ButtonID > 0 && info.ButtonID < 31)
|
||||
m_WallBanner.Use(sender.Mobile, info.ButtonID);
|
||||
m_WallBanner.Use(sender.Mobile, info.ButtonID);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,12 +13,7 @@ namespace Server.Items
|
|||
private int m_UsesRemaining;
|
||||
|
||||
[Constructible]
|
||||
public WeaponEngravingTool() : this(10)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public WeaponEngravingTool(int uses) : base(0x32F8)
|
||||
public WeaponEngravingTool(int uses = 10) : base(0x32F8)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
Weight = 1.0;
|
||||
|
|
@ -62,7 +57,7 @@ namespace Server.Items
|
|||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (m_IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this, null))
|
||||
if (m_IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this))
|
||||
return;
|
||||
|
||||
if (m_UsesRemaining > 0)
|
||||
|
|
@ -130,7 +125,7 @@ namespace Server.Items
|
|||
{
|
||||
if (from.Backpack == null)
|
||||
return;
|
||||
|
||||
|
||||
BlueDiamond diamond = from.Backpack.FindItemByType<BlueDiamond>();
|
||||
|
||||
if (guildmaster != null)
|
||||
|
|
@ -206,7 +201,7 @@ namespace Server.Items
|
|||
|
||||
protected override void OnTarget(Mobile from, object targeted)
|
||||
{
|
||||
if (m_Tool == null || m_Tool.Deleted)
|
||||
if (m_Tool?.Deleted != false)
|
||||
return;
|
||||
|
||||
if (targeted is BaseWeapon item)
|
||||
|
|
@ -240,11 +235,11 @@ namespace Server.Items
|
|||
|
||||
AddPage(0);
|
||||
|
||||
AddHtmlLocalized(50, 70, 400, 20, 1072359, 0x0, false, false); // <CENTER>Engraving Tool</CENTER>
|
||||
AddHtmlLocalized(50, 70, 400, 20, 1072359, 0x0); // <CENTER>Engraving Tool</CENTER>
|
||||
AddHtmlLocalized(75, 95, 350, 145, 1076229, 0x0, true,
|
||||
true); // Please enter the text to add to the selected object. Leave the text area blank to remove any existing text. Removing text does not use a charge.
|
||||
AddButton(125, 300, 0x81A, 0x81B, (int)Buttons.Okay, GumpButtonType.Reply, 0);
|
||||
AddButton(320, 300, 0x819, 0x818, (int)Buttons.Cancel, GumpButtonType.Reply, 0);
|
||||
AddButton(125, 300, 0x81A, 0x81B, (int)Buttons.Okay);
|
||||
AddButton(320, 300, 0x819, 0x818, (int)Buttons.Cancel);
|
||||
AddImageTiled(75, 245, 350, 40, 0xDB0);
|
||||
AddImageTiled(76, 245, 350, 2, 0x23C5);
|
||||
AddImageTiled(75, 245, 2, 40, 0x23C3);
|
||||
|
|
@ -256,38 +251,34 @@ namespace Server.Items
|
|||
|
||||
public override void OnResponse(NetState state, RelayInfo info)
|
||||
{
|
||||
if (m_Tool == null || m_Tool.Deleted || m_Target == null || m_Target.Deleted)
|
||||
if (m_Tool?.Deleted != false || m_Target?.Deleted != false)
|
||||
return;
|
||||
|
||||
if (info.ButtonID == (int)Buttons.Okay)
|
||||
{
|
||||
if (info.ButtonID != (int)Buttons.Okay)
|
||||
{
|
||||
state.Mobile.SendLocalizedMessage(1072363); // The object was not engraved.
|
||||
return;
|
||||
}
|
||||
|
||||
TextRelay relay = info.GetTextEntry((int)Buttons.Text);
|
||||
|
||||
if (relay != null)
|
||||
if (relay == null)
|
||||
return;
|
||||
|
||||
if (string.IsNullOrEmpty(relay.Text))
|
||||
{
|
||||
if (string.IsNullOrEmpty(relay.Text))
|
||||
{
|
||||
m_Target.EngravedText = null;
|
||||
state.Mobile.SendLocalizedMessage(1072362); // You remove the engraving from the object.
|
||||
}
|
||||
else
|
||||
{
|
||||
if (relay.Text.Length > 64)
|
||||
m_Target.EngravedText = Utility.FixHtml(relay.Text.Substring(0, 64));
|
||||
else
|
||||
m_Target.EngravedText = Utility.FixHtml(relay.Text);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Target.EngravedText = Utility.FixHtml(relay.Text.Length > 64 ?
|
||||
relay.Text.Substring(0, 64) : relay.Text);
|
||||
state.Mobile.SendLocalizedMessage(1072361); // You engraved the object.
|
||||
m_Target.InvalidateProperties();
|
||||
m_Tool.UsesRemaining -= 1;
|
||||
m_Tool.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
state.Mobile.SendLocalizedMessage(1072363); // The object was not engraved.
|
||||
}
|
||||
}
|
||||
|
||||
private enum Buttons
|
||||
|
|
@ -320,29 +311,26 @@ namespace Server.Items
|
|||
|
||||
if (guildmaster != null)
|
||||
{
|
||||
AddHtmlLocalized(9, 9, 272, 100, 1076169, 0x7FFF, false,
|
||||
false); // It will cost you 100,000 gold and a blue diamond to recharge your weapon engraver with 10 charges.
|
||||
AddHtmlLocalized(195, 109, 120, 20, 1076172, 0x7FFF, false, false); // Recharge it
|
||||
AddHtmlLocalized(9, 9, 272, 100, 1076169, 0x7FFF); // It will cost you 100,000 gold and a blue diamond to recharge your weapon engraver with 10 charges.
|
||||
AddHtmlLocalized(195, 109, 120, 20, 1076172, 0x7FFF); // Recharge it
|
||||
}
|
||||
else
|
||||
{
|
||||
AddHtmlLocalized(9, 9, 272, 100, 1076176, 0x7FFF, false,
|
||||
false); // You will need a blue diamond to repair the tip of the engraver. A successful repair will give the engraver 10 charges.
|
||||
AddHtmlLocalized(195, 109, 120, 20, 1076177, 0x7FFF, false, false); // Replace the tip.
|
||||
AddHtmlLocalized(9, 9, 272, 100, 1076176, 0x7FFF); // You will need a blue diamond to repair the tip of the engraver. A successful repair will give the engraver 10 charges.
|
||||
AddHtmlLocalized(195, 109, 120, 20, 1076177, 0x7FFF); // Replace the tip.
|
||||
}
|
||||
|
||||
AddButton(160, 107, 0xFB7, 0xFB8, (int)Buttons.Confirm, GumpButtonType.Reply, 0);
|
||||
AddButton(5, 107, 0xFB1, 0xFB2, (int)Buttons.Cancel, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(40, 109, 100, 20, 1060051, 0x7FFF, false, false); // CANCEL
|
||||
AddButton(160, 107, 0xFB7, 0xFB8, (int)Buttons.Confirm);
|
||||
AddButton(5, 107, 0xFB1, 0xFB2, (int)Buttons.Cancel);
|
||||
AddHtmlLocalized(40, 109, 100, 20, 1060051, 0x7FFF); // CANCEL
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState state, RelayInfo info)
|
||||
{
|
||||
if (m_Engraver == null || m_Engraver.Deleted)
|
||||
if (m_Engraver?.Deleted != false || info.ButtonID != (int)Buttons.Confirm)
|
||||
return;
|
||||
|
||||
if (info.ButtonID == (int)Buttons.Confirm)
|
||||
m_Engraver.Recharge(state.Mobile, m_Guildmaster);
|
||||
m_Engraver.Recharge(state.Mobile, m_Guildmaster);
|
||||
}
|
||||
|
||||
private enum Buttons
|
||||
|
|
@ -352,4 +340,4 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue