From e35ed3606a9dd4da24331cc520faf4b720d83f13 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 25 十二月 2023 13:52:23 +0800
Subject: [PATCH] 10019 【砍树】回合战斗(NPC支持暴击、吸血)

---
 ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py
index e09fe8c..d1fc6ae 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py
@@ -97,6 +97,7 @@
 import PlayerFairyDomain
 import IpyGameDataPY
 import PlayerFamilyParty
+import PlayerFamilyZhenfa
 import GameWorldFamilyWar
 import GameWorldArena
 import CrossLuckyCloudBuy
@@ -110,6 +111,7 @@
 import PyDataManager
 import GameWorldOpenServerCampaign
 import CrossBillboard
+import CrossChampionship
 #---------------------------------------------------------------------
 
 #---------------------------------------------------------------------
@@ -357,6 +359,7 @@
 
 def GameWorldProcessOnMinute(curMinute, tick):
     # 每整分钟触发一次
+    CheckServerHasPlayerLoginAfterInitOK()
     #检查服务器正式开服
     DoCheckNewServerOpen(tick)
     #回报数据库当前在线玩家数
@@ -368,6 +371,8 @@
     GameWorldActionControl.Dispose_FBStateTime()
     #跨服PK
     CrossRealmPK.OnMinuteProcess()
+    #跨服排位
+    CrossChampionship.OnMinuteProcess(curMinute)
     CrossBattlefield.OnMinuteProcess()
     #处理重开服务器后, 活动继续开启逻辑根据天数
     #GameWorldActionControl.Dispose_Action_GoOn_ByDay(tick)
@@ -384,6 +389,24 @@
         PlayerFamily.UpdFamilyTotalFightPower()
         PlayerFamilyRedPacket.CheckDelRedpacketData()
         
+    return
+
+def CheckServerHasPlayerLoginAfterInitOK():
+    ## 检查服务器启动成功后是否有玩家正常登录
+    initGameWorldTime = GameWorld.GetGameWorld().GetDictByKey(ChConfig.Def_WorldKey_IsGameWorldInit)
+    if not initGameWorldTime:
+        return
+    
+    if PyGameData.g_noPlayerLoginWarningMailState:
+        return
+    
+    curTime = int(time.time())
+    noPlayerLoginWarningTimes = IpyGameDataPY.GetFuncCfg("ServerEvent", 1) * 60 # x分钟没有玩家登录则预警
+    if curTime - initGameWorldTime < noPlayerLoginWarningTimes:
+        return
+    
+    GameWorld.SendGameError("NoPlayerLogin")
+    PyGameData.g_noPlayerLoginWarningMailState = 1
     return
 
 def OnReloadConfig():
@@ -1267,6 +1290,8 @@
     GameWorldArena.OnServerStart()
     #跨服PK
     CrossRealmPK.OnGameServerInitOK()
+    #跨服排位
+    CrossChampionship.OnServerStart()
     #跨服战场
     CrossBattlefield.OnServerStart()
     #红包
@@ -1478,6 +1503,8 @@
     SendMapCommMapLinePlayerCount(True) # 同步一次普通地图线路人数信息
     #随机假仙盟
     PlayerFamily.RandomFakeFamily()
+    #仙盟阵法
+    PlayerFamilyZhenfa.OnMapServerInitOK()
     #缥缈仙域
     PlayerFairyDomain.OnMapServerInitOK()
     #情侣信息
@@ -1981,6 +2008,7 @@
     ChPlayer.SavePlayerLVData()
     PlayerFBHelpBattle.OnServerClose()
     CrossActionControl.OnServerClose()
+    CrossChampionship.OnServerClose()
     CrossBattlefield.OnServerClose()
     PlayerFamilyRedPacket.OnServerClose()
     CrossLuckyCloudBuy.OnServerClose()

--
Gitblit v1.8.0