From f9bd7ebdd8ac7016e8cc2e0ffcb20df22d75c2a0 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 27 二月 2023 15:57:07 +0800
Subject: [PATCH] 9415 【BT7】【BT8】【BT9】【主干】【后端】古神战场(跨服服务器及本服服务器时间均超过5点后可购买)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCrossBattlefield.py |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCrossBattlefield.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCrossBattlefield.py
index 5de75dc..ac3be22 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCrossBattlefield.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCrossBattlefield.py
@@ -103,6 +103,14 @@
                       % (hour, minute, crossServerDateTime, endBuyDateTime), playerID)
         return
     
+    canBuyStartHour = 5
+    curServerTime = GameWorld.GetCurrentTime()
+    if crossServerDateTime.hour < canBuyStartHour or curServerTime.hour < canBuyStartHour:
+        PlayerControl.NotifyCode(curPlayer, "CrossBattlefieldBuyLimit")
+        GameWorld.Log("跨服服务器及本服服务器需超过%s点后可购买! crossServerHour=%s,curServerHour=%s" 
+                      % (canBuyStartHour, crossServerDateTime.hour, curServerTime.hour), playerID)
+        return
+    
     moneyBuyMaxCount, moneyType, moneyCount = 0, 0, 0
     todayBuyOpenCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Battlefield_BuyOpenCountToday)
     buyOpenMoneyInfo = IpyGameDataPY.GetFuncEvalCfg("CrossBattlefieldBuyOpen", 1)

--
Gitblit v1.8.0