| | |
| | | msgInfo = str([itemID, updKilledCnt])
|
| | | GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(0, 0, 0, "GlobalDropRate", msgInfo, len(msgInfo))
|
| | |
|
| | | # 4. 指定全服击杀次数必掉,算额外掉落
|
| | | globalKillDropDict = IpyGameDataPY.GetFuncEvalCfg("GlobalDropCD", 2) # {NPCID:{击杀次数:[是否本职业, [物品ID, ...], [随机物品ID, ...]]}, ...}
|
| | | if npcID in globalKillDropDict:
|
| | | killCountDropDict = globalKillDropDict[npcID]
|
| | | updNPCKilledCount = min(gw.GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_NPCKilledCount % npcID) + 1, ShareDefine.Def_UpperLimit_DWord)
|
| | | GameWorld.DebugLog("更新全服击杀次数: %s" % updNPCKilledCount)
|
| | | # 通知GameServer记录
|
| | | msgInfo = str([npcID, updNPCKilledCount])
|
| | | GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(0, 0, 0, "GlobalKillCount", msgInfo, len(msgInfo))
|
| | | if updNPCKilledCount in killCountDropDict:
|
| | | isJobLimit, itemIDList, randItemIDList = killCountDropDict[updNPCKilledCount]
|
| | | for itemID in itemIDList:
|
| | | if isJobLimit:
|
| | | itemData = GameWorld.GetGameData().GetItemByTypeID(itemID)
|
| | | if not itemData:
|
| | | continue
|
| | | itemJob = itemData.GetJobLimit() / 100
|
| | | if itemJob and itemJob != curPlayer.GetJob():
|
| | | # 非本职业可用,不掉落
|
| | | GameWorld.DebugLog("全服击杀次数必掉,非本职业可用,不掉落! itemID=%s" % itemID)
|
| | | continue
|
| | | dropItemIDList.append(itemID)
|
| | | GameWorld.DebugLog("全服击杀次数必掉物品: itemID=%s" % itemID)
|
| | | if randItemIDList:
|
| | | if isJobLimit:
|
| | | randJobItemList = []
|
| | | for rItemID in randItemIDList:
|
| | | itemData = GameWorld.GetGameData().GetItemByTypeID(rItemID)
|
| | | if not itemData:
|
| | | continue
|
| | | itemJob = itemData.GetJobLimit() / 100
|
| | | if itemJob and itemJob != curPlayer.GetJob():
|
| | | # 非本职业可用,不掉落
|
| | | GameWorld.DebugLog("全服击杀次数必掉随机,非本职业可用,不掉落! rItemID=%s" % rItemID)
|
| | | continue
|
| | | randJobItemList.append(rItemID)
|
| | | randItemID = random.choice(randJobItemList)
|
| | | else:
|
| | | randItemID = random.choice(randItemIDList)
|
| | | dropItemIDList.append(randItemID)
|
| | | GameWorld.DebugLog("全服击杀次数必掉随机物品: randItemID=%s" % randItemID)
|
| | | |
| | | return dropItemIDList
|
| | |
|
| | | def __GetEquipIDList(npcID, classLV, color, placeList, star, itemJobList, tagPlace=None):
|
| | |
| | |
|
| | | if GetDropOwnerType(curNPC) == ChConfig.DropOwnerType_Family:
|
| | | FamilyRobBoss.ClearFamilyOwnerBossHurt(curNPC)
|
| | | ChNPC.OnNPCSetDead(curNPC)
|
| | |
|
| | |
|
| | | # 清除队伍成员伤血列表
|
| | |
| | |
|
| | | def __GetTeamHurtNPCPlayerIDList(self, refreshPoint, teamID, tick):
|
| | |
|
| | | curNPC = self.__Instance
|
| | | teamHurtPlayerIDList = []
|
| | | # 如果没有在线队员在有效范围内,则进一步判断离线队员是否有伤血保护中的
|
| | | playerMgr = GameWorld.GetPlayerManager()
|
| | |
| | | continue
|
| | |
|
| | | #if curTeamPlayer.GetHP() > 0 and self.GetIsInRefreshPoint(curTeamPlayer.GetPosX(), curTeamPlayer.GetPosY(), refreshPoint):
|
| | | if self.GetIsInRefreshPoint(curTeamPlayer.GetPosX(), curTeamPlayer.GetPosY(), refreshPoint):
|
| | | if self.GetIsInRefreshPoint(curTeamPlayer.GetPosX(), curTeamPlayer.GetPosY(), refreshPoint) \
|
| | | and AttackCommon.CheckKillNPCByCnt(curTeamPlayer, curNPC, False):
|
| | | #GameWorld.DebugLog("有队员在boss范围内,保留队伍伤血!teamID=%s,playerID=%s" % (teamID, curTeamPlayer.GetPlayerID()))
|
| | | teamHurtPlayerIDList.append(playerID)
|
| | | else:
|