Adds BufferReader and BufferWriter. Updates UOP handling. (#101)

This commit is contained in:
Kamron Batman 2020-04-12 21:33:24 -07:00 committed by GitHub
parent 2c0d97cd36
commit 038c3be258
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
98 changed files with 2458 additions and 2185 deletions

View file

@ -1,4 +1,5 @@
using System;
using System.Linq;
using Server.Engines.ConPVP;
using Server.Factions;
using Server.Gumps;
@ -194,19 +195,17 @@ namespace Server.Engines.Help
EventSink.HelpRequest += EventSink_HelpRequest;
}
private static void EventSink_HelpRequest(HelpRequestEventArgs e)
private static void EventSink_HelpRequest(Mobile m)
{
foreach (Gump g in e.Mobile.NetState.Gumps)
if (g is HelpGump)
return;
if (m.NetState.Gumps.OfType<HelpGump>().Any()) return;
if (!PageQueue.CheckAllowedToPage(e.Mobile))
if (!PageQueue.CheckAllowedToPage(m))
return;
if (PageQueue.Contains(e.Mobile))
e.Mobile.SendMenu(new ContainedMenu(e.Mobile));
if (PageQueue.Contains(m))
m.SendMenu(new ContainedMenu(m));
else
e.Mobile.SendGump(new HelpGump(e.Mobile));
m.SendGump(new HelpGump(m));
}
private static bool IsYoung(Mobile m) => m is PlayerMobile mobile && mobile.Young;