ModernUO/Projects/UOContent/Special Systems/Items/Resurrection/ResGate.cs
Kamron Batman 8282b00ca2
feat: Moves gumps out of the core (#1916)
> [!Important]
> **Developer Note**
> This code change will **completely move gumps out of the core**


### Summary

- Adds `GetGumps()` convenience which exposes methods to Find/Close/Send multiple gumps. This helper is a performance improvement by eliminating the Dictionary<Player, List> lookup for gumps.
2024-08-09 19:07:32 -07:00

35 lines
783 B
C#

using ModernUO.Serialization;
using Server.Gumps;
namespace Server.Items;
[SerializationGenerator(0, false)]
public partial class ResGate : Item
{
[Constructible]
public ResGate() : base(0xF6C)
{
Movable = false;
Hue = 0x2D1;
Light = LightType.Circle300;
}
public override string DefaultName => "a resurrection gate";
public override bool OnMoveOver(Mobile m)
{
if (!m.Alive && m.Map?.CanFit(m.Location, 16, false, false) == true)
{
m.PlaySound(0x214);
m.FixedEffect(0x376A, 10, 16);
m.SendGump(new ResurrectGump(m));
}
else
{
m.SendLocalizedMessage(502391); // Thou can not be resurrected there!
}
return false;
}
}