fix: Fixes pet validation for resurrection spell (#2197)

This commit is contained in:
Bohica 2025-07-16 21:34:43 -07:00 committed by GitHub
parent 5f0561b7fc
commit c1af2ade83
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,6 +1,7 @@
using Server.Engines.ConPVP; using Server.Engines.ConPVP;
using Server.Gumps; using Server.Gumps;
using Server.Targeting; using Server.Targeting;
using Server.Mobiles;
namespace Server.Spells.Eighth namespace Server.Spells.Eighth
{ {
@ -30,22 +31,22 @@ namespace Server.Spells.Eighth
{ {
Caster.SendLocalizedMessage(501039); // Thou can not resurrect thyself. Caster.SendLocalizedMessage(501039); // Thou can not resurrect thyself.
} }
else if (!Caster.Alive) else if (m is BaseCreature { IsDeadBondedPet: true })
{ {
Caster.SendLocalizedMessage(501040); // The resurrecter must be alive. Caster.SendMessage("Target can not be revived this way.");
}
else if (!m.Player)
{
Caster.SendLocalizedMessage(501043); // Target is not a being.
} }
else if (m.Alive) else if (m.Alive)
{ {
Caster.SendLocalizedMessage(501041); // Target is not dead. Caster.SendLocalizedMessage(501041); // Target is not dead.
} }
else if (!Caster.InRange(m, 1)) else if (!Caster.InRange(m, TargetRange))
{ {
Caster.SendLocalizedMessage(501042); // Target is not close enough. Caster.SendLocalizedMessage(501042); // Target is not close enough.
} }
else if (!m.Player)
{
Caster.SendLocalizedMessage(501043); // Target is not a being.
}
else if (m.Map?.CanFit(m.Location, 16, false, false) != true) else if (m.Map?.CanFit(m.Location, 16, false, false) != true)
{ {
Caster.SendLocalizedMessage(501042); // Target can not be resurrected at that location. Caster.SendLocalizedMessage(501042); // Target can not be resurrected at that location.