fix: Converts ResurrectGump to Static/Dynamic Gumps (#1904)
This commit is contained in:
parent
808e721e3d
commit
9014f3d4dc
9 changed files with 294 additions and 237 deletions
|
|
@ -311,7 +311,7 @@ public class BandageContext : Timer
|
|||
else
|
||||
{
|
||||
Patient.CloseGump<ResurrectGump>();
|
||||
Patient.SendGump(new ResurrectGump(Patient, Healer));
|
||||
Patient.SendGump(new ResurrectGump(Healer));
|
||||
}
|
||||
}
|
||||
else if (Patient.Poisoned)
|
||||
|
|
|
|||
|
|
@ -83,29 +83,31 @@ public partial class AnkhOfSacrificeComponent : AddonComponent
|
|||
|
||||
private class AnkhResurrectGump : ResurrectGump
|
||||
{
|
||||
public AnkhResurrectGump(Mobile owner, ResurrectMessage msg) : base(owner, owner, msg)
|
||||
public AnkhResurrectGump(Mobile owner, ResurrectMessage msg) : base(owner, msg)
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState state, in RelayInfo info)
|
||||
{
|
||||
if (info.ButtonID is not 1 and not 2)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var from = state.Mobile;
|
||||
|
||||
if (info.ButtonID is 1 or 2)
|
||||
if (from.Map?.CanFit(from.Location, 16, false, false) != true)
|
||||
{
|
||||
if (from.Map?.CanFit(from.Location, 16, false, false) != true)
|
||||
{
|
||||
from.SendLocalizedMessage(502391); // Thou can not be resurrected there!
|
||||
return;
|
||||
}
|
||||
|
||||
if (from is PlayerMobile mobile)
|
||||
{
|
||||
mobile.AnkhNextUse = Core.Now + TimeSpan.FromHours(1);
|
||||
}
|
||||
|
||||
base.OnResponse(state, info);
|
||||
from.SendLocalizedMessage(502391); // Thou can not be resurrected there!
|
||||
return;
|
||||
}
|
||||
|
||||
if (from is PlayerMobile mobile)
|
||||
{
|
||||
mobile.AnkhNextUse = Core.Now + TimeSpan.FromHours(1);
|
||||
}
|
||||
|
||||
base.OnResponse(state, info);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue