| | |
| | | #获得技能等级
|
| | | curSkillLV = curSkill.GetSkillLV()
|
| | | DataRecordPack.DR_LearnORUPSkill(curPlayer, curSkillID, curSkillLV)
|
| | | EventShell.EventRespons_SkillUp(curPlayer, curSkill.GetFuncType())
|
| | | EventShell.EventRespons_SkillUp(curPlayer, curSkill.GetFuncType(), curSkillLV)
|
| | | GameWorld.Log("升级技能名 = %s 成功, 当前等级 = %s"%(curSkill.GetSkillName(), curSkill.GetSkillLV()), curPlayer.GetPlayerID())
|
| | | return True
|
| | |
|
| | |
| | | isChangeSkill = False #是否变更生效的技能
|
| | | if updSelectSkillLV != activeSkillLV:
|
| | | #可升级则激活升一级
|
| | | EventShell.EventRespons_ElementSkill(curPlayer, mainSkillID, updSelectSkillLV)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_SkillElementLV % selectSkillID, updSelectSkillLV)
|
| | | if curElementSkillID == selectSkillID:
|
| | | #正在使用的专精技能,则立即生效
|
| | |
| | | if curElementSkillID != selectSkillID:
|
| | | #原技能删除
|
| | | skillManager.DeleteSkillBySkillTypeID(curElementSkillID)
|
| | | else:
|
| | | EventShell.EventRespons_ElementSkill(curPlayer)
|
| | | |
| | |
|
| | | # 重刷被动技能
|
| | | PassiveBuffEffMng.GetPassiveEffManager().RegistPassiveEff(curPlayer)
|
| | |
| | | NotifyElementSkillInfo(curPlayer)
|
| | | return
|
| | |
|
| | | def GetElementSkillCnt(curPlayer):
|
| | | def GetElementSkillCnt(curPlayer, mainSkillIDList, activeLV):
|
| | | ##获取已选择的专精技能数量
|
| | | cnt = 0
|
| | | skillManager = curPlayer.GetSkillManager()
|
| | | for i in xrange(skillManager.GetSkillCount()):
|
| | | hasSkill = skillManager.GetSkillByIndex(i)
|
| | | hasSkillID = hasSkill.GetSkillTypeID()
|
| | | ipyData = IpyGameDataPY.GetIpyGameDataByCondition('SkillElement', {'MainSkillID':hasSkillID}, False, False)
|
| | | if not ipyData:
|
| | | if hasSkillID not in mainSkillIDList:
|
| | | continue
|
| | | curElementSkillID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_SkillElementID % hasSkillID)
|
| | | if not curElementSkillID:
|
| | | ipyDataList = IpyGameDataPY.GetIpyGameDataByCondition('SkillElement', {'MainSkillID':hasSkillID}, True, False)
|
| | | if not ipyDataList:
|
| | | continue
|
| | | for ipyData in ipyDataList:
|
| | | elementSkillID = ipyData.GetElementSkillID()
|
| | | curActiveLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_SkillElementLV % elementSkillID)
|
| | | if curActiveLV >= activeLV:
|
| | | cnt +=1
|
| | | return cnt
|
| | |
|
| | |
| | |
|
| | |
|
| | |
|
| | | ## 获取技能总等级
|
| | | ## 获取某类型技能达到X等级的个数
|
| | | # @param curPlayer
|
| | | # @return allSkillLV:总技能等级
|
| | | def GetAllSkillLV(curPlayer, funcType):
|
| | | allSkillLV = 0
|
| | | def GetSkillCntByFunc(curPlayer, funcType, skilllv=0):
|
| | | allSkillCnt = 0
|
| | | skillManager = curPlayer.GetSkillManager()
|
| | | for i in xrange(skillManager.GetSkillCount()):
|
| | | curPlayerSkill = skillManager.GetSkillByIndex(i)
|
| | |
| | | continue
|
| | | if curPlayerSkill.GetFuncType() != funcType:
|
| | | continue
|
| | | skillLV = curPlayerSkill.GetSkillLV()
|
| | | allSkillLV += skillLV
|
| | | if curPlayerSkill.GetSkillLV() >= skilllv:
|
| | | allSkillCnt += 1
|
| | |
|
| | | return allSkillLV
|
| | | return allSkillCnt
|
| | |
|
| | |
|