From a7e72a169ff9fbd6d9d061f7352a130b8d53f9a6 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期五, 16 五月 2025 15:46:43 +0800 Subject: [PATCH] 16 卡牌服务端(排行榜) --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/GameWorldProcess.py | 26 +++++++++++++++++--------- 1 files changed, 17 insertions(+), 9 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/GameWorldProcess.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/GameWorldProcess.py index fa6d995..d03a9e3 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/GameWorldProcess.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/GameWorldProcess.py @@ -44,7 +44,6 @@ import EventShell import FBLogic import FBCommon -import ShareDefine import EventReport import ItemCommon import PyGameData @@ -52,7 +51,7 @@ import GameMap import NPCRealmRefresh import IpyGameDataPY -import DBDataMgr +import GameWorldEvent #--------------------------------------------------------------------- ## 副本开启 # @param gameWorld IPY_GameWorld @@ -591,11 +590,9 @@ ## 初始化gameWorld # @param tick 当前时间 # @return None -# @remarks 函数详细说明. +# @remarks 函数详细说明 每条分线都会触发该函数 def InitGameWorld(tick): - if not PyGameData.g_initGame: - PyGameData.g_initGame = True - DBDataMgr.OnServerStart() + GameWorldEvent.InitGameWorld(tick) gameWorld = GameWorld.GetGameWorld() ItemCommon.InitPyItem() EventShell.DoReloadRefresh() @@ -606,11 +603,19 @@ #初始化事件报告 EventReport.InitDllAppID() #向GameServer注册普通地图启动成功信息 - GameServer_CommMapServerInitOK(gameWorld) + #GameServer_CommMapServerInitOK(gameWorld) #初始化游戏世界的最后一步 gameWorld.SetInitOK(True) #通知BalanceServer自己初始化好了 gameWorld.BalanceServer_MapServerInitOK() + return + +## 初始化共享表(原c++表) +# @param tick 当前时间 +# @return None +def ReadShareData(tick): + from PyMongoDB import PyMongoMain + PyMongoMain.GetUserCtrlDB().OnGetGameData() return def GameServer_CommMapServerInitOK(gameWorld): @@ -778,12 +783,15 @@ def __OnMapMinute(curTime, tick): ## 地图层级每分钟处理, 每分钟最多只会处理一次, 无视虚拟分线 + if not PyGameData.g_initGameTime: + return + curMinute = curTime.minute if curMinute == PyGameData.g_mapLastProcess_Minute: return - if PyGameData.g_initGame: - DBDataMgr.OnMinute(curTime) PyGameData.g_mapLastProcess_Minute = curMinute + GameWorldEvent.OnMinute(tick) + PlayerTeam.OnCheckTeamPlayerDisconnectTimeout(tick) __CheckIpyDataRecycle(curTime) -- Gitblit v1.8.0