protected override void OnTarget(Mobile from, object o) { IPoint3D ip = o as IPoint3D; if (ip != null) { if (ip is Item) { ip = ((Item)ip).GetWorldTop(); } Point3D p = new Point3D(ip); Region region = Region.Find(p, from.Map); if (region.IsPartOf(typeof(HouseRegion)) || region.IsPartOf(typeof(ChampionSpawnRegion))) { from.SendAsciiMessage("A boat may not be placed in this area."); // A boat may not be placed in this area. } else { m_Deed.OnPlacement(from, p); } } }
protected override void OnTarget(Mobile from, object o) { IPoint3D ip = o as IPoint3D; if (ip != null) { if (ip is Item) { ip = ((Item)ip).GetWorldTop(); } Point3D p = new Point3D(ip); Region region = Region.Find(p, from.Map); if (region.IsPartOf(typeof(DungeonRegion))) { from.SendLocalizedMessage(502488); // You can not place a ship inside a dungeon. } else if (region.IsPartOf(typeof(HouseRegion))) { from.SendLocalizedMessage(1042549); // A boat may not be placed in this area. } else { m_Deed.OnPlacement(from, p); } } }
protected override void OnTarget(Mobile from, object o) { var ip = o as IPoint3D; if (ip != null) { if (ip is Item) { ip = ((Item)ip).GetWorldTop(); } var p = new Point3D(ip); Region region = Region.Find(p, from.Map); m_Deed.OnPlacement(from, p); } }