Beispiel #1
0
        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.
                }
            }
        }
Beispiel #2
0
        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.
                }
            }
        }
Beispiel #3
0
 public InternalTimer(Matches match) : base(Matches.LightDuration)
 {
     m_Match = match;
     Start();
 }
Beispiel #4
0
 public InternalTarget(Matches match) : base(3, false, TargetFlags.None)
 {
     m_Match = match;
 }
Beispiel #5
0
 public InternalTimer(Matches match) : base(Matches.LightDuration)
 {
     m_Match = match;
     Start();
 }
Beispiel #6
0
 public InternalTarget(Matches match) : base (3, false, TargetFlags.None)
 {
     m_Match = match;
 }