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."); } } }
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. } }
public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.ReadInt(); mOwner = reader.ReadMobile <Steward>(); }
public StewardGump(Mobile from, Steward Steward) : base(0, 0) { m_From = from; m_Steward = Steward; from.CloseGump(typeof(StewardGump)); AddBackground(); AddButtons(); }
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. } }
public RenamePrompt(Steward ward) { steward = ward; }
public SetKeywordEntry(Mobile mob, Steward ward) : base(1153254, 4) { from = mob; steward = ward; }
public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.ReadInt(); mOwner = reader.ReadMobile<Steward>(); }
public SetKeywordPrompt(Steward ward) { steward = ward; }
public RotateEntry(Mobile mob, Steward ward) : base(1151586, 4) { from = mob; steward = ward; }
public MyTimer(Steward steward) : base(TimeSpan.FromHours(24.0)) { mSteward = steward; }
public CustomizeBodyEntry(Mobile mob, Steward ward) : base(1151585, 4) { from = mob; steward = ward; }
public RedeedEntry(Mobile mob, Steward ward) : base(1151601, 4) { from = mob; steward = ward; }
public SwitchClothesEntry(Mobile mob, Steward ward) : base(1151606, 4) { from = mob; steward = ward; }
public OpenBackpackEntry(Mobile mob, Steward ward) : base(3006145, 4) { from = mob; steward = ward; }
public StewardBackpack(Steward owner) { mOwner = owner; }
public RenameEntry(Mobile mob, Steward ward) : base(1155203, 4) { from = mob; steward = ward; }
public SwitchClothesEntry(Mobile from, Steward m) : base(1151606, 2) { _From = from; _Mannequin = m; }
public StewardGump(Mobile from, Steward Steward) : base(0, 0) { m_From = from; m_Steward = Steward; from.CloseGump(typeof (StewardGump)); AddBackground(); AddButtons(); }