private static void OnLoad() { Persistence.Deserialize( _FilePath, reader => { var version = reader.ReadInt(); var count = reader.ReadInt(); switch (version) { case 0: { for (var i = 0; i < count; ++i) { var sender = reader.ReadMobile(); var message = reader.ReadString(); var type = (PageType)reader.ReadInt(); PageEntry pe = new PageEntry(sender, message, type) { Handler = reader.ReadMobile(), Sent = reader.ReadDateTime(), PageLocation = reader.ReadPoint3D(), PageMap = reader.ReadMap() }; pe.Stop(); PageQueue.Enqueue(pe); } } break; } }); }
public static void Remove(PageEntry e) { if (e == null) { return; } e.Stop(); m_List.Remove(e); m_KeyedBySender.Remove(e.Sender); if (e.Handler != null) { m_KeyedByHandler.Remove(e.Handler); } if (m_List.Count == 0) { foreach (NetState ns in GameServer.Instance.Clients) { Mobile m = ns.Mobile; if (m != null && m.AccessLevel >= AccessLevel.Counselor) { m.CloseGump <PagePendingGump>(); } } } }
public static void Remove(PageEntry e) { if (e == null) { return; } e.Stop(); m_List.Remove(e); m_KeyedBySender.Remove(e.Sender); if (e.Handler != null) { m_KeyedByHandler.Remove(e.Handler); } }
private static void OnLoad() { Persistence.Deserialize( _FilePath, reader => { int version = reader.ReadInt(); switch (version) { case 1: { int c = reader.ReadInt(); for (int i = 0; i < c; ++i) { new ResponseEntry(reader); } } goto case 0; case 0: { int count = reader.ReadInt(); for (int i = 0; i < count; ++i) { Mobile sender = reader.ReadMobile(); string message = reader.ReadString(); PageType type = (PageType)reader.ReadInt(); PageEntry pe = new PageEntry(sender, message, type) { Handler = reader.ReadMobile(), Sent = reader.ReadDateTime(), PageLocation = reader.ReadPoint3D(), PageMap = reader.ReadMap() }; pe.Stop(); PageQueue.Enqueue(pe); } } break; } }); }
public static void Remove(PageEntry e) { if (e == null) { return; } Server.Admin.AdminNetwork.Distribute(new Server.Admin.RemovePage(e)); e.Stop(); m_List.Remove(e); m_KeyedBySender.Remove(e.Sender); if (e.Handler != null) { m_KeyedByHandler.Remove(e.Handler); } }
public static void Remove( PageEntry e ) { if ( e == null ) return; e.Stop(); m_List.Remove( e ); m_KeyedBySender.Remove( e.Sender ); if ( e.Handler != null ) m_KeyedByHandler.Remove( e.Handler ); }
public static void Remove( PageEntry e ) { if ( e == null ) return; e.Stop(); m_List.Remove( e ); m_KeyedBySender.Remove( e.Sender ); if ( e.Handler != null ) m_KeyedByHandler.Remove( e.Handler ); if ( m_List.Count == 0 ) { foreach ( GameClient ns in GameServer.Instance.Clients ) { Mobile m = ns.Mobile; if ( m != null && m.AccessLevel >= AccessLevel.Counselor ) m.CloseGump( typeof( PagePendingGump ) ); } } }