using Sog; namespace Account { public static class AccountServerUtils { public static AccountServerData GetAccountServerData() { return ServerDataObjMgr.GetDataObj(AccountDataObjType.AccountServerData); } public static ProtoCSStructPacker GetProtoPacker() { return ProtoPackerFactory.Instance.GetProtoCSStructPacker(); } public static StructPacketSender GetPacketSender() { return GetAccountServerData().m_packetSender; } //client public static PlayerTable GetPlayerTable() { return ServerDataObjMgr.GetDataObj(AccountDataObjType.PlayerTable); } public static PlayerTableOp GetPlayerTableOp() { return ServiceMgr.GetService(AccountServiceType.PlayerTableOp); } public static SnsFriendAccountInfoCache GetSnsFriendCache() { return ServerDataObjMgr.GetDataObj(AccountDataObjType.SnsFriendInfoCache); } public static AccountTable GetAccountTable() { return ServerDataObjMgr.GetDataObj(AccountDataObjType.AccountTable); } public static AccountTableOp GetAccountTableOp() { return ServiceMgr.GetService(AccountServiceType.AccountTableOp); } public static AccountMsgHandler GetAccountMsgHandler() { return ServiceMgr.GetService(AccountServiceType.AccountMsgHandler); } public static long GetTimeSecond() { return GetAccountServerData().m_app.Time.GetTimeSecond(); } public static uint GetAppID() { return GetAccountServerData().m_app.ServerID; } public static ServerApp GetApp() { return GetAccountServerData().m_app; } public static SnsFriendCacheOp GetSnsFriendCacheOp() { return ServiceMgr.GetService(AccountServiceType.SnsFriendCacheOp); } /// /// 获取服务器配置方法 /// public static AccountServerConfig GetServerConfig() { return (AccountServerConfig)ServerConfigMgr.Instance.m_serverConfig; } } }