| | |
| | |
|
| | | ## 获取技能升级属性需求 rutrun attrID, attrvalue
|
| | | def GetSkillUpNeedAttr(stateSkillLV):return stateSkillLV /100000, stateSkillLV%100000
|
| | | ## 获取技能专精类型
|
| | | def GetSkillElementType(curSkill): return curSkill.GetStateSkillLV() /100000
|
| | |
|
| | | #// A5 16 选择技能五行专精 #tagCMSelectSkillElement
|
| | | #
|
| | |
| | | if nextSkill:
|
| | | if CheckLearnSkillNeedAttr(curPlayer, nextSkill):
|
| | | updSelectSkillLV = activeSkillLV + 1
|
| | | skillElementType = GetSkillElementType(nextSkill)
|
| | | isChangeSkill = False #是否变更生效的技能
|
| | | if updSelectSkillLV != activeSkillLV:
|
| | | #可升级则激活升一级
|
| | | EventShell.EventRespons_ElementSkill(curPlayer, mainSkillID, updSelectSkillLV)
|
| | | EventShell.EventRespons_ElementSkill(curPlayer, mainSkillID, skillElementType, updSelectSkillLV)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_SkillElementLV % selectSkillID, updSelectSkillLV)
|
| | | if curElementSkillID == selectSkillID:
|
| | | #正在使用的专精技能,则立即生效
|
| | |
| | | # 重刷被动技能
|
| | | PassiveBuffEffMng.GetPassiveEffManager().RegistPassiveEff(curPlayer)
|
| | | # 重刷技能战力
|
| | | PlayerControl.PlayerControl(curPlayer).RefreshPlayerAttrState()
|
| | | curControl = PlayerControl.PlayerControl(curPlayer)
|
| | | curControl.RefreshAllSkill()
|
| | | curControl.RefreshPlayerAttrState()
|
| | |
|
| | | NotifyElementSkillInfo(curPlayer, mainSkillID, selectSkillID if updSelectSkillLV != activeSkillLV else 0)
|
| | | return
|
| | |
| | | # 重刷被动技能
|
| | | PassiveBuffEffMng.GetPassiveEffManager().RegistPassiveEff(curPlayer)
|
| | | # 重刷技能战力
|
| | | PlayerControl.PlayerControl(curPlayer).RefreshPlayerAttrState()
|
| | | curControl = PlayerControl.PlayerControl(curPlayer)
|
| | | curControl.RefreshAllSkill()
|
| | | curControl.RefreshPlayerAttrState()
|
| | | NotifyElementSkillInfo(curPlayer)
|
| | | return
|
| | |
|
| | | def GetElementSkillCnt(curPlayer, mainSkillIDList, activeLV):
|
| | | def GetElementSkillCnt(curPlayer, mainSkillIDList, activeLV, elementType=0):
|
| | | ##获取已选择的专精技能数量
|
| | | # @param elementType: 专精类型,对应灵根ID
|
| | | gameData = GameWorld.GetGameData()
|
| | | cnt = 0
|
| | | skillManager = curPlayer.GetSkillManager()
|
| | | for i in xrange(skillManager.GetSkillCount()):
|
| | |
| | | continue
|
| | | for ipyData in ipyDataList:
|
| | | elementSkillID = ipyData.GetElementSkillID()
|
| | | if elementType:
|
| | | elementSkillData = gameData.GetSkillBySkillID(elementSkillID)
|
| | | if GetSkillElementType(elementSkillData) != elementType:
|
| | | continue
|
| | | curActiveLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_SkillElementLV % elementSkillID)
|
| | | if curActiveLV >= activeLV:
|
| | | cnt += 1
|
| | |
| | | # return True
|
| | |
|
| | | if isEnhanceSkill:
|
| | | BaseAttack.OnHurtTypeTriggerPassiveSkill(attacker, defender, curSkill, tick)
|
| | | return True
|
| | |
|
| | | #在这边调用避免群攻时多次扣除消耗
|
| | |
| | | return
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | | # 获得关联技能,0 全部 1是主动型技能(法宝,普攻) 其他技能ID
|
| | | # 获得关联技能,0 全部 1是主动型技能(法宝,普攻) 2 为人族法宝技能 3为普攻 其他技能ID
|
| | | def GetConnectSkillID(curSkill):
|
| | | return curSkill.GetExAttr1()
|
| | |
|