Пример #1
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                Point3D p           = from.Location;
                bool    validtarget = false;

                if (targeted is StaticTarget)
                {
                    p           = new Point3D((IPoint3D)targeted);
                    validtarget = true;
                }
                else if (targeted is Item)
                {
                    p           = new Point3D(((Item)targeted).Location);
                    validtarget = true;
                }
                if (validtarget)
                {
                    BaseHouse house = BaseHouse.FindHouseAt(p, from.Map, p.Z);
                    // Must be owner or co-owner, and requires 1 vendor slot and 125 lockdowns
                    if (house != null && house.Owner == from && house.CanPlaceNewVendor() && house.CheckAosStorage(125))
                    {
                        Steward m =
                            (Steward)Activator.CreateInstance(typeof(Steward), new object[] { from });
                        m.MoveToWorld(p, from.Map);
                        m.Direction = Direction.South;
                        mDeed.Delete();
                    }
                    else
                    {
                        from.SendMessage(
                            "You must place this in a house to which you are an owner or co-owner, and have 1 free vendor slot and 125 available lockdowns.");
                    }
                }
            }
Пример #2
0
        public void ValidateItems(Mobile from, Mobile m)
        {
            List <Item> MannequinItems = m.Items.Where(x => Steward.IsEquipped(x)).ToList();

            MannequinItems.ForEach(x => _Mannequin.RemoveItem(x));

            List <Item> ExceptItems = new List <Item>();

            MannequinItems.ForEach(x =>
            {
                if (x.CanEquip(m))
                {
                    m.EquipItem(x);
                }
                else
                {
                    ExceptItems.Add(x);
                }
            });

            if (ExceptItems.Count > 0)
            {
                ExceptItems.ForEach(x => from.AddToBackpack(x));
                from.SendLocalizedMessage(1151641, ExceptItems.Count.ToString(), 0x22); // ~1_COUNT~ items could not be swapped between you and the mannequin. These items are now in your backpack, or on the floor at your feet if your backpack is too full to hold them.
            }
        }
Пример #3
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int version = reader.ReadInt();

            mOwner = reader.ReadMobile <Steward>();
        }
Пример #4
0
            public StewardGump(Mobile from, Steward Steward)
                : base(0, 0)
            {
                m_From    = from;
                m_Steward = Steward;

                from.CloseGump(typeof(StewardGump));

                AddBackground();
                AddButtons();
            }
Пример #5
0
        protected override void OnTarget(Mobile from, object targeted)
        {
            IPoint3D p   = targeted as IPoint3D;
            Map      map = from.Map;

            if (p == null || map == null || _Deed == null || _Deed.Deleted)
            {
                return;
            }

            if (_Deed.IsChildOf(from.Backpack))
            {
                SpellHelper.GetSurfaceTop(ref p);
                BaseHouse house = null;
                Point3D   loc   = new Point3D(p);

                if (targeted is Item && !((Item)targeted).IsLockedDown && !((Item)targeted).IsSecure && !(targeted is AddonComponent))
                {
                    from.SendLocalizedMessage(1151655); // The mannequin cannot fit there.
                    return;
                }

                AddonFitResult result = CouldFit(loc, map, from, ref house);

                if (result == AddonFitResult.Valid)
                {
                    Mobile mannequin;

                    if (_Deed is StewardDeed)
                    {
                        mannequin = new Steward(from, house);
                    }
                    else
                    {
                        mannequin = new Mannequin(from);
                    }

                    mannequin.MoveToWorld(loc, map);
                    _Deed.Delete();
                }
                else
                {
                    from.SendLocalizedMessage(1151655); // The mannequin cannot fit there.
                }
            }
            else
            {
                from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
            }
        }
Пример #6
0
 public RenamePrompt(Steward ward)
 {
     steward = ward;
 }
Пример #7
0
 public SetKeywordEntry(Mobile mob, Steward ward)
     : base(1153254, 4)
 {
     from    = mob;
     steward = ward;
 }
Пример #8
0
 public override void Deserialize(GenericReader reader)
 {
     base.Deserialize(reader);
     int version = reader.ReadInt();
     mOwner = reader.ReadMobile<Steward>();
 }
Пример #9
0
 public SetKeywordPrompt(Steward ward)
 {
     steward = ward;
 }
Пример #10
0
 public RotateEntry(Mobile mob, Steward ward)
     : base(1151586, 4)
 {
     from    = mob;
     steward = ward;
 }
Пример #11
0
 public MyTimer(Steward steward) : base(TimeSpan.FromHours(24.0))
 {
     mSteward = steward;
 }
Пример #12
0
 public MyTimer(Steward steward) : base(TimeSpan.FromHours(24.0))
 {
     mSteward = steward;
 }
Пример #13
0
 public CustomizeBodyEntry(Mobile mob, Steward ward)
     : base(1151585, 4)
 {
     from    = mob;
     steward = ward;
 }
Пример #14
0
 public RotateEntry(Mobile mob, Steward ward)
     : base(1151586, 4)
 {
     from = mob;
     steward = ward;
 }
Пример #15
0
 public RedeedEntry(Mobile mob, Steward ward)
     : base(1151601, 4)
 {
     from = mob;
     steward = ward;
 }
Пример #16
0
 public SwitchClothesEntry(Mobile mob, Steward ward)
     : base(1151606, 4)
 {
     from = mob;
     steward = ward;
 }
Пример #17
0
 public CustomizeBodyEntry(Mobile mob, Steward ward)
     : base(1151585, 4)
 {
     from = mob;
     steward = ward;
 }
Пример #18
0
 public OpenBackpackEntry(Mobile mob, Steward ward)
     : base(3006145, 4)
 {
     from = mob;
     steward = ward;
 }
Пример #19
0
 public SetKeywordPrompt(Steward ward)
 {
     steward = ward;
 }
Пример #20
0
 public RenamePrompt(Steward ward)
 {
     steward = ward;
 }
Пример #21
0
 public OpenBackpackEntry(Mobile mob, Steward ward)
     : base(3006145, 4)
 {
     from    = mob;
     steward = ward;
 }
Пример #22
0
 public StewardBackpack(Steward owner)
 {
     mOwner = owner;
 }
Пример #23
0
 public SwitchClothesEntry(Mobile mob, Steward ward)
     : base(1151606, 4)
 {
     from    = mob;
     steward = ward;
 }
Пример #24
0
 public StewardBackpack(Steward owner)
 {
     mOwner = owner;
 }
Пример #25
0
 public RedeedEntry(Mobile mob, Steward ward)
     : base(1151601, 4)
 {
     from    = mob;
     steward = ward;
 }
Пример #26
0
 public RenameEntry(Mobile mob, Steward ward)
     : base(1155203, 4)
 {
     from = mob;
     steward = ward;
 }
Пример #27
0
 public SwitchClothesEntry(Mobile from, Steward m)
     : base(1151606, 2)
 {
     _From      = from;
     _Mannequin = m;
 }
Пример #28
0
 public RenameEntry(Mobile mob, Steward ward)
     : base(1155203, 4)
 {
     from    = mob;
     steward = ward;
 }
Пример #29
0
            public StewardGump(Mobile from, Steward Steward)
                : base(0, 0)
            {
                m_From = from;
                m_Steward = Steward;

                from.CloseGump(typeof (StewardGump));

                AddBackground();
                AddButtons();
            }
Пример #30
0
 public SetKeywordEntry(Mobile mob, Steward ward)
     : base(1153254, 4)
 {
     from = mob;
     steward = ward;
 }