| | |
| | | } |
| | | |
| | | public static event Action OnServerOpenDayRefresh; |
| | | public static void OnRefreshServerOpenDay(HA005_tagOpenServerDay package) |
| | | public static void OnRefreshServerOpenDay(HA103_tagMCOpenServerDay package) |
| | | { |
| | | { |
| | | OpenDay = package.Day; |
| | |
| | | int seconds = _seconds % 60; |
| | | return StringUtility.Contact(hours.ToString("D2"), ":", mins.ToString("D2"), ":", seconds.ToString("D2")); |
| | | } |
| | | |
| | | |
| | | //详细显示 |
| | | //xx小时xx分XX秒 |
| | |
| | | //例子 |
| | | //x天 |
| | | //x时 |
| | | //x分x秒 |
| | | //x分 |
| | | //x秒 |
| | | public static string SecondsToConsumeRebate(int _seconds) |
| | | { |
| | |
| | | } |
| | | else if (hours >= 1) |
| | | { |
| | | return StringUtility.Contact(Mathf.CeilToInt(hours), Language.Get("Hour")); |
| | | return StringUtility.Contact(Mathf.CeilToInt(hours), Language.Get("L1072")); |
| | | } |
| | | else if (mins >= 1) |
| | | { |
| | | return StringUtility.Contact(mins, Language.Get("Minute"), seconds, Language.Get("RealmWin_Bewrite_35")); |
| | | return StringUtility.Contact(mins, Language.Get("L1073")); |
| | | } |
| | | else |
| | | { |
| | | return StringUtility.Contact(seconds, Language.Get("RealmWin_Bewrite_35")); |
| | | return StringUtility.Contact(seconds, Language.Get("L1075")); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | } |
| | | |
| | | // 到10点还要多少秒,如果已经过了10点,返回0 |
| | | public static int GetToTenClockSeconds() |
| | | { |
| | | var now = ServerNow; |
| | | if (now.Hour < 10) |
| | | { |
| | | return (int)(ServerNow - new DateTime(now.Year, now.Month, now.Day, 10, 0, 0)).TotalSeconds; |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | //开服天结束倒计时;单位秒 |
| | | public static int GetRemindTimeByOpenDay(int days) |
| | | { |