Example #1
0
        private static LoginTime Get_loginTimeData(this ModelManager mmng)
        {
            LoginTime loginTime = null;

            if (mmng != null && mmng.ValidData(EModelType.Model_loginTime))
            {
                loginTime = mmng.GetData <LoginTime>(EModelType.Model_loginTime);
            }
            if (loginTime == null)
            {
                loginTime = new LoginTime();
            }
            return(loginTime);
        }
Example #2
0
        public static void Set_Time_ClearBattleTimeRecord(this ModelManager mmng)
        {
            LoginTime loginTime = mmng.Get_loginTimeData();

            loginTime.TimeInLastBattle = TimeSpan.Zero;
        }
Example #3
0
        public static void Set_Time_ExitBattle(this ModelManager mmng)
        {
            LoginTime loginTime = mmng.Get_loginTimeData();

            loginTime.TimeInLastBattle = ToolsFacade.ServerCurrentTime - loginTime.TimeEnterBattle;
        }
Example #4
0
        public static TimeSpan Get_LastBattleTime(this ModelManager mmng)
        {
            LoginTime loginTime = mmng.Get_loginTimeData();

            return(loginTime.TimeInLastBattle);
        }
Example #5
0
        public static DateTime Get_ServerTimeCorrected(this ModelManager mmng)
        {
            LoginTime loginTime = mmng.Get_loginTimeData();

            return(loginTime.ServerTimeCorrected + (DateTime.Now - loginTime.LocalTimeCorrected));
        }
Example #6
0
        public static bool Get_ServerTime_IsCorrected(this ModelManager mmng)
        {
            LoginTime loginTime = mmng.Get_loginTimeData();

            return(loginTime.IsCorrected);
        }
Example #7
0
        public static DateTime Get_loginTime_DataTime(this ModelManager mmng)
        {
            LoginTime loginTime = mmng.Get_loginTimeData();

            return(loginTime.loginTime_Server);
        }
Example #8
0
        public static TimeSpan Get_loginTime_diff_X(this ModelManager mmng)
        {
            LoginTime loginTime = mmng.Get_loginTimeData();

            return(DateTime.Now - loginTime.loginTime_Local);
        }