| | |
| | | #import ReloadModule
|
| | | import CrossRealmPK
|
| | | import CrossRealmMsg
|
| | | import CrossFamilyGCZ
|
| | | import CrossRealmPlayer
|
| | | import CrossBattlefield
|
| | | import CrossActionControl
|
| | |
| | | import CrossBillboard
|
| | | import CrossChampionship
|
| | | import GameWorldMineArea
|
| | | import PlayerFuncTeam
|
| | | import GameWorship
|
| | | import os
|
| | | #---------------------------------------------------------------------
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | |
| | | GameWorldOpenServerCampaign.DoOnDay()
|
| | | #清理过期补偿
|
| | | PlayerCompensation.ClearUpTimeOutCompensation()
|
| | | PlayerControl.DoOnDay()
|
| | | #PlayerGeTui.ClearFMTGeTuiLimit()
|
| | | import PlayerBourse
|
| | | PlayerBourse.OverTimeItemsDeal()
|
| | |
| | | PlayerFamily.OnLeaderImpeachTick(tick)
|
| | | #跨服玩家
|
| | | CrossRealmPlayer.OnCrossProcess(tick)
|
| | | #跨服PK匹配
|
| | | CrossRealmPK.OnPKMatchProcess(tick)
|
| | |
|
| | | GameWorldBoss.DoCheckWorldBossReborn(tick)
|
| | | #GameWorldBoss.ProcessBossGeTui(tick)
|
| | |
| | | DisposeGameActivePlayer(tick)
|
| | | #处理游戏世界中的时间事件
|
| | | DisposeGameWorldEvenByTime(tick)
|
| | | #榜单
|
| | | CrossBillboard.OnMinuteProcess()
|
| | | GameWorldActionControl.Dispose_OperationActionState()
|
| | | GameWorldActionControl.Dispose_DailyActionState()
|
| | | GameWorldActionControl.Dispose_FBStateTime()
|
| | |
| | | #跨服排位
|
| | | CrossChampionship.OnMinuteProcess(curMinute)
|
| | | CrossBattlefield.OnMinuteProcess()
|
| | | #仙盟攻城战
|
| | | CrossFamilyGCZ.OnMinuteProcess(curMinute)
|
| | | #处理重开服务器后, 活动继续开启逻辑根据天数
|
| | | #GameWorldActionControl.Dispose_Action_GoOn_ByDay(tick)
|
| | | #触发世界等级
|
| | |
| | | AuctionHouse.OnAuctionItemMinuteProcess(tick)
|
| | | #福地
|
| | | GameWorldMineArea.OnProcessOnMinute()
|
| | | #每5分钟触发一次仙盟总战力更新
|
| | | if curMinute % 5 == 0:
|
| | | PlayerFamily.UpdFamilyTotalFightPower()
|
| | | PlayerFamilyRedPacket.CheckDelRedpacketData()
|
| | | |
| | | #仙盟
|
| | | PlayerFamily.OnMinuteProcess(curMinute) |
| | | return
|
| | |
|
| | | def CheckServerHasPlayerLoginAfterInitOK():
|
| | |
| | | return
|
| | |
|
| | | def OnReloadConfig():
|
| | | |
| | | if GameWorld.IsCrossServer():
|
| | | # 跨服重读时重推跨服相关数据
|
| | | tick = GameWorld.GetGameWorld().GetTick()
|
| | | CrossRealmMsg.Sync_CrossServerInitDataToClientServer(tick, serverGroupID=0) # 这里设置为0,广播所有子服务器组
|
| | | return
|
| | | |
| | | return
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | |
| | | GameWorld.GetFamilyManager().SetFamilyUpperLimitCount(ChConfig.Def_Family_MaxCnt)
|
| | | #排序元宝交易平台
|
| | | GameWorld.GetGameWorld().GetDBGoldOrderFormMgr().Sort()
|
| | | PlayerBillboard.FixBillboardBigCmpValue()
|
| | | #排序排行榜
|
| | | PlayerBillboard.SortServerBillboard()
|
| | | #功能队伍
|
| | | PlayerFuncTeam.OnGameServerInitOK()
|
| | | #仙盟
|
| | | PlayerFamily.OnGameServerInitOK()
|
| | | GameWorldActionControl.Dispose_FBStateTime()
|
| | |
| | | CrossChampionship.OnServerStart()
|
| | | #跨服战场
|
| | | CrossBattlefield.OnServerStart()
|
| | | GameWorship.OnServerStart()
|
| | | #红包
|
| | | PlayerFamilyRedPacket.OnServerStart()
|
| | | #云购
|
| | |
| | | if not GameWorld.GetGameWorld().GetDictByKey(ChConfig.Def_WorldKey_IsGameWorldInit):
|
| | | GameWorld.Log("AllMapServerInitOK时GameServer还未启动好!")
|
| | | return
|
| | | __CheckAllMapInitOK()
|
| | | #通知所有地图服务器初始化成功, 同步时间
|
| | | GameWorld.GetGameWorld().Notify_AllMapServerInitOK(GameWorld.GetCurrentDataTimeStr())
|
| | |
|
| | |
| | | lastMixServerWorldLV = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_LastMixServerWorldLV)
|
| | | GameWorld.SendMapServerMsgEx(ShareDefine.Def_Notify_WorldKey_LastMixServerWorldLV, lastMixServerWorldLV)
|
| | |
|
| | | # 功能队伍
|
| | | PlayerFuncTeam.OnMapServerInitOK()
|
| | | |
| | | # 通知战盟相关活动开启状态
|
| | | fadState = PlayerDBGSEvent.GetDBGSTrig_ByKey(ShareDefine.Def_Notify_WorldKey_FamilyActivityDayState)
|
| | | GameWorld.SendMapServerMsgEx(ShareDefine.Def_Notify_WorldKey_FamilyActivityDayState, fadState)
|
| | |
| | |
|
| | | # 跨服PK
|
| | | CrossRealmPK.OnMapServerInitOK()
|
| | | # 跨服排位赛
|
| | | CrossChampionship.OnMapServerInitOK()
|
| | | #跨服战场
|
| | | CrossBattlefield.OnMapServerInitOK()
|
| | | # 本服竞技场
|
| | |
| | | GameWorld.GetGameWorld().EventReport_EventReport("", "", "", "", 0, getUrl)
|
| | | return
|
| | |
|
| | | def __CheckAllMapInitOK():
|
| | | ## 检查所有地图是否启动成功
|
| | | rootPath = ChConfig.GetServerRootPath()
|
| | | mapIDTxtPath = os.path.join(rootPath, "ZoneServerGroup\map1_8G\MapServer\MapServerData\Map\MapID.txt")
|
| | | if not os.path.isfile(mapIDTxtPath):
|
| | | GameWorld.ErrLog("MapID.txt不存在: %s" % mapIDTxtPath)
|
| | | return
|
| | | fileObj = open(mapIDTxtPath, 'rb')
|
| | | content = fileObj.read()
|
| | | fileObj.close()
|
| | | |
| | | mapInfoDict = {}
|
| | | mapInfoList = content.split('\r\n')
|
| | | for info in mapInfoList:
|
| | | mapInfo = info.split('\t')
|
| | | if len(mapInfo) < 3:
|
| | | continue
|
| | | mapInfoDict[GameWorld.ToIntDef(mapInfo[1])] = mapInfo[2]
|
| | | |
| | | gameMapManager = GameWorld.GetGameWorld().GetGameMapManager()
|
| | | for i in range(0, gameMapManager.GetCount()):
|
| | | curMap = gameMapManager.GetAt(i)
|
| | | mapID = curMap.GetID()
|
| | | state = curMap.GetState()
|
| | | if mapID in mapInfoDict and state == IPY_GameServer.mssRunning:
|
| | | mapInfoDict.pop(mapID)
|
| | | |
| | | if not mapInfoDict:
|
| | | #GameWorld.Log("都启动成功了")
|
| | | return
|
| | | # 汇报没有启动启动成功的地图ID信息
|
| | | errorMapIDList = mapInfoDict.keys()
|
| | | GameWorld.SendGameError("AllMapInitError", "未启动成功地图:%s" % (str(errorMapIDList)))
|
| | | return
|
| | |
|
| | | ## 服务器合服首次启动数据加载处理
|
| | | # @param None
|
| | | # @return None
|