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.
 
 
 
 
 
 

61 lines
1.3 KiB

using Sog;
namespace Game
{
public static class GameServerTickSvc
{
private static long m_oneSecondMs;
private static long nowSec;
public static long m_100MsAddTreasure;
public static void Tick100MsAddTreasure(long nowMs)
{
if (nowMs - m_100MsAddTreasure < 100)
{
return;
}
m_100MsAddTreasure = nowMs;
}
public static void TickServerData(long nowMs)
{
if (nowMs - m_oneSecondMs < 1000)
{
return;
}
long lastTickSec = nowSec;
nowSec = nowMs / 1000;
m_oneSecondMs = nowMs;
TickSec(nowMs);
if (AppTime.IsSameDay(nowSec, lastTickSec) == false)
{
TickDaily(nowMs);
if (AppTime.IsSameWeek127(nowMs, lastTickSec) == false)
{
TickWeekly(nowMs);
}
}
}
private static void TickSec(long nowMs)
{
BattleVersionSvc.OnTickSecond(nowSec);
}
private static void TickDaily(long nowMs)
{
}
private static void TickWeekly(long nowMs)
{
}
}
}