| | |
| | | return
|
| | |
|
| | | def __GetRandNPCID(curPlayer, killNPCList, recordKey):
|
| | | if not killNPCList:
|
| | | return
|
| | | |
| | | diffRealmLV = PlayerControl.GetDifficultyRealmLV(PlayerControl.GetRealmDifficulty(curPlayer))
|
| | | realmMapIDList = IpyGameDataPY.GetFuncEvalCfg("RealmDifficulty", 1)
|
| | | difficultyRealmList = IpyGameDataPY.GetFuncEvalCfg("RealmDifficulty", 2)
|
| | | # 已选择境界难度 且 随机击杀怪物 时才需要 随机境界难度NPC
|
| | | randRealmDiffNPC = (diffRealmLV in difficultyRealmList and recordKey == ChConfig.Def_Player_Dict_TaskLastKillNPCID)
|
| | | |
| | | heroLV = curPlayer.GetLV()
|
| | | ranNPCList = []
|
| | | returnNPC = None
|
| | |
| | | npcData = killNPC.NPCData
|
| | | if not npcData:
|
| | | continue
|
| | | NPCLV = npcData.GetLV()
|
| | | if randRealmDiffNPC:
|
| | | if mapid not in realmMapIDList:
|
| | | continue
|
| | | npcID = killNPC.ID
|
| | | realmNPCIpyData = IpyGameDataPY.GetIpyGameDataNotLog("NPCRealmStrengthen", npcID, diffRealmLV)
|
| | | if not realmNPCIpyData:
|
| | | continue
|
| | | NPCLV = realmNPCIpyData.GetLV()
|
| | | else:
|
| | | NPCLV = npcData.GetLV()
|
| | | if recordKey != ChConfig.Def_Player_Dict_TaskLastVisitNPCID and NPCLV < heroLV-30:
|
| | | secondNPC = killNPC
|
| | | continue
|
| | | if NPCLV > heroLV:
|
| | | continue
|
| | | |
| | | if recordKey != ChConfig.Def_Player_Dict_TaskLastVisitNPCID and NPCLV < heroLV-30:
|
| | | secondNPC = killNPC
|
| | | continue
|
| | | #不和上次的NPCID相同
|
| | | if killNPC.ID == curPlayer.NomalDictGetProperty(recordKey):
|