feat: Fixes beneficial notoriety checks and adds better young restrictions/messaging (#2000)

This commit is contained in:
Kamron Batman 2025-01-20 11:27:19 -08:00 committed by GitHub
parent 64e32a817d
commit 84d9383294
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 78 additions and 96 deletions

View file

@ -7105,23 +7105,17 @@ public partial class Mobile : IHued, IComparable<Mobile>, ISpawnable, IObjectPro
return false;
}
if (item.Parent != null)
if (item.Parent is Item parent)
{
if (item.Parent is Item parent)
if (!(CanSee(parent) && parent.IsChildVisibleTo(this, item)))
{
if (!(CanSee(parent) && parent.IsChildVisibleTo(this, item)))
{
return false;
}
}
else if (item.Parent is Mobile mobile)
{
if (!CanSee(mobile))
{
return false;
}
return false;
}
}
else if (item.Parent is Mobile mobile && !CanSee(mobile))
{
return false;
}
if (item is BankBox box && m_AccessLevel <= AccessLevel.Counselor && (box.Owner != this || !box.Opened))
{