From 52e17999f97477f222094a0b6e7e32129e97c404 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 17 一月 2024 17:09:07 +0800
Subject: [PATCH] 10019 【砍树】回合战斗(根据地图处理默认视野)
---
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py | 60 ++++++++++++++++++++++++++++++++++++++++++++++--------------
1 files changed, 46 insertions(+), 14 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py
index f219753..4e3f6e9 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py
@@ -81,7 +81,6 @@
import ShareDefine
import GameWorldAverageLv
import PlayerDBOper
-import PlayerGeTui
import GameWorldBoss
import PlayerCompensation
import ReadChConfig
@@ -97,6 +96,7 @@
import PlayerFairyDomain
import IpyGameDataPY
import PlayerFamilyParty
+import PlayerFamilyZhenfa
import GameWorldFamilyWar
import GameWorldArena
import CrossLuckyCloudBuy
@@ -110,6 +110,7 @@
import PyDataManager
import GameWorldOpenServerCampaign
import CrossBillboard
+import CrossChampionship
#---------------------------------------------------------------------
#---------------------------------------------------------------------
@@ -174,7 +175,6 @@
GameWorldOpenServerCampaign.DoOnDay()
#清理过期补偿
PlayerCompensation.ClearUpTimeOutCompensation()
- #PlayerGeTui.ClearFMTGeTuiLimit()
import PlayerBourse
PlayerBourse.OverTimeItemsDeal()
# 仙盟联赛
@@ -310,8 +310,7 @@
CrossRealmPK.OnPKMatchProcess(tick)
GameWorldBoss.DoCheckWorldBossReborn(tick)
- #GameWorldBoss.ProcessBossGeTui(tick)
- #PlayerGeTui.ProcessNewGuyCallBackGeTui(tick)
+
#组队副本版本
PlayerTeam.DoTeamProcess(tick)
@@ -357,9 +356,11 @@
def GameWorldProcessOnMinute(curMinute, tick):
# 每整分钟触发一次
+ CheckServerHasPlayerLoginAfterInitOK()
#检查服务器正式开服
DoCheckNewServerOpen(tick)
-
+ #回报数据库当前在线玩家数
+ DisposeGameActivePlayer(tick)
#处理游戏世界中的时间事件
DisposeGameWorldEvenByTime(tick)
GameWorldActionControl.Dispose_OperationActionState()
@@ -367,6 +368,8 @@
GameWorldActionControl.Dispose_FBStateTime()
#跨服PK
CrossRealmPK.OnMinuteProcess()
+ #跨服排位
+ CrossChampionship.OnMinuteProcess(curMinute)
CrossBattlefield.OnMinuteProcess()
#处理重开服务器后, 活动继续开启逻辑根据天数
#GameWorldActionControl.Dispose_Action_GoOn_ByDay(tick)
@@ -383,6 +386,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():
@@ -411,7 +432,7 @@
#处理世界活动
DisposeGameWorldGame(tick)
#回报数据库当前在线玩家数
- DisposeGameActivePlayer(tick)
+ #DisposeGameActivePlayer(tick)
#同步地图服务器时间
Dispose_MapServer_Time(tick)
#保存玩家数据
@@ -611,15 +632,18 @@
#activePlayerCount = GameWorld.GetPlayerManager().GetActivePlayerCount()
#DataRecordPack.DR_OnLinePlayerCount(activePlayerCount, platformOLDict, tjgOnlineCnt)
#===========================================================================
- for platform, playerCnt in platformOLDict.items():
- DataRecordPack.DR_OnLinePlayerCount(playerCnt, platform, tjgOnlineCnt) # 单平台
- EventReport.WriteEvent_concurrency(playerCnt, 0, platform) # 单平台 此处不能传脱机挂玩家总数
-
-
+ isMixture = False #是否混服
+ if isMixture:
+ for platform, playerCnt in platformOLDict.items():
+ DataRecordPack.DR_OnLinePlayerCount(playerCnt, platform, tjgOnlineCnt) # 单平台
+ EventReport.WriteEvent_concurrency(playerCnt, 0, platform) # 单平台 此处不能传脱机挂玩家总数
+ DataRecordPack.DR_OnLinePlayerCount(activePlayerCount, {}, tjgOnlineCnt) # 总在线
+ #EventReport.WriteEvent_concurrency(activePlayerCount, tjgOnlineCnt)
+ else:
+ serverPlatform = GameWorld.GetPlatform()
+ DataRecordPack.DR_OnLinePlayerCount(activePlayerCount, {}, tjgOnlineCnt) # 总在线
+ EventReport.WriteEvent_concurrency(activePlayerCount, tjgOnlineCnt, serverPlatform)
#===========================================================================
-
- DataRecordPack.DR_OnLinePlayerCount(activePlayerCount, {}, tjgOnlineCnt) # 总在线
- #EventReport.WriteEvent_concurrency(activePlayerCount, tjgOnlineCnt)
#刷新当前地图服务器
#===========================================================================
# custom_concurrencyMapList = ReadChConfig.GetEvalChConfig("EventReportMapID")
@@ -1263,6 +1287,8 @@
GameWorldArena.OnServerStart()
#跨服PK
CrossRealmPK.OnGameServerInitOK()
+ #跨服排位
+ CrossChampionship.OnServerStart()
#跨服战场
CrossBattlefield.OnServerStart()
#红包
@@ -1375,6 +1401,9 @@
ReadChConfig.ReloadConfig()
AllMapServerInitOK(tick)
+
+ GameWorld.GetGameWorld().SaveGameServerData()
+ GameWorld.SendGameError("ClearOpenServerOK")
return
## 服务器开服时是星期几
@@ -1471,6 +1500,8 @@
SendMapCommMapLinePlayerCount(True) # 同步一次普通地图线路人数信息
#随机假仙盟
PlayerFamily.RandomFakeFamily()
+ #仙盟阵法
+ PlayerFamilyZhenfa.OnMapServerInitOK()
#缥缈仙域
PlayerFairyDomain.OnMapServerInitOK()
#情侣信息
@@ -1974,6 +2005,7 @@
ChPlayer.SavePlayerLVData()
PlayerFBHelpBattle.OnServerClose()
CrossActionControl.OnServerClose()
+ CrossChampionship.OnServerClose()
CrossBattlefield.OnServerClose()
PlayerFamilyRedPacket.OnServerClose()
CrossLuckyCloudBuy.OnServerClose()
--
Gitblit v1.8.0