public static void Update() { if (ZhanDuiZhengBa_K.Initialize) { DateTime now = TimeUtil.NowDateTime(); if (now.Day != ZhanDuiZhengBa_K.lastUpdateTime.Day) { ZhanDuiZhengBa_K.FixSyncData(now); } else { lock (ZhanDuiZhengBa_K.Mutex) { ZhanDuiZhengBa_K.StateMachine.Tick(now); } } KFCallMsg[] asyncEvArray = null; lock (ZhanDuiZhengBa_K.Mutex) { asyncEvArray = ZhanDuiZhengBa_K.AsyncEvQ.ToArray(); ZhanDuiZhengBa_K.AsyncEvQ.Clear(); } foreach (KFCallMsg msg in asyncEvArray) { ClientAgentManager.Instance().BroadCastMsg(msg, 0); } ZhanDuiZhengBa_K.lastUpdateTime = now; } }
public static void LoadSyncData(DateTime now, bool reload = false) { int selectRoleIfNewCreate = 64; lock (ZhanDuiZhengBa_K.Mutex) { ZhanDuiZhengBaSyncData syncData = ZhanDuiZhengBa_K.Persistence.LoadZhengBaSyncData(now, selectRoleIfNewCreate); ZhanDuiZhengBa_K.SyncData = syncData; ZhanDuiZhengBa_K.FixSyncData(now); } }
private static void MS_TodayPkEnd_Enter(DateTime now) { ZhanDuiZhengBa_K.FixSyncData(now); }