From d6ebe67dd84cf965e8f9c34c414376f54cf98338 Mon Sep 17 00:00:00 2001 From: vexyl Date: Sat, 29 Jul 2023 18:43:39 -0400 Subject: [PATCH] fix: Fixes untamed creatures not entering houses (#1436) --- Projects/UOContent/Engines/Spawners/SpawnerEntry.cs | 5 ----- .../UOContent/Items/Weapons/Staves/ShepherdsCrook.cs | 2 +- Projects/UOContent/Regions/HouseRegion.cs | 10 +++------- 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/Projects/UOContent/Engines/Spawners/SpawnerEntry.cs b/Projects/UOContent/Engines/Spawners/SpawnerEntry.cs index fb681fd44..c98b9c4f5 100644 --- a/Projects/UOContent/Engines/Spawners/SpawnerEntry.cs +++ b/Projects/UOContent/Engines/Spawners/SpawnerEntry.cs @@ -46,11 +46,6 @@ namespace Server.Engines.Spawners { e.Spawner = parent; - if (e is BaseCreature creature) - { - creature.RemoveIfUntamed = true; - } - Spawned.Add(e); parent.Spawned.TryAdd(e, this); } diff --git a/Projects/UOContent/Items/Weapons/Staves/ShepherdsCrook.cs b/Projects/UOContent/Items/Weapons/Staves/ShepherdsCrook.cs index a13491f47..88e36240a 100644 --- a/Projects/UOContent/Items/Weapons/Staves/ShepherdsCrook.cs +++ b/Projects/UOContent/Items/Weapons/Staves/ShepherdsCrook.cs @@ -81,7 +81,7 @@ namespace Server.Items } } - private bool IsHerdable(BaseCreature bc) + private static bool IsHerdable(BaseCreature bc) { if (bc.IsParagon) { diff --git a/Projects/UOContent/Regions/HouseRegion.cs b/Projects/UOContent/Regions/HouseRegion.cs index 5f6c01959..dbbf6f71d 100644 --- a/Projects/UOContent/Regions/HouseRegion.cs +++ b/Projects/UOContent/Regions/HouseRegion.cs @@ -144,18 +144,14 @@ public class HouseRegion : BaseRegion if (bc?.NoHouseRestrictions != true) { - if (bc?.Controlled == false) // Untamed creatures cannot enter public houses - { - return false; - } - if (bc?.IsHouseSummonable == true && !(BaseCreature.Summoning || House.IsInside(oldLocation, 16))) { return false; } - if (bc?.Controlled == false && House.IsAosRules && !House.Public) + // Untamed creatures cannot enter private houses + if (House.IsAosRules && !House.Public && bc?.Controlled == false) { return false; } @@ -406,4 +402,4 @@ public class HouseRegion : BaseRegion return base.OnSingleClick(from, o); } -} \ No newline at end of file +}