fix: Moves many EventSinks out of core. (#1783)

This commit is contained in:
Marcelo Paez Sequeira 2024-05-21 14:02:30 -03:00 • committed by GitHub
parent 1cb798d807
commit 00908d030f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
45 changed files with 133 additions and 276 deletions

View file

@ -490,8 +490,7 @@ public partial class Mobile : IHued, IComparable<Mobile>, ISpawnable, IObjectPro
if (oldValue != value)
{
m_Hunger = value;
EventSink.InvokeHungerChanged(this, oldValue);
OnHungerChanged(oldValue);
}
}
}
@ -3698,6 +3697,14 @@ public partial class Mobile : IHued, IComparable<Mobile>, ISpawnable, IObjectPro
{
}
/// <summary>
/// Overridable. Virtual event invoked after the <see cref="Hunger" /> property has changed.
/// <seealso cref="Hunger" />
/// </summary>
public virtual void OnHungerChanged(int oldValue)
{
}
public double GetDistanceToSqrt(Point3D p)
{
var xDelta = m_Location.m_X - p.m_X;