using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Sog; namespace BillLog { public static class BillLogServerUtils { public static BillLogServerData GetBillLogServerData() { return ServerDataObjMgr.GetDataObj(BillLogDataObjType.BillLogServerData); } public static ProtoCSStructPacker GetProtoPacker() { return ProtoPackerFactory.Instance.GetProtoCSStructPacker(); } public static PacketSender GetPacketSender() { return GetBillLogServerData().m_packetSender; } public static BillLogMsgHandler GetMsgHandler() { return ServiceMgr.GetService(BillLogServiceType.BillLogMsgHandler); } public static long GetTimeSecond() { return GetBillLogServerData().m_app.Time.GetTimeSecond(); } public static DateTime GetDateTime() { return GetBillLogServerData().m_app.Time.GetDateTime(); } public static ServerApp GetApp() { return GetBillLogServerData().m_app; } public static uint GetAppID() { return GetBillLogServerData().m_app.ServerID; } public static BillLogServerConfig GetServerConfig() { return (BillLogServerConfig)ServerConfigMgr.Instance.m_serverConfig; } } }