fix: Fixes untamed creatures not entering houses (#1436)

This commit is contained in:
vexyl 2023-07-29 18:43:39 -04:00 committed by GitHub
parent b8df42721f
commit d6ebe67dd8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 13 deletions

View file

@ -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);
}

View file

@ -81,7 +81,7 @@ namespace Server.Items
}
}
private bool IsHerdable(BaseCreature bc)
private static bool IsHerdable(BaseCreature bc)
{
if (bc.IsParagon)
{

View file

@ -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);
}
}
}