public override bool OnDragDropInto(Mobile from, Item item, Point3D p) { if (!CheckHold(from, item, true, true)) { return(false); } if (item.QuestItem && from.Backpack != this) { from.SendLocalizedMessage(1074769); // An item must be in your backpack (and not in a container within) to be toggled as a quest item. return(false); } BaseHouse house = BaseHouse.FindHouseAt(this); if (house != null && house.IsLockedDown(this)) { if (item is VendorRentalContract || (item is Container && ((Container)item).FindItemByType(typeof(VendorRentalContract)) != null)) { from.SendLocalizedMessage(1062492); // You cannot place a rental contract in a locked down container. return(false); } if (!house.LockDown(from, item, false)) { return(false); } } item.Location = new Point3D(p.X, p.Y, 0); AddItem(item); from.SendSound(GetDroppedSound(item), GetWorldLocation()); ItemFlags.SetTaken(item, true); if (item.HonestyItem && item.HonestyPickup == DateTime.MinValue) { item.HonestyPickup = DateTime.UtcNow; item.StartHonestyTimer(); if (item.HonestyOwner == null) { Server.Services.Virtues.Honesty.AssignOwner(item); } from.SendLocalizedMessage(1151536); // You have three hours to turn this item in for Honesty credit, otherwise it will cease to be a quest item. } if (Siege.SiegeShard && this != from.Backpack && from is PlayerMobile && ((PlayerMobile)from).BlessedItem != null && ((PlayerMobile)from).BlessedItem == item) { ((PlayerMobile)from).BlessedItem = null; item.LootType = LootType.Regular; from.SendLocalizedMessage(1075292, item.Name != null ? item.Name : "#" + item.LabelNumber.ToString()); // ~1_NAME~ has been unblessed. } return(true); }
public override bool OnDragDropInto(Mobile from, Item item, Point3D p) { if (!this.CheckHold(from, item, true, true)) { return(false); } BaseHouse house = BaseHouse.FindHouseAt(this); if (house != null && house.IsLockedDown(this)) { if (item is VendorRentalContract || (item is Container && ((Container)item).FindItemByType(typeof(VendorRentalContract)) != null)) { from.SendLocalizedMessage(1062492); // You cannot place a rental contract in a locked down container. return(false); } if (!house.LockDown(from, item, false)) { return(false); } } item.Location = new Point3D(p.X, p.Y, 0); this.AddItem(item); from.SendSound(this.GetDroppedSound(item), this.GetWorldLocation()); ItemFlags.SetTaken(item, true); return(true); }
public override bool TryDropItem(Mobile from, Item dropped, bool sendFullMessage) { if (!this.CheckHold(from, dropped, sendFullMessage, true)) { return(false); } BaseHouse house = BaseHouse.FindHouseAt(this); if (house != null && house.IsLockedDown(this)) { if (dropped is VendorRentalContract || (dropped is Container && ((Container)dropped).FindItemByType(typeof(VendorRentalContract)) != null)) { from.SendLocalizedMessage(1062492); // You cannot place a rental contract in a locked down container. return(false); } if (!house.LockDown(from, dropped, false)) { return(false); } } List <Item> list = this.Items; for (int i = 0; i < list.Count; ++i) { Item item = list[i]; if (!(item is Container) && item.StackWith(from, dropped, false)) { return(true); } } this.DropItem(dropped); ItemFlags.SetTaken(dropped, true); if (dropped.HonestyItem && dropped.HonestyPickup == DateTime.MinValue) { dropped.HonestyPickup = DateTime.UtcNow; dropped.StartHonestyTimer(); if (dropped.HonestyOwner == null) { Server.Services.Virtues.Honesty.AssignOwner(dropped); } from.SendLocalizedMessage(1151536); // You have three hours to turn this item in for Honesty credit, otherwise it will cease to be a quest item. } return(true); }
public override bool TryDropItem(Mobile from, Item dropped, bool sendFullMessage) { if (!CheckHold(from, dropped, sendFullMessage, !CheckStack(from, dropped))) { return(false); } if (dropped.QuestItem && from.Backpack != this) { from.SendLocalizedMessage(1074769); // An item must be in your backpack (and not in a container within) to be toggled as a quest item. return(false); } BaseHouse house = BaseHouse.FindHouseAt(this); if (house != null && house.IsLockedDown(this)) { if (dropped is VendorRentalContract || (dropped is Container && ((Container)dropped).FindItemByType(typeof(VendorRentalContract)) != null)) { from.SendLocalizedMessage(1062492); // You cannot place a rental contract in a locked down container. return(false); } if (!house.LockDown(from, dropped, false)) { return(false); } } List <Item> list = Items; for (int i = 0; i < list.Count; ++i) { Item item = list[i]; if (!(item is Container) && item.StackWith(from, dropped, false)) { return(true); } } DropItem(dropped); ItemFlags.SetTaken(dropped, true); EventSink.InvokeContainerDroppedTo(new ContainerDroppedToEventArgs(from, this, dropped)); if (!EnchantedHotItemSocket.CheckDrop(from, this, dropped)) { return(false); } return(true); }
public override bool TryDropItem(Mobile from, Item dropped, bool sendFullMessage) { if (!CheckHold(from, dropped, sendFullMessage, true)) { return(false); } if (XmlScript.HasTrigger(this, TriggerName.onDropIntoContainer) && UberScriptTriggers.Trigger(this, from, TriggerName.onDropIntoContainer, dropped)) // true if return override { return(false); } BaseHouse house = BaseHouse.FindHouseAt(this); if (house != null && house.IsLockedDown(this)) { if (dropped is VendorRentalContract || (dropped is Container && ((Container)dropped).FindItemByType(typeof(VendorRentalContract)) != null)) { from.SendLocalizedMessage(1062492); // You cannot place a rental contract in a locked down container. return(false); } if (!house.LockDown(from, dropped, false)) { return(false); } } List <Item> list = this.Items; for (int i = 0; i < list.Count; ++i) { Item item = list[i]; if (!(item is Container) && item.StackWith(from, dropped, false)) { return(true); } } DropItem(dropped); // ARTEGORDONMOD // Begin mod for spawner release of items // set flag to have item taken off spawner list at next defrag ItemFlags.SetTaken(dropped, true); // End mod for spawner release of items return(true); }
public override bool TryDropItem(Mobile from, Item dropped, bool sendFullMessage) { if (!CheckHold(from, dropped, sendFullMessage, true)) { return(false); } BaseHouse house = BaseHouse.FindHouseAt(this); /*if ( house != null && house.IsLockedDown( this ) ) * { * if ( dropped is VendorRentalContract || ( dropped is Container && * * ((Container)dropped).FindItemByType( typeof( VendorRentalContract ) ) != null ) ) * { * from.SendLocalizedMessage( 1062492 ); // You cannot place a rental contract in a * * locked down container. * return false; * } * * if ( !house.LockDown( from, dropped, false ) ) * return false; * }*/ List <Item> list = Items; for (int i = 0; i < list.Count; ++i) { Item item = list[i]; if (!(item is Container) && item.StackWith(from, dropped, false)) { return(true); } } DropItem(dropped); // ARTEGORDONMOD // Begin mod for spawner release of items // set flag to have item taken off spawner list at next defrag ItemFlags.SetTaken(dropped, true); // End mod for spawner release of items return(true); }
public override bool OnDragDropInto(Mobile from, Item item, Point3D p) { if (!this.CheckHold(from, item, true, true)) { return(false); } BaseHouse house = BaseHouse.FindHouseAt(this); if (house != null && house.IsLockedDown(this)) { if (item is VendorRentalContract || (item is Container && ((Container)item).FindItemByType(typeof(VendorRentalContract)) != null)) { from.SendLocalizedMessage(1062492); // You cannot place a rental contract in a locked down container. return(false); } if (!house.LockDown(from, item, false)) { return(false); } } item.Location = new Point3D(p.X, p.Y, 0); this.AddItem(item); from.SendSound(this.GetDroppedSound(item), this.GetWorldLocation()); ItemFlags.SetTaken(item, true); if (item.HonestyItem && item.HonestyPickup == DateTime.MinValue) { item.HonestyPickup = DateTime.UtcNow; item.StartHonestyTimer(); if (item.HonestyOwner == null) { Server.Services.Virtues.Honesty.AssignOwner(item); } from.SendLocalizedMessage(1151536); // You have three hours to turn this item in for Honesty credit, otherwise it will cease to be a quest item. } return(true); }
public override bool TryDropItem(Mobile from, Item dropped, bool sendFullMessage) { if (!this.CheckHold(from, dropped, sendFullMessage, true)) { return(false); } BaseHouse house = BaseHouse.FindHouseAt(this); if (house != null && house.IsLockedDown(this)) { if (dropped is VendorRentalContract || (dropped is Container && ((Container)dropped).FindItemByType(typeof(VendorRentalContract)) != null)) { from.SendLocalizedMessage(1062492); // You cannot place a rental contract in a locked down container. return(false); } if (!house.LockDown(from, dropped, false)) { return(false); } } List <Item> list = this.Items; for (int i = 0; i < list.Count; ++i) { Item item = list[i]; if (!(item is Container) && item.StackWith(from, dropped, false)) { return(true); } } this.DropItem(dropped); ItemFlags.SetTaken(dropped, true); if (HonestyItem) { StartHonestyTimer(); } return(true); }
public override bool OnDragDropInto(Mobile from, Item item, Point3D p) { if (!CheckHold(from, item, true, true)) { return(false); } if (item.QuestItem && from.Backpack != this) { from.SendLocalizedMessage(1074769); // An item must be in your backpack (and not in a container within) to be toggled as a quest item. return(false); } BaseHouse house = BaseHouse.FindHouseAt(this); if (house != null && house.IsLockedDown(this)) { if (item is VendorRentalContract || (item is Container && ((Container)item).FindItemByType(typeof(VendorRentalContract)) != null)) { from.SendLocalizedMessage(1062492); // You cannot place a rental contract in a locked down container. return(false); } if (!house.LockDown(from, item, false)) { return(false); } } item.Location = new Point3D(p.X, p.Y, 0); AddItem(item); from.SendSound(GetDroppedSound(item), GetWorldLocation()); ItemFlags.SetTaken(item, true); EventSink.InvokeContainerDroppedTo(new ContainerDroppedToEventArgs(from, this, item)); if (!EnchantedHotItemSocket.CheckDrop(from, this, item)) { return(false); } return(true); }
public virtual void DropItemStacked(Item dropped) { List <Item> list = Items; ItemFlags.SetTaken(dropped, true); for (int i = 0; i < list.Count; ++i) { Item item = list[i]; if (!(item is Container) && item.StackWith(null, dropped, false)) { return; } } DropItem(dropped); }
public override bool OnDragDropInto(Mobile from, Item item, Point3D p) { if (!CheckHold(from, item, true, true)) { return(false); } if (XmlScript.HasTrigger(this, TriggerName.onDropIntoContainer) && UberScriptTriggers.Trigger(this, from, TriggerName.onDropIntoContainer, item)) // true if return override { return(false); } BaseHouse house = BaseHouse.FindHouseAt(this); if (house != null && house.IsLockedDown(this)) { if (item is VendorRentalContract || (item is Container && ((Container)item).FindItemByType(typeof(VendorRentalContract)) != null)) { from.SendLocalizedMessage(1062492); // You cannot place a rental contract in a locked down container. return(false); } if (!house.LockDown(from, item, false)) { return(false); } } item.Location = new Point3D(p.X, p.Y, 0); AddItem(item); from.SendSound(GetDroppedSound(item), GetWorldLocation()); // ARTEGORDONMOD // Begin mod for spawner release of items // set flag to have item taken off spawner list at next defrag ItemFlags.SetTaken(item, true); // End mod for spawner release of items return(true); }
public override bool TryDropItem(Mobile from, Item dropped, bool sendFullMessage) { if (!CheckHold(from, dropped, sendFullMessage, !CheckStack(from, dropped))) { return(false); } if (dropped.QuestItem && from.Backpack != this) { from.SendLocalizedMessage(1074769); // An item must be in your backpack (and not in a container within) to be toggled as a quest item. return(false); } BaseHouse house = BaseHouse.FindHouseAt(this); if (house != null && house.IsLockedDown(this)) { if (dropped is VendorRentalContract || (dropped is Container && ((Container)dropped).FindItemByType(typeof(VendorRentalContract)) != null)) { from.SendLocalizedMessage(1062492); // You cannot place a rental contract in a locked down container. return(false); } if (!house.LockDown(from, dropped, false)) { return(false); } } List <Item> list = Items; for (int i = 0; i < list.Count; ++i) { Item item = list[i]; if (!(item is Container) && item.StackWith(from, dropped, false)) { return(true); } } DropItem(dropped); ItemFlags.SetTaken(dropped, true); if (dropped.HonestyItem && dropped.HonestyPickup == DateTime.MinValue) { dropped.HonestyPickup = DateTime.UtcNow; dropped.StartHonestyTimer(); if (dropped.HonestyOwner == null) { Server.Services.Virtues.HonestyVirtue.AssignOwner(dropped); } from.SendLocalizedMessage(1151536); // You have three hours to turn this item in for Honesty credit, otherwise it will cease to be a quest item. } if (Siege.SiegeShard && this != from.Backpack && from is PlayerMobile && ((PlayerMobile)from).BlessedItem != null && ((PlayerMobile)from).BlessedItem == dropped) { ((PlayerMobile)from).BlessedItem = null; dropped.LootType = LootType.Regular; from.SendLocalizedMessage(1075292, dropped.Name != null ? dropped.Name : "#" + dropped.LabelNumber.ToString()); // ~1_NAME~ has been unblessed. } if (!EnchantedHotItem.CheckDrop(from, this, dropped)) { return(false); } return(true); }