| | |
| | | PyGameData.g_playerEquipPartAttrDict.pop(playerID, None)
|
| | | PyGameData.g_equipChangeClassLVInfo.pop(playerID, None)
|
| | | NPCCommon.ClearPriWoodPile(curPlayer)
|
| | | #移除地图缓存的境界难度玩家ID信息
|
| | | for playerIDList in PyGameData.g_realmDiffPlayerDict.values():
|
| | | if playerID in playerIDList:
|
| | | playerIDList.remove(playerID)
|
| | | return
|
| | |
|
| | | ##更新保存玩家在线时间
|
| | |
| | |
|
| | | curPlayer.SetExAttr16(indexList[tempList.index(max(tempList))])
|
| | |
|
| | | # 境界难度等级
|
| | | def GetRealmDifficulty(curPlayer): return curPlayer.GetExAttr18()
|
| | | def SetRealmDifficulty(curPlayer, realmDifficulty):
|
| | | ''' 设置境界难度等级,任何地图均可选择
|
| | | '''
|
| | | playerID = curPlayer.GetPlayerID()
|
| | | |
| | | if realmDifficulty:
|
| | | needRealmLV = GetDifficultyRealmLV(realmDifficulty)
|
| | | curRealmLV = curPlayer.GetOfficialRank()
|
| | | if curRealmLV < needRealmLV:
|
| | | GameWorld.DebugLog("当前境界低于境界难度,无法选择! curRealmLV(%s) < %s" % (curRealmLV, needRealmLV), playerID)
|
| | | return
|
| | | |
| | | difficultyRealmList = IpyGameDataPY.GetFuncEvalCfg("RealmDifficulty", 2)
|
| | | if needRealmLV not in difficultyRealmList:
|
| | | GameWorld.ErrLog("realmDifficulty(%s) needRealmLV(%s) not in difficultyRealmList(%s)" |
| | | % (realmDifficulty, needRealmLV, difficultyRealmList), playerID)
|
| | | return
|
| | | |
| | | GameWorld.DebugLog("SetRealmDifficulty: realmDifficulty=%s" % realmDifficulty, playerID)
|
| | | realmMapIDList = IpyGameDataPY.GetFuncEvalCfg("RealmDifficulty", 1)
|
| | | mapID = curPlayer.GetMapID()
|
| | | if mapID in realmMapIDList:
|
| | | # 先移除之前选的难度
|
| | | for playerIDList in PyGameData.g_realmDiffPlayerDict.values():
|
| | | if playerID in playerIDList:
|
| | | playerIDList.remove(playerID)
|
| | | |
| | | # 加入新难度,0难度不处理
|
| | | if realmDifficulty:
|
| | | if realmDifficulty not in PyGameData.g_realmDiffPlayerDict:
|
| | | PyGameData.g_realmDiffPlayerDict[realmDifficulty] = []
|
| | | playerIDList = PyGameData.g_realmDiffPlayerDict[realmDifficulty]
|
| | | if playerID not in playerIDList:
|
| | | playerIDList.append(playerID)
|
| | | |
| | | curPlayer.SetExAttr18(realmDifficulty)
|
| | | SendPropertyRefresh(curPlayer, ShareDefine.CDBPlayerRefresh_ExAttr18, realmDifficulty)
|
| | | SetPlayerSightLevel(curPlayer, realmDifficulty)
|
| | | return
|
| | | def GetDifficultyRealmLV(realmDifficulty): return realmDifficulty - 100
|
| | | def GetMapRealmDifficulty(curPlayer):
|
| | | ## 获取玩家在本地图中的境界难度层级,必须在境界地图且有选择境界难度才算,否则为默认0;该难度值同时也是视野层级
|
| | | realmDifficulty = GetRealmDifficulty(curPlayer)
|
| | | if not realmDifficulty:
|
| | | return 0
|
| | | mapID = curPlayer.GetMapID()
|
| | | realmMapIDList = IpyGameDataPY.GetFuncEvalCfg("RealmDifficulty", 1)
|
| | | if mapID not in realmMapIDList:
|
| | | return 0
|
| | | return realmDifficulty
|
| | |
|
| | | ##获得玩家威望值
|
| | | def GetPrestige(curPlayer): return 0
|
| | | def SetPrestige(curPlayer, value): return
|
| | |
| | |
|
| | | #同步设置 玩家和宠物及已召唤的召唤兽 视野层
|
| | | def SetPlayerSightLevel(curPlayer, sightLevel):
|
| | | # 当视野设置0时,在境界地图则自动设置已选择的境界难度视野
|
| | | if sightLevel == 0:
|
| | | realmDifficulty = GetMapRealmDifficulty(curPlayer)
|
| | | if realmDifficulty:
|
| | | sightLevel = realmDifficulty
|
| | | GameWorld.DebugLog("境界地图自动设置已选择的境界难度视野: sightLevel=%s" % sightLevel)
|
| | | |
| | | curPlayer.SetSightLevel(sightLevel)
|
| | | rolePet = curPlayer.GetPetMgr().GetFightPet()
|
| | | #无出战宠物
|