| | |
| | | NotifyElementSkillInfo(curPlayer, mainSkillID, selectSkillID if updSelectSkillLV != activeSkillLV else 0)
|
| | | return
|
| | |
|
| | | def RefreshElementSkill(curPlayer, skillTypeID):
|
| | | def RefreshElementSkill(curPlayer, skillTypeID, isChangeLV=True):
|
| | | ##更新专精技能生效的等级
|
| | | __InitElementSkillInfo()
|
| | | if skillTypeID not in PyGameData.g_elemntSkillDict:
|
| | |
| | | curSkill = skillManager.FindSkillBySkillTypeID(skillTypeID)
|
| | | curSkillLV = curSkill.GetSkillLV() if curSkill else 0
|
| | | #GameWorld.DebugLog('更新专精技能生效的等级 skillTypeID=%s,curSkillLV=%s,activeSkillLV=%s,updSkillLV=%s'%(skillTypeID, curSkillLV, activeSkillLV, updSkillLV))
|
| | | if not isChangeLV:
|
| | | return
|
| | | if updSkillLV == curSkillLV:
|
| | | return
|
| | | elif updSkillLV < curSkillLV:
|
| | |
| | | #加点、丹药、境界、洗点 会影响灵根点
|
| | | __InitElementSkillInfo()
|
| | |
|
| | | needRefreshSkillIDList = []
|
| | | needRefreshSkillIDDict = {} #{skillid:是否变更技能等级}
|
| | | skillManager = curPlayer.GetSkillManager()
|
| | | for i in xrange(skillManager.GetSkillCount()):
|
| | | hasSkill = skillManager.GetSkillByIndex(i)
|
| | |
| | | ipyDataList = IpyGameDataPY.GetIpyGameDataByCondition('SkillElement', {'MainSkillID':hasSkillID}, True, False)
|
| | | if not ipyDataList:
|
| | | continue
|
| | | curSelectSkillID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_SkillElementID % hasSkillID)
|
| | | for ipyData in ipyDataList:
|
| | | curElementSkillID = ipyData.GetElementSkillID()
|
| | | if curElementSkillID not in PyGameData.g_elemntSkillDict:
|
| | |
| | | attrID = GetSkillUpNeedAttr(PyGameData.g_elemntSkillDict[curElementSkillID][0])[0]
|
| | | if attrID not in attrIDList:
|
| | | continue
|
| | | needRefreshSkillIDList.append(curElementSkillID)
|
| | | needRefreshSkillIDDict[curElementSkillID] = curSelectSkillID == curElementSkillID
|
| | | |
| | | #GameWorld.DebugLog('属性点变更 刷新专精attrIDList=%s,needRefreshSkillIDList=%s'%(attrIDList,needRefreshSkillIDList))
|
| | | isRefresh = False
|
| | | for skillID in needRefreshSkillIDList:
|
| | | if RefreshElementSkill(curPlayer, skillID):
|
| | | for skillID, isChangeLV in needRefreshSkillIDDict.items():
|
| | | if RefreshElementSkill(curPlayer, skillID, isChangeLV):
|
| | | isRefresh = True
|
| | | if isRefresh:
|
| | | # 重刷被动技能
|