fix(throwing): guard return-throw effect against deleted/unmapped thrower

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Kamron Batman 2026-07-02 20:48:07 -07:00
parent ff84f140df
commit b0ef0d55e1

View file

@ -132,12 +132,12 @@ public abstract partial class BaseThrown : BaseRanged
public virtual void Return(Mobile thrower, Mobile target, WorldLocation worldLocation)
{
if (thrower == null)
if (thrower?.Deleted != false || thrower.Map == null || thrower.Map == Map.Internal)
{
return;
}
if (target != null)
if (target?.Deleted == false)
{
target.MovingEffect(thrower, EffectID, 18, 1, false, false, Hue, 0);
}