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.
58 lines
1.5 KiB
58 lines
1.5 KiB
1 month ago
|
|
||
|
|
||
|
using Sog;
|
||
|
|
||
|
namespace HttpProxyWorld
|
||
|
{
|
||
|
public static class HttpProxyWorldServerUtils
|
||
|
{
|
||
|
public const int PayTaskCount = 10; //支付行为应该不多,考虑到iap苹果服务器超级慢,多搞几个
|
||
|
public const int PushTaskCount = 1;
|
||
|
|
||
|
|
||
|
public static HttpProxyWorldServerData GetHttpProxyServerData()
|
||
|
{
|
||
|
return ServerDataObjMgr.GetDataObj<HttpProxyWorldServerData>(HttpProxyWorldDataObjType.HttpProxyWorldServerData);
|
||
|
}
|
||
|
|
||
|
public static ProtoCSStructPacker GetProtoPacker()
|
||
|
{
|
||
|
return ProtoPackerFactory.Instance.GetProtoCSStructPacker();
|
||
|
}
|
||
|
|
||
|
public static StructPacketSender GetPacketSender()
|
||
|
{
|
||
|
return GetHttpProxyServerData().m_packetSender;
|
||
|
}
|
||
|
|
||
|
public static HttpProxyMsgHandler GetMsgHandler()
|
||
|
{
|
||
|
return ServiceMgr.GetService<HttpProxyMsgHandler>(HttpProxyServiceType.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;
|
||
|
}
|
||
|
|
||
|
|
||
|
/// <summary>
|
||
|
/// 获取服务器配置方法
|
||
|
/// </summary>
|
||
|
public static HttpProxyWorldServerConfig GetServerConfig()
|
||
|
{
|
||
|
return (HttpProxyWorldServerConfig)ServerConfigMgr.Instance.m_serverConfig;
|
||
|
}
|
||
|
}
|
||
|
}
|