| | |
| | | import ShareDefine
|
| | | import ReadChConfig
|
| | | import GameLogic_SealDemon
|
| | | import GameLogic_ZhuXianBoss
|
| | | import PlayerControl
|
| | | import IPY_GameWorld
|
| | | import IpyGameDataPY
|
| | |
| | | if mapID == ChConfig.Def_FBMapID_SealDemon:
|
| | | bossID = GameLogic_SealDemon.CurFBLineBOSSID()
|
| | | stoneNPCID = 0
|
| | | elif mapID == ChConfig.Def_FBMapID_ZhuXianBoss:
|
| | | bossID = GameLogic_ZhuXianBoss.CurFBLineBOSSID()
|
| | | stoneNPCID = 0
|
| | | else:
|
| | | ipyData = IpyGameDataPY.GetIpyGameDataByCondition('BOSSInfo', {'RefreshMark':refreshMark, 'MapID':mapID}, isLogNone=False)
|
| | | if not ipyData:
|
| | |
| | | isNeedShunt = ipyData.GetIsNeedShunt()
|
| | | if not bossID and not stoneNPCID:
|
| | | return
|
| | | |
| | | gameFB = GameWorld.GetGameFB()
|
| | | gameWorldMgr = GameWorld.GetGameWorld()
|
| | | isActivityBoss = False # 是否活动boss
|
| | |
| | | NPCCommon.SetDeadEx(curNPC)
|
| | |
|
| | | # 非复活线 且 不需要分流的地图 且 不是封魔坛 不允许复活
|
| | | if lineID != rebornLineID and not isNeedShunt and mapID != ChConfig.Def_FBMapID_SealDemon:
|
| | | if lineID != rebornLineID and not isNeedShunt and mapID not in [ChConfig.Def_FBMapID_SealDemon, ChConfig.Def_FBMapID_ZhuXianBoss]:
|
| | | return
|
| | |
|
| | | if isActivityBoss and activityBossRebornCount > 0:
|
| | |
| | | 注意:同个虚拟线路中,标试点不可重复!标试点不可重复!标试点不可重复!
|
| | | '''
|
| | | mapID = gameWorld.GetMapID()
|
| | | # {mapID:{编号:[[多个NPCID], [多个标试点], 单个点最大数量, 所有点总数量, 刷怪间隔秒], ...}, ...}
|
| | | # {mapID:{编号:[[多个NPCID], [多个标试点], 单个点最大数量, 所有点总数量, 刷怪间隔秒, 每整X小时], ...}, ...}
|
| | | randRefreshNPCDict = IpyGameDataPY.GetFuncEvalCfg("RandomRefreshNPC", 1, {})
|
| | | if mapID not in randRefreshNPCDict:
|
| | | return
|
| | |
| | | return
|
| | | gameFB.SetGameFBDict(ChConfig.Def_RMark_RandomRefreshNPCTick, tick)
|
| | |
|
| | | curTime = int(time.time())
|
| | | serverTime = GameWorld.GetCurrentTime()
|
| | | curHour, curMinute = serverTime.hour, serverTime.minute
|
| | | refreshNumList = []
|
| | | for num, refreshInfo in mapRandRefreshNPCDict.items():
|
| | | refreshCD = refreshInfo[-1]
|
| | | numLastTime = gameFB.GetGameFBDictByKey(ChConfig.Def_RMark_RandomRefreshNPCNumTime % num)
|
| | | if numLastTime and curTime - numLastTime < refreshCD:
|
| | | refreshCD = refreshInfo[4]
|
| | | numLastTick = gameFB.GetGameFBDictByKey(ChConfig.Def_RMark_RandomRefreshNPCNumTime % num)
|
| | | perHours = refreshInfo[5]
|
| | | if numLastTick and perHours:
|
| | | if curHour % perHours != 0 or curMinute != 0:
|
| | | continue
|
| | | refreshCD = 65 # 1分钟内不重复刷新
|
| | | if numLastTick and tick - numLastTick < refreshCD * 1000:
|
| | | continue
|
| | | gameFB.SetGameFBDict(ChConfig.Def_RMark_RandomRefreshNPCNumTime % num, curTime)
|
| | | gameFB.SetGameFBDict(ChConfig.Def_RMark_RandomRefreshNPCNumTime % num, tick)
|
| | | refreshNumList.append(num)
|
| | |
|
| | | if not refreshNumList:
|
| | |
| | |
|
| | | #GameWorld.DebugLog("npcCountDict=%s" % npcCountDict, copyMapID)
|
| | | for num in refreshNumList:
|
| | | npcIDList, markList, maxCount, totalMaxCount = mapRandRefreshNPCDict[num][:-1]
|
| | | npcIDList, markList, maxCount, totalMaxCount = mapRandRefreshNPCDict[num][:4]
|
| | |
|
| | | curTotalCount = 0
|
| | | for rMark in markList:
|