From 3b2a6bb9047cfce9f501593b3669a9c1af6c5df4 Mon Sep 17 00:00:00 2001
From: lcy <1459594991@qq.com>
Date: 星期三, 05 十一月 2025 17:40:23 +0800
Subject: [PATCH] 130 战斗修改回合样式
---
Main/Utility/TimeUtility.cs | 34 +++++++++++++++++++++++++++-------
1 files changed, 27 insertions(+), 7 deletions(-)
diff --git a/Main/Utility/TimeUtility.cs b/Main/Utility/TimeUtility.cs
index d1aa684..6aad2aa 100644
--- a/Main/Utility/TimeUtility.cs
+++ b/Main/Utility/TimeUtility.cs
@@ -194,7 +194,7 @@
}
public static event Action OnServerOpenDayRefresh;
- public static void OnRefreshServerOpenDay(HA005_tagOpenServerDay package)
+ public static void OnRefreshServerOpenDay(HA103_tagMCOpenServerDay package)
{
{
OpenDay = package.Day;
@@ -251,6 +251,7 @@
int seconds = _seconds % 60;
return StringUtility.Contact(hours.ToString("D2"), ":", mins.ToString("D2"), ":", seconds.ToString("D2"));
}
+
//璇︾粏鏄剧ず
//xx灏忔椂xx鍒哫X绉�
@@ -369,8 +370,8 @@
}
//鏋佺畝鏄剧ず
- // x澶﹛灏忔椂
- // x灏忔椂x鍒�
+ // x澶� 鎴栬�� x澶﹛灏忔椂
+ // x灏忔椂 鎴栬�� x灏忔椂x鍒�
// x鍒�
// x绉�
public static string SecondsToShortDHMS(int _seconds)
@@ -381,10 +382,18 @@
int seconds = _seconds % 60;
if (days > 0)
{
+ if (hours == 0)
+ {
+ return StringUtility.Contact(days, Language.Get("L1074"));
+ }
return StringUtility.Contact(days, Language.Get("L1074"), hours, Language.Get("L1072"));
}
else if (hours > 0)
{
+ if (mins == 0)
+ {
+ return StringUtility.Contact(hours, Language.Get("L1072"));
+ }
return StringUtility.Contact(hours, Language.Get("L1072"), mins, Language.Get("L1073"));
}
else if (mins > 0)
@@ -416,7 +425,7 @@
//渚嬪瓙
//x澶�
//x鏃�
- //x鍒唜绉�
+ //x鍒�
//x绉�
public static string SecondsToConsumeRebate(int _seconds)
{
@@ -430,15 +439,15 @@
}
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"));
}
}
@@ -487,6 +496,17 @@
}
+ // 鍒�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)
{
--
Gitblit v1.8.0