#W# Tweak: Moongates now hide you when you use them.

This commit is contained in:
WarrentyExpired 2026-10-14 13:31:23 -04:00
parent d5f10e58dc
commit c66ce46f90

View file

@ -94,11 +94,19 @@ public partial class CustomMoongate : Item
{
if (m is PlayerMobile pm)
{
pm.Hidden = true;
// Close any existing moongate gumps before opening a new one
pm.CloseGump<CustomMoongateGump>();
pm.SendGump(new CustomMoongateGump(this));
Effects.PlaySound(pm.Location, pm.Map, 0x20E);
Timer.DelayCall(() =>
{
if (pm.Alive && pm.Map == Map && pm.InRange(Location, 1))
{
pm.Combatant = null;
pm.Warmode = false;
pm.Hidden = true;
}
});
}
}
}