From ae9f73d422020a792b2615d7f094d629d81c5123 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期五, 15 三月 2019 19:54:27 +0800 Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/SnxxServerCode --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_30.py | 58 +++++++++++++++++++++++++++++++++++++++++++--------------- 1 files changed, 43 insertions(+), 15 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_30.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_30.py index 123a4a1..165c6f0 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_30.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_30.py @@ -21,6 +21,7 @@ import PlayerControl import IPY_GameWorld import NPCCommon +import GameWorld #------------------------------------------------------------------------------ @@ -30,24 +31,51 @@ if not defender: return - buffType = ChConfig.Def_SkillBuffList.get(curSkill.GetEffect(0).GetEffectValue(0)) - buffTuple = SkillCommon.GetBuffManagerByBuffType(defender, buffType) - if buffTuple == (): - return + if not GameWorld.CanHappen(curSkill.GetHappenRate(), ChConfig.Def_MaxRateValue): + #清除失败也触发CD + return BaseAttack.DoSkillEx_AttackSucess(attacker, defender, curSkill, tick, isEnhanceSkill) - buffManager = buffTuple[0] - if buffManager.GetBuffCount() == 0: - return + skillType = curSkill.GetEffect(0).GetEffectValue(0) + if skillType == 0: + # 无配置代表清除负面buff任意1个 + skillTypeList = [ + ChConfig.Def_SkillType_LstDepBuff , #持续减益BUFF 4 + ChConfig.Def_SkillType_DepBuff , #减益BUFF 6 + ChConfig.Def_SkillType_Action , #影响行为BUFF 14 + ] + else: + skillTypeList = [skillType] - curBuff = buffManager.GetBuff(0) - ownerID, ownerType = curBuff.GetOwnerID(), curBuff.GetOwnerType() + delSuccess = False - #删除Buff - BuffSkill.DoBuffDisApper(defender, curBuff, tick) - buffSkill = curBuff.GetSkill() - skillID = buffSkill.GetSkillID() - buffManager.DeleteBuffByTypeID(buffSkill.GetSkillTypeID()) - SkillShell.ClearBuffEffectBySkillID(defender, skillID, ownerID, ownerType) + for skillType in skillTypeList: + + buffType = ChConfig.Def_SkillBuffList.get(skillType) + buffTuple = SkillCommon.GetBuffManagerByBuffType(defender, buffType) + if buffTuple == (): + continue + + buffManager = buffTuple[0] + if buffManager.GetBuffCount() == 0: + continue + + curBuff = buffManager.GetBuff(0) + ownerID, ownerType = curBuff.GetOwnerID(), curBuff.GetOwnerType() + + #删除Buff + BuffSkill.DoBuffDisApperEx(defender, curBuff, tick) + buffSkill = curBuff.GetSkill() + if not buffSkill: + continue + skillID = buffSkill.GetSkillID() + buffManager.DeleteBuffByTypeID(buffSkill.GetSkillTypeID()) + SkillShell.ClearBuffEffectBySkillID(defender, skillID, ownerID, ownerType) + delSuccess = True + break + + if not delSuccess: + # 没有可清除BUFF也进入CD + return BaseAttack.DoSkillEx_AttackSucess(attacker, defender, curSkill, tick, isEnhanceSkill) #刷新属性 curObjType = defender.GetGameObjType() -- Gitblit v1.8.0