Can anyone give some pointers on gump handling when using the resurrection gump? I have no problems working with say runebook gumps, but I am stuck on the resurrection gump.
Take the following code:
while (true)
{
List<Gump> gumps = Gump.ActiveGumps;
List <Serial> serial = Gump.Serials;
List<uint> type = Gump.Types;
Console.WriteLine(gumps.Count);
Console.WriteLine(serial.Count);
Console.WriteLine(type.Count);
bool rezGumpShown = Gump.WaitForGump(2223, 5000); //2223 = rez gump
if (rezGumpShown)
{
Gump rezGump = Gump.GetGump(2223);
}
Thread.Sleep(2000);
}
If I am dead, and not near a wandering healer, my console output will be 0,0,0. As I approach the healer and the rez gump appears, 0,1,1. Also, once inside the if statement, Gump rezGump = Gump.GetGump(2223);
throws a null reference exception.
Is there a reason the rez gump doesn't appear in my list of active gumps? Any ideas about the NR exception?
I really appreciate your help!