Esempio n. 1
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                Item targ = targeted as Item;

                if (this.m_Obsidian.Deleted || this.m_Obsidian.Quantity >= Obsidian.m_Completed || targ == null)
                {
                    return;
                }

                if (this.m_Obsidian.IsChildOf(from.Backpack) && targ.IsChildOf(from.Backpack) && targ is Obsidian && targ != this.m_Obsidian)
                {
                    Obsidian targObsidian = (Obsidian)targ;
                    if (targObsidian.Quantity < Obsidian.m_Completed)
                    {
                        if (targObsidian.Quantity + this.m_Obsidian.Quantity <= Obsidian.m_Completed)
                        {
                            targObsidian.Quantity += this.m_Obsidian.Quantity;
                            this.m_Obsidian.Delete();
                        }
                        else
                        {
                            int delta = Obsidian.m_Completed - targObsidian.Quantity;
                            targObsidian.Quantity    += delta;
                            this.m_Obsidian.Quantity -= delta;
                        }

                        if (targObsidian.Quantity >= Obsidian.m_Completed)
                        {
                            targObsidian.StatueName = Obsidian.RandomName(from);
                        }

                        from.Send(new AsciiMessage(targObsidian.Serial, targObsidian.ItemID, MessageType.Regular, 0x59, 3, this.m_Obsidian.Name, "Something Happened."));

                        return;
                    }
                }

                from.Send(new MessageLocalized(this.m_Obsidian.Serial, this.m_Obsidian.ItemID, MessageType.Regular, 0x2C, 3, 500309, this.m_Obsidian.Name, "")); // Nothing Happens.
            }
Esempio n. 2
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                Obsidian targ = targeted as Obsidian;

                if (m_Obsidian.Deleted || m_Obsidian.Quantity >= Obsidian.Completed || targ == null)
                {
                    return;
                }

                if (m_Obsidian.IsChildOf(from.Backpack) && targ.IsChildOf(from.Backpack) && targ != m_Obsidian)
                {
                    Obsidian targObsidian = (Obsidian)targ;
                    if (targObsidian.Quantity < Obsidian.Completed)
                    {
                        if (targObsidian.Quantity + m_Obsidian.Quantity <= Obsidian.Completed)
                        {
                            targObsidian.Quantity += m_Obsidian.Quantity;
                            m_Obsidian.Delete();
                        }
                        else
                        {
                            int delta = Obsidian.Completed - targObsidian.Quantity;
                            targObsidian.Quantity += delta;
                            m_Obsidian.Quantity   -= delta;
                        }

                        if (targObsidian.Quantity >= Obsidian.Completed)
                        {
                            targObsidian.StatueName = Utility.Random(m_Names.Length);
                        }

                        from.Send(new AsciiMessage(targObsidian.Serial, targObsidian.ItemID, MessageType.Regular, 0x59, 3, m_Obsidian.Name, "Something Happened."));

                        return;
                    }
                }

                from.Send(new MessageLocalized(m_Obsidian.Serial, m_Obsidian.ItemID, MessageType.Regular, 0x2C, 3, 500309, m_Obsidian.Name, ""));                     // Nothing Happens.
            }
Esempio n. 3
0
			public InternalTarget( Obsidian obsidian ) : base( -1, false, TargetFlags.None )
			{
				m_Obsidian = obsidian;
			}
Esempio n. 4
0
			public DisassembleEntry( Obsidian obsidian ) : base( 6142 )
			{
				m_Obsidian = obsidian;
			}
Esempio n. 5
0
 public InternalTarget(Obsidian obsidian)
     : base(-1, false, TargetFlags.None)
 {
     this.m_Obsidian = obsidian;
 }
Esempio n. 6
0
 public DisassembleEntry(Obsidian obsidian)
     : base(6142)
 {
     this.m_Obsidian = obsidian;
 }
Esempio n. 7
0
 public InternalTarget(Obsidian Obsidian) : base(-1, false, TargetFlags.None)
 {
     m_Obsidian = Obsidian;
 }
Esempio n. 8
0
 public DisassembleEntry(Obsidian Obsidian) : base(6142)
 {
     m_Obsidian = Obsidian;
 }