|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def ResetActivityBossRefreshCount(): | 
|---|
|  |  |  | ## 重置活动boss刷怪个数 | 
|---|
|  |  |  | gameFB = GameWorld.GetGameFB() | 
|---|
|  |  |  | gameNPC = GameWorld.GetNPCManager() | 
|---|
|  |  |  |  | 
|---|
|  |  |  | # gameFb 要取活动线 | 
|---|
|  |  |  | activityLineIndex = 0 # 活动线, 默认1线 | 
|---|
|  |  |  | mapID = GameWorld.GetMap().GetMapID() | 
|---|
|  |  |  | activityMapLineDict = IpyGameDataPY.GetFuncEvalCfg("MapLine", 2, {}) | 
|---|
|  |  |  | if mapID in activityMapLineDict: | 
|---|
|  |  |  | activityLineIndex = max(0, activityMapLineDict[mapID] - 1) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | gameWorld = IPY_GameWorld.IPY_GameWorld(activityLineIndex) | 
|---|
|  |  |  | gameFB = gameWorld.GetGameFBByFbIndex(activityLineIndex) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | gameNPC = GameWorld.GetNPCManager() # NPC标识点的无所谓,哪条线都可以,因为都一样 | 
|---|
|  |  |  | for i in xrange(gameNPC.GetCustomNPCRefreshCount()): | 
|---|
|  |  |  | npcRefresh = gameNPC.GetCustomNPCRefreshAt(i) | 
|---|
|  |  |  | refreshMark = npcRefresh.GetRefreshMark() | 
|---|
|  |  |  | if gameFB.GetGameFBDictByKey(ChConfig.Map_NPC_ActivityBossRebornCount % refreshMark): | 
|---|
|  |  |  | gameFB.SetGameFBDict(ChConfig.Map_NPC_ActivityBossRebornCount % refreshMark, 0) | 
|---|
|  |  |  | GameWorld.DebugLog("重置活动boss刷怪点刷怪个数: refreshMark=%s" % refreshMark) | 
|---|
|  |  |  | GameWorld.DebugLog("重置活动boss刷怪点刷怪个数: activityLineIndex=%s,refreshMark=%s" % (activityLineIndex, refreshMark)) | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | ## 世界boss刷怪 | 
|---|
|  |  |  | 
|---|
|  |  |  | mapID = GameWorld.GetMap().GetMapID() | 
|---|
|  |  |  | refreshMark = npcRefresh.GetRefreshMark() | 
|---|
|  |  |  | lineID = GameWorld.GetGameWorld().GetLineID() | 
|---|
|  |  |  |  | 
|---|
|  |  |  | relatedType, relatedID = 0, 0 | 
|---|
|  |  |  | isNeedShunt = 0 | 
|---|
|  |  |  | if mapID == ChConfig.Def_FBMapID_SealDemon: | 
|---|
|  |  |  | bossID = GameLogic_SealDemon.CurFBLineBOSSID() | 
|---|
|  |  |  | stoneNPCID = 0 | 
|---|
|  |  |  | 
|---|
|  |  |  | return | 
|---|
|  |  |  | stoneNPCID = ipyData.GetStoneNPCID() | 
|---|
|  |  |  | bossID = ipyData.GetNPCID() | 
|---|
|  |  |  | relatedType = ipyData.GetRelatedType() | 
|---|
|  |  |  | relatedID = ipyData.GetRelatedID() | 
|---|
|  |  |  | isNeedShunt = ipyData.GetIsNeedShunt() | 
|---|
|  |  |  | if not bossID and not stoneNPCID: | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | gameFB = GameWorld.GetGameFB() | 
|---|
|  |  |  | gameWorldMgr = GameWorld.GetGameWorld() | 
|---|
|  |  |  | relatedType = ipyData.GetRelatedType() | 
|---|
|  |  |  | relatedID = ipyData.GetRelatedID() | 
|---|
|  |  |  | isActivityBoss = False | 
|---|
|  |  |  | isActivityBoss = False # 是否活动boss | 
|---|
|  |  |  | # 关联日常活动 | 
|---|
|  |  |  | if relatedType == 1: | 
|---|
|  |  |  | actionKey = ShareDefine.Def_Notify_WorldKey_DailyActionState % relatedID | 
|---|
|  |  |  | 
|---|
|  |  |  | rebornBossState = 0 | 
|---|
|  |  |  | stoneNPCID = 0 # 活动线暂不刷墓碑 | 
|---|
|  |  |  |  | 
|---|
|  |  |  | isNeedShunt = NPCCommon.IsMapNeedBossShunt(mapID) and ipyData.GetIsNeedShunt() | 
|---|
|  |  |  | isNeedShunt = NPCCommon.IsMapNeedBossShunt(mapID) and isNeedShunt | 
|---|
|  |  |  |  | 
|---|
|  |  |  | curNPC = None | 
|---|
|  |  |  | if npcRefresh.GetCount() > 0: | 
|---|
|  |  |  | 
|---|
|  |  |  | '''分流boss是否需要处理 | 
|---|
|  |  |  | 无伤血、仇恨、没人看到他、他没看到别人 | 
|---|
|  |  |  | ''' | 
|---|
|  |  |  | if curNPC.GetPlayerHurtList().GetHurtCount(): | 
|---|
|  |  |  | #GameWorld.DebugLog("分流boss有伤血,不可以清除!npcID=%s" % curNPC.GetNPCID(), GameWorld.GetGameWorld().GetLineID()) | 
|---|
|  |  |  | return True | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if curNPC.GetAttentionPlayersCount() or curNPC.GetInSightObjCount(): | 
|---|
|  |  |  | #GameWorld.DebugLog("分流boss有人看到,不可以清除!npcID=%s" % curNPC.GetNPCID(), GameWorld.GetGameWorld().GetLineID()) | 
|---|
|  |  |  | return True | 
|---|
|  |  |  |  | 
|---|
|  |  |  | GameWorld.DebugLog("分流boss不需要处理了,可以清除!npcID=%s" % curNPC.GetNPCID(), GameWorld.GetGameWorld().GetLineID()) | 
|---|
|  |  |  | return False | 
|---|
|  |  |  | # 策划暂时修改分流boss不同步死亡 | 
|---|
|  |  |  | return True | 
|---|
|  |  |  | #    if curNPC.GetPlayerHurtList().GetHurtCount(): | 
|---|
|  |  |  | #        #GameWorld.DebugLog("分流boss有伤血,不可以清除!npcID=%s" % curNPC.GetNPCID(), GameWorld.GetGameWorld().GetLineID()) | 
|---|
|  |  |  | #        return True | 
|---|
|  |  |  | # | 
|---|
|  |  |  | #    if curNPC.GetAttentionPlayersCount() or curNPC.GetInSightObjCount(): | 
|---|
|  |  |  | #        #GameWorld.DebugLog("分流boss有人看到,不可以清除!npcID=%s" % curNPC.GetNPCID(), GameWorld.GetGameWorld().GetLineID()) | 
|---|
|  |  |  | #        return True | 
|---|
|  |  |  | # | 
|---|
|  |  |  | #    GameWorld.DebugLog("分流boss不需要处理了,可以清除!npcID=%s" % curNPC.GetNPCID(), GameWorld.GetGameWorld().GetLineID()) | 
|---|
|  |  |  | #    return False | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #=================================================================================================== | 
|---|
|  |  |  |  | 
|---|