| | |
| | | state = gameWorld.GetDictByKey(ChConfig.Def_WorldKey_OperationActionState % ShareDefine.OperationActionName_BossReborn)
|
| | | if state:
|
| | | Sync_BossRebornPoint(curPlayer)
|
| | | Sync_DogzNPCRefreshTime(curPlayer)
|
| | | return
|
| | |
|
| | | ## 地图启动ok通知
|
| | |
| | | return
|
| | | onlineCnt = __GetBossOnlineHeroCnt(bossid)[0]
|
| | | LVLimit = ipyData.GetLVLimit()
|
| | | if PyGameData.g_yesterdayPlayerLVDict: |
| | | openServerDay = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_ServerDay)
|
| | | if openServerDay != 0 and LVLimit and len(LVLimit) == 2:
|
| | | yesterdayCnt = len([1 for lv in PyGameData.g_yesterdayPlayerLVDict.values() if LVLimit[0]<=lv <= LVLimit[1]]) #参数昨日活跃人数
|
| | | else:
|
| | | yesterdayCnt = IpyGameDataPY.GetFuncCfg('FirstDayActivePlayerCnt')
|
| | |
| | | refreshTime = 0
|
| | | PyGameData.g_sortBOSSRefreshList[i] = [bossID, killedTime, refreshTime]
|
| | | bossIDList.append(bossID)
|
| | | curTime = int(time.time())
|
| | | PyGameData.g_sortBOSSRefreshList.sort(key=lambda asd:max(0, asd[2] - (curTime - asd[1])))
|
| | | GameWorld.Log(' boss复活活动 重生boss bossIDList=%s'%bossIDList)
|
| | | g_lastBossRebornTime = int(time.time())
|
| | | g_lastBossRebornTime = curTime
|
| | | else:
|
| | | #广播
|
| | | needNotifyPointPerList = IpyGameDataPY.GetFuncEvalCfg('BossRebornNotify')
|
| | |
| | | NetPackCommon.SendFakePack(curPlayer, packData)
|
| | | return
|
| | |
|
| | | def Sync_DogzNPCRefreshTime(msgList):
|
| | | def Sync_DogzNPCRefreshTime(curPlayer=None):
|
| | | #同步神兽副本NPC刷新时间
|
| | | playerID, refreshTimeDict = msgList
|
| | | curPlayer = GameWorld.GetPlayerManager().FindPlayerByID(playerID) if playerID else None
|
| | | if playerID and not curPlayer:
|
| | | return
|
| | | refreshTimeDict = PyGameData.g_dogzNPCRefreshTimeDict
|
| | |
|
| | | if not refreshTimeDict:
|
| | | return
|
| | | curTime = int(time.time())
|
| | | packData = ChPyNetSendPack.tagGCDogzNPCRefreshTime()
|
| | | packData.InfoList=[]
|
| | | for npcid, rTime in refreshTimeDict.items():
|
| | | for npcid, timeinfo in refreshTimeDict.items():
|
| | | lastRefreshTime, nextNeedTime = timeinfo
|
| | | remainTime = max(0, nextNeedTime - curTime + lastRefreshTime)
|
| | | timeInfo = ChPyNetSendPack.tagDogzTimeInfoObj()
|
| | | timeInfo.NPCID = npcid
|
| | | timeInfo.RefreshSecond = rTime
|
| | | timeInfo.RefreshSecond = remainTime
|
| | | packData.InfoList.append(timeInfo)
|
| | | packData.Cnt = len(packData.InfoList)
|
| | | if not playerID:
|
| | | if not curPlayer:
|
| | | playerManager = GameWorld.GetPlayerManager()
|
| | | for i in xrange(playerManager.GetActivePlayerCount()):
|
| | | curPlayer = playerManager.GetActivePlayerAt(i)
|