public override void OnDoubleClick(Mobile from) { if (IsChildOf(from.Backpack)) { if (Amount > 1) { Container pack = from.Backpack; if (pack != null) { Matches match = new Matches(); if (pack.CheckHold(from, match, true)) { pack.DropItem(match); Amount--; match.ItemID = 2578; from.SendSound(0x047); match.IsLight = true; } else { match.Delete(); } } } else if (!m_IsLight) { new InternalTimer(this); from.SendLocalizedMessage(1116114); //You ignite the match. ItemID = 2578; from.SendSound(0x047); m_IsLight = true; } else { from.Target = new InternalTarget(this); from.SendLocalizedMessage(1116113); //Target the cannon whose fuse you wish to light. } } }
public override void OnDoubleClick(Mobile from) { if (IsChildOf(from.Backpack)) { if (Amount > 1) { Container pack = from.Backpack; if(pack != null) { Matches match = new Matches(); if (pack.CheckHold(from, match, true)) { pack.DropItem(match); this.Amount--; match.ItemID = 2578; from.SendSound(0x047); match.IsLight = true; } else match.Delete(); } } else if (!m_IsLight) { new InternalTimer(this); from.SendLocalizedMessage(1116114); //You ignite the match. ItemID = 2578; from.SendSound(0x047); m_IsLight = true; } else { from.Target = new InternalTarget(this); from.SendLocalizedMessage(1116113); //Target the cannon whose fuse you wish to light. } } }
public InternalTimer(Matches match) : base(Matches.LightDuration) { m_Match = match; Start(); }
public InternalTarget(Matches match) : base(3, false, TargetFlags.None) { m_Match = match; }
public InternalTarget(Matches match) : base (3, false, TargetFlags.None) { m_Match = match; }