| | |
| | | # 刷被动效果和属性
|
| | | page = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GFPassivePage, 0, ChConfig.Def_PDictType_GFPassive)
|
| | | if clientData.Page == page:
|
| | | GetPassiveEffManager().RegistPassiveEffSet(curPlayer)
|
| | | GetPassiveEffManager().RegistPassiveEffSet(curPlayer, True)
|
| | | PlayerControl.PlayerControl(curPlayer).RefreshPlayerAttrState()
|
| | |
|
| | | EventShell.EventRespons_PassiveSet(curPlayer)
|
| | |
| | | NetPackCommon.SendFakePack(curPlayer, sendPack)
|
| | |
|
| | | # 刷被动效果和属性
|
| | | GetPassiveEffManager().RegistPassiveEffSet(curPlayer)
|
| | | GetPassiveEffManager().RegistPassiveEffSet(curPlayer, True)
|
| | | PlayerControl.PlayerControl(curPlayer).RefreshPlayerAttrState()
|
| | | return
|
| | |
|
| | |
| | | 4078:ChConfig.TriggerType_AttackOver, # 攻击(对敌技能)后被动技能被触发 4
|
| | | 4079:ChConfig.TriggerType_IsDealy, # 是否触发致命一击 72
|
| | | 4080:ChConfig.TriggerType_BounceHPPer, # 反弹伤害百分比值17,
|
| | | 4081:ChConfig.TriggerType_AddThumpHitRate, # 提高重击概率 73
|
| | | 4082:ChConfig.TriggerType_ThumpHit, # 对第一目标重击触发技能
|
| | | 4083:ChConfig.TriggerType_AddThumpHitPer, # 增加重击伤害百分比
|
| | | 4084:ChConfig.TriggerType_ThumpHit, # 对第一目标重击触发技能
|
| | | 4085:ChConfig.TriggerType_AttackOver, |
| | | 4086:ChConfig.TriggerType_AttackAddSkillPer, # 所有攻击伤害(SkillPer)增加,含普攻,计算时 5
|
| | | 4087:ChConfig.TriggerType_AttackAddSkillPer, # 所有攻击伤害(SkillPer)增加,含普攻,计算时 5
|
| | | 4088:ChConfig.TriggerType_AttackAddSkillPer, # 所有攻击伤害(SkillPer)增加,含普攻,计算时 5
|
| | | 4089:ChConfig.TriggerType_AttackAddSkillPer, # 所有攻击伤害(SkillPer)增加,含普攻,计算时 5
|
| | | 4090:ChConfig.TriggerType_AttackOver, # 攻击(对敌技能)后被动技能被触发 4
|
| | | 4091:ChConfig.TriggerType_SkillOverNoAttack, # 技能释放后 与TriggerType_AttackOver相反19,
|
| | | }
|
| | | return tdict.get(effectID, -1)
|
| | | #===========================================================================
|
| | |
| | | 4523:ChConfig.TriggerType_SuperHitSkillPer, # 暴击时,增加技能伤害 10
|
| | | 4524:ChConfig.TriggerType_SuperHitSubLayer, # 暴击减层 67
|
| | | 4525:ChConfig.TriggerType_SuperHitSkipCD, # 暴击无冷却 68
|
| | | 4526:ChConfig.TriggerType_AddThumpHitRate, # 增加重击概率
|
| | | 4527:ChConfig.TriggerType_AddThumpHitRate, # 增加重击概率
|
| | | 4528:ChConfig.TriggerType_AddThumpHitPer, # 重击时 增加重击百分比 75
|
| | | 4529:ChConfig.TriggerType_Buff_SuckBloodPer, # BUFF类: 百分比吸血, 此处非属性类
|
| | |
|
| | | 803:ChConfig.TriggerType_BloodShield, # 血盾
|
| | | 806:ChConfig.TriggerType_BloodShield, # 血盾
|
| | |
| | |
|
| | |
|
| | | # 重刷可装备的被动技能
|
| | | def RefreshPassiveSkillSet(self):
|
| | | def RefreshPassiveSkillSet(self, isCD=False):
|
| | | self.AffectPassiveSkillSetDict = {}
|
| | | skillManager = self.gameObj.GetSkillManager()
|
| | | skills = FindUsePassiveSkills(self.gameObj)
|
| | | |
| | | tick = GameWorld.GetGameWorld().GetTick()
|
| | |
|
| | | for skillID in skills:
|
| | | curSkill = skillManager.FindSkillBySkillID(skillID)
|
| | | if not curSkill:
|
| | | continue
|
| | | |
| | | if isCD:
|
| | | # 重切需进入CD
|
| | | SkillCommon.SetSkillRemainTime(curSkill, PlayerControl.GetReduceSkillCDPer(self.gameObj), tick, self.gameObj)
|
| | |
|
| | | skillTypeID = curSkill.GetSkillTypeID()
|
| | | connSkillID = SkillShell.GetConnectSkillID(curSkill) # 关联技能ID, 0代表不限技能
|
| | |
| | | return self.AffectSkillDict
|
| | |
|
| | |
|
| | | def GetPassiveSkillsByTriggerType(self, triggerType, connSkillID=0):
|
| | | def GetPassiveSkillsByTriggerType(self, triggerType, connSkill=None):
|
| | | connSkillID = connSkill.GetSkillTypeID() if connSkill else 0
|
| | | skillList = []
|
| | | ## bug:2018-03-15
|
| | | ## skillList=self.AffectSkillDict.get((triggerType, connSkillID), [])再用extend会导致AffectSkillDict无限增长
|
| | |
| | | skillList.extend(self.AffectPassiveSkillSetDict.get((triggerType, connSkillID), []))
|
| | | skillList.extend(self.AffectDogzSkillDict.get((triggerType, connSkillID), []))
|
| | | skillList.extend(self.AffectSuperEquipSkillDict.get((triggerType, connSkillID), []))
|
| | | |
| | | # 指定特殊类型可触发
|
| | | if connSkill and connSkill.GetFuncType() in [ChConfig.Def_SkillFuncType_FbSkill, ChConfig.Def_SkillFuncType_NormalAttack]:
|
| | | funcType = connSkill.GetFuncType()
|
| | | skillList.extend(self.AffectSkillDict.get((triggerType, funcType), []))
|
| | | skillList.extend(self.AffectPassiveSkillSetDict.get((triggerType, funcType), []))
|
| | | skillList.extend(self.AffectDogzSkillDict.get((triggerType, funcType), []))
|
| | | skillList.extend(self.AffectSuperEquipSkillDict.get((triggerType, funcType), []))
|
| | | |
| | | # 被动再触发被动限制为指定
|
| | | if connSkill and SkillCommon.isPassiveSkill(connSkill):
|
| | | return skillList
|
| | |
|
| | | if connSkillID != 0 and connSkillID != ChConfig.Def_SkillID_Somersault:
|
| | | skillList.extend(self.AffectSkillDict.get((triggerType, 0), []))
|
| | |
| | | return
|
| | |
|
| | | # 人物需同步注册被动技能
|
| | | def RegistPassiveEffSet(self, gameObj):
|
| | | def RegistPassiveEffSet(self, gameObj, isCD=False):
|
| | | passiveEff = self.GetPassiveEff(gameObj)
|
| | | if not passiveEff:
|
| | | # 强制刷新所有被动技能
|
| | | passiveEff = PassiveEff(gameObj)
|
| | | if not passiveEff.RefreshPassiveSkillSet():
|
| | | if not passiveEff.RefreshPassiveSkillSet(isCD):
|
| | | return
|
| | | self.AddPassiveEff(gameObj, passiveEff)
|
| | | else:
|
| | | passiveEff.RefreshPassiveSkillSet()
|
| | | passiveEff.RefreshPassiveSkillSet(isCD)
|
| | | return
|
| | |
|
| | |
|
| | |
| | | return 0, 0
|
| | |
|
| | | connSkillID = connSkill.GetSkillTypeID() if connSkill else 0
|
| | | skills = passiveEff.GetPassiveSkillsByTriggerType(triggerType, connSkillID)
|
| | | skills = passiveEff.GetPassiveSkillsByTriggerType(triggerType, connSkill)
|
| | | if not skills:
|
| | | return 0, 0
|
| | |
|
| | |
| | | if not attacker:
|
| | | return False
|
| | |
|
| | | stopPassiveSkill = False # 被动技能不能再触发被动技能,但可以触发天赋技能
|
| | | if connSkill:
|
| | | if not connSkill.GetFuncType():
|
| | | # 非功能类技能,避免死循环
|
| | | return False
|
| | | if SkillCommon.isPassiveSkill(connSkill):
|
| | | #GameWorld.DebugLog("被动技能不能再次触发被动技能")
|
| | | #return False
|
| | | stopPassiveSkill = True
|
| | |
|
| | | if SkillCommon.GetUsingPassiveSkill(attacker) and triggerType != ChConfig.TriggerType_BuffState:
|
| | | # 防范被动技能触发的 非被动技能
|
| | | #GameWorld.DebugLog("被动技能释放中不能再次触发被动技能---%s"%triggerType)
|
| | | #return |
| | | stopPassiveSkill = True
|
| | | |
| | | passiveEff = GetPassiveEffManager().GetPassiveEff(attacker)
|
| | | if not passiveEff:
|
| | | return False
|
| | |
|
| | | connSkillID = connSkill.GetSkillTypeID() if connSkill else 0
|
| | | skills = passiveEff.GetPassiveSkillsByTriggerType(triggerType, connSkillID)
|
| | | skills = passiveEff.GetPassiveSkillsByTriggerType(triggerType, connSkill)
|
| | | if not skills:
|
| | | return False
|
| | |
|
| | |
| | |
|
| | | if not IsValidPassiveSkill(curSkill):
|
| | | continue
|
| | | |
| | | if stopPassiveSkill and curSkill.GetFuncType() != ChConfig.Def_SkillFuncType_GiftSkill:
|
| | | # 只有天赋才可以再次被触发
|
| | | continue |
| | |
|
| | | effect = SkillCommon.GetSkillEffectByEffectID(curSkill, effectID)
|
| | | if not effect:
|
| | |
| | | if not passiveEff:
|
| | | return 0
|
| | | connSkillID = connSkill.GetSkillTypeID() if connSkill else 0
|
| | | skills = passiveEff.GetPassiveSkillsByTriggerType(triggerType, connSkillID)
|
| | | skills = passiveEff.GetPassiveSkillsByTriggerType(triggerType, connSkill)
|
| | | if not skills:
|
| | | return 0
|
| | |
|
| | |
| | | if not passiveEff:
|
| | | return []
|
| | | connSkillID = connSkill.GetSkillTypeID() if connSkill else 0
|
| | | skills = passiveEff.GetPassiveSkillsByTriggerType(triggerType, connSkillID)
|
| | | skills = passiveEff.GetPassiveSkillsByTriggerType(triggerType, connSkill)
|
| | | if not skills:
|
| | | return []
|
| | |
|
| | |
| | | if not passiveEff:
|
| | | return
|
| | | connSkillID = connSkill.GetSkillTypeID() if connSkill else 0
|
| | | skills = passiveEff.GetPassiveSkillsByTriggerType(triggerType, connSkillID)
|
| | | skills = passiveEff.GetPassiveSkillsByTriggerType(triggerType, connSkill)
|
| | | if not skills:
|
| | | return
|
| | |
|