Пример #1
0
            public InternalTarget(BaseAddonContainerDeed deed)
                : base(-1, true, TargetFlags.None)
            {
                m_Deed = deed;

                CheckLOS = false;
            }
Пример #2
0
            public InternalTarget( BaseAddonContainerDeed deed )
                : base(-1, true, TargetFlags.None)
            {
                m_Deed = deed;

                CheckLOS = false;
            }
Пример #3
0
        public virtual void OnChop(Mobile from)
        {
            BaseHouse house = BaseHouse.FindHouseAt(this);

            if (house != null && house.IsOwner(from))
            {
                if (!IsSecure)
                {
                    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)
                        {
                            AddonContainerComponent c = m_Components[i];

                            if (c.Hue != 0)
                            {
                                hue = c.Hue;
                            }
                        }
                    }

                    DropItemsToGround();

                    Delete();

                    house.Addons.Remove(this);

                    BaseAddonContainerDeed deed = Deed;

                    if (deed != null)
                    {
                        deed.Resource = Resource;

                        if (RetainDeedHue)
                        {
                            deed.Hue = hue;
                        }

                        from.AddToBackpack(deed);
                    }
                }
                else
                {
                    from.SendLocalizedMessage(1074870);                       // This item must be unlocked/unsecured before re-deeding it.
                }
            }
        }
Пример #4
0
        public override void OnChop(Mobile from)
        {
            BaseHouse house = BaseHouse.FindHouseAt(this);

            if (house != null && house.IsOwner(from))
            {
                Effects.PlaySound(GetWorldLocation(), Map, 0x3B3);
                DropItemsToGround();
                Delete();
                house.Addons.Remove(this);
                BaseAddonContainerDeed deed = Deed;
                if (deed != null)
                {
                    deed.Resource = Resource;
                    from.AddToBackpack(deed);
                }
            }
        }
Пример #5
0
        public virtual 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.

                int hue = 0;

                if (RetainDeedHue)
                {
                    for (int i = 0; hue == 0 && i < m_Components.Count; ++i)
                    {
                        AddonContainerComponent c = (AddonContainerComponent)m_Components[i];

                        if (c.Hue != 0)
                        {
                            hue = c.Hue;
                        }
                    }
                }

                Delete();

                house.Addons.Remove(this);

                BaseAddonContainerDeed deed = Deed;

                if (deed != null)
                {
                    if (RetainDeedHue)
                    {
                        deed.Hue = hue;
                    }

                    from.AddToBackpack(deed);
                }
            }
        }