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

1 month ago
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<BillLogServerData>(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<BillLogMsgHandler>(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;
}
}
}