| | |
| | | import GameWorldArena
|
| | | import AuctionHouse
|
| | | import PlayerXMZZ
|
| | | import PlayerLove
|
| | | import PlayerTeam
|
| | | import PyGameData
|
| | | import CrossBoss
|
| | | import ChPlayer
|
| | | import PyDataManager
|
| | | #---------------------------------------------------------------------
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | |
| | | PlayerBourse.OverTimeItemsDeal()
|
| | | # 仙盟联赛
|
| | | GameWorldFamilyWar.DoOnDay()
|
| | | # 情缘
|
| | | PlayerLove.DoOnDay()
|
| | | return
|
| | |
|
| | | def OnDayEx(tick):
|
| | |
| | | #拍卖行
|
| | | AuctionHouse.OnAuctionItemTimeProcess(curTime, tick)
|
| | |
|
| | | #情缘
|
| | | PlayerLove.OnTimeProcess(curTime, tick)
|
| | | |
| | | #每整分钟处理一次
|
| | | curDateTime = datetime.datetime.today()
|
| | | curMinute = curDateTime.minute
|
| | |
| | | #每5分钟触发一次仙盟总战力更新
|
| | | if curMinute % 5 == 0:
|
| | | PlayerFamily.UpdFamilyTotalFightPower()
|
| | | PlayerFamilyRedPacket.CheckDelRedpacketData()
|
| | | |
| | | return
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | |
| | | GameWorldArena.OnServerStart()
|
| | | #跨服PK
|
| | | CrossRealmPK.OnGameServerInitOK()
|
| | | #红包
|
| | | PlayerFamilyRedPacket.OnServerStart()
|
| | | #世界boss被杀次数重置
|
| | | #GameWorldBoss.CheckResetBossKilledCntOnServerInit()
|
| | |
|
| | |
| | | AuctionHouse.OnGameServerInitOK()
|
| | | # 注意:跨服相关信息的调用需放在最后,不然可能导致服务器未启动功能或者功能未加载成功导致跨服服务器与子服之间的数据同步可能出现异常的情况
|
| | | CrossRealmMsg.OnGameServerInitOK()
|
| | | if PyGameData.g_allMapServerInitOK:
|
| | | GameWorld.Log("InitGameWorld时AllMapServerInitOK已触发则补触发一次!")
|
| | | GameWorld.SendGameError("GameWarning", "InitGameWorld later than AllMapServerInitOK")
|
| | | AllMapServerInitOK(tick)
|
| | | |
| | | return
|
| | |
|
| | | def DoCheckNewServerOpen(tick):
|
| | |
| | | universalRecMgr.Delete(recType)
|
| | | if recordCount:
|
| | | GameWorld.Log("DeleteRecData recType=%s, count=%s" % (recType, recordCount))
|
| | | |
| | | CrossBoss.g_bossRecDataDict = {} # 需要清除,不然会导致跨服boss通用记录缓存对象错误
|
| | | |
| | | #清 家族
|
| | | familyList = []
|
| | | familyMgr = GameWorld.GetFamilyManager()
|
| | |
| | | GameWorldFamilyWar.DoFamilyWarReset()
|
| | |
|
| | | PyGameData.g_sortBOSSRefreshList = [] # boss刷新信息记录缓存重置, 不重置会导致通知前端的boss信息为空
|
| | | |
| | | GameWorldArena.OnServerStart()
|
| | |
|
| | | PlayerDBGSEvent.SetInitOpenServerTime(setOpenServerTime)
|
| | |
|
| | |
| | | # @return None
|
| | | # @remarks 当一个mapServer开启时,
|
| | | def AllMapServerInitOK(tick):
|
| | | PyGameData.g_allMapServerInitOK = True
|
| | | if not GameWorld.GetGameWorld().GetDictByKey(ChConfig.Def_WorldKey_IsGameWorldInit):
|
| | | GameWorld.Log("AllMapServerInitOK时GameServer还未启动好!")
|
| | | return
|
| | | #通知所有地图服务器初始化成功, 同步时间
|
| | | GameWorld.GetGameWorld().Notify_AllMapServerInitOK(GameWorld.GetCurrentDataTimeStr())
|
| | |
|
| | |
| | | PlayerFamily.RandomFakeFamily()
|
| | | #缥缈仙域
|
| | | PlayerFairyDomain.OnMapServerInitOK()
|
| | | #情侣信息
|
| | | PyDataManager.GetDBPyCoupleManager().SendMapServerCoupleInfo()
|
| | | # 记录服务器是否正常开启完毕
|
| | | getUrl = ReadChConfig.GetPyMongoConfig("EventReport", "OpenStateUrl") + "?Type=MapInit&MapCount=%s"%GameWorld.GetGameWorld().GetGameMapManager().GetCount()
|
| | | GameWorld.GetGameWorld().EventReport_EventReport("", "", "", "", 0, getUrl)
|
| | |
| | | if mapServerPack.GetState() not in [0,1,2,3] and curMap.GetState() != mapServerPack.GetState():
|
| | | # 记录服务器是否正常开启完毕, 避免重复发送
|
| | | GameWorld.DebugLog("MapServer_RunningStateRefresh--_%s"%([mapServerPack.GetState(), curMap.GetState(), mapServerPack.GetMapID(), curMap.GetID()]))
|
| | | SendGameError("MapError")
|
| | | GameWorld.SendGameError("MapError")
|
| | |
|
| | | curMap.SetState(mapServerPack.GetState())
|
| | | curMap.SetRefreshTick(tick)
|
| | |
|
| | | return
|
| | |
|
| | |
|
| | | def SendGameError(state):
|
| | | getUrl = ReadChConfig.GetPyMongoConfig("EventReport", "OpenStateUrl")
|
| | | groupID = ReadChConfig.GetPyMongoConfig("platform", "GroupID")
|
| | | userDBName = ReadChConfig.GetPyMongoConfig("connect", "USER_DB_NAME")
|
| | | getUrl = getUrl + "?Type=%s&groupID=%s&userDBName=%s"%(state, groupID, userDBName)
|
| | | GameWorld.GetGameWorld().EventReport_EventReport("", "", "", "", 0, getUrl)
|
| | |
|
| | | ## 刷新地图服务器状态, 如果1分钟没有状态回报, 刷新为消失状态
|
| | | # @param tick 当前时间
|
| | |
| | | curMap.SetState(IPY_GameServer.mssNone)
|
| | | if not isSendMapClose:
|
| | | # 避免多地图发送过多邮件, 如关服的时候
|
| | | SendGameError("MapDisconnect") # 状态报告
|
| | | GameWorld.SendGameError("MapDisconnect") # 状态报告
|
| | | isSendMapClose = True
|
| | |
|
| | | return
|
| | |
| | | ChPlayer.SavePlayerLVData()
|
| | | PlayerFBHelpBattle.OnServerClose()
|
| | | CrossActionControl.OnServerClose()
|
| | | PlayerFamilyRedPacket.OnServerClose()
|
| | | GameWorldArena.OnServerClose()
|
| | | PlayerLove.OnServerClose()
|
| | | GameWorld.Log("通知C++关服!")
|
| | | GameWorld.GetGameWorld().OnServerClose()
|
| | |
|
| | |
| | | def ChangeGameServerState(state):
|
| | | # 只接收大于等于mssPyError
|
| | | GameWorld.DebugLog("ChangeGameServerState:%s"%state)
|
| | | SendGameError("GameServerError")
|
| | | GameWorld.SendGameError("GameServerError")
|
| | |
|
| | | |