You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.8 KiB

1 month ago
using Sog;
namespace HttpProxyPay
{
public static class HttpProxyPayServerUtils
{
public static uint HttpWorkThreadCount = 10;
public static HttpProxyPayServerData GetHttpProxyServerData()
{
return ServerDataObjMgr.GetDataObj<HttpProxyPayServerData>(HttpProxyPayDataObjType.HttpProxyPayServerData);
}
public static ProtoCSStructPacker GetProtoPacker()
{
return ProtoPackerFactory.Instance.GetProtoCSStructPacker();
}
public static StructPacketSender GetPacketSender()
{
return GetHttpProxyServerData().m_packetSender;
}
public static HttpProxyPayMsgHandler GetMsgHandler()
{
return ServiceMgr.GetService<HttpProxyPayMsgHandler>(HttpProxyPayServiceType.HttpProxyMsgHandler);
}
public static long GetTimeSecond()
{
return GetHttpProxyServerData().m_app.Time.GetTimeSecond();
}
public static ServerApp GetApp()
{
return GetHttpProxyServerData().m_app;
}
public static uint GetAppID()
{
return GetHttpProxyServerData().m_app.ServerID;
}
public static PlayerTable GetPlayerTable()
{
return ServerDataObjMgr.GetDataObj<PlayerTable>(HttpProxyPayDataObjType.PlayerTable);
}
//server service
public static PlayerTableOp GetPlayerTableOp()
{
return ServiceMgr.GetService<PlayerTableOp>(HttpProxyPayServiceType.PlayerTableOp);
}
/// <summary>
/// 获取服务器配置方法
/// </summary>
public static HttpProxyPayServerConfig GetServerConfig()
{
return (HttpProxyPayServerConfig)ServerConfigMgr.Instance.m_serverConfig;
}
}
}