From 39880fd93db2a34b4553d7c3ac5bc2dae7e92925 Mon Sep 17 00:00:00 2001 From: hch <305670599@qq.com> Date: 星期六, 29 六月 2019 18:51:54 +0800 Subject: [PATCH] 6603 【后端】【2.0】增加新版的sp和被动技能 - 修复无法清除buff问题 --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_30.py | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 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 fde6f13..cfce1bf 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 @@ -30,23 +30,28 @@ def UseSkill(attacker, defender, curSkill, tagRoundPosX, tagRoundPosY, isEnhanceSkill, tick): if not defender: return - if not GameWorld.CanHappen(curSkill.GetHappenRate(), ChConfig.Def_MaxRateValue): #清除失败也触发CD return BaseAttack.DoSkillEx_AttackSucess(attacker, defender, curSkill, tick, isEnhanceSkill) delSuccess = False - # 优先清理指定技能 mark = curSkill.GetEffect(0).GetEffectValue(1) theSkillID = mark if mark > 10 else 0 cleanCnt = mark if 0< mark <= 10 else 1 if theSkillID: if not curSkill.GetEffect(0).GetEffectValue(2): - findBuff = SkillCommon.FindBuffByID(defender, theSkillID) + findBuff, buffManager, buffType, buffSkill = SkillCommon.FindBuffByID(defender, theSkillID) else: - findBuff = SkillCommon.FindBuffByOwner(defender, theSkillID, attacker.GetID(), attacker.GetGameObjType()) + findBuff, buffManager, buffType, buffSkill = SkillCommon.FindBuffByOwnerEx(defender, theSkillID, attacker.GetID(), attacker.GetGameObjType()) if findBuff: + ownerID, ownerType = findBuff.GetOwnerID(), findBuff.GetOwnerType() + + #删除Buff + BuffSkill.DoBuffDisApperEx(defender, findBuff, tick) + skillID = buffSkill.GetSkillID() + buffManager.DeleteBuffByTypeID(buffSkill.GetSkillTypeID()) + SkillShell.ClearBuffEffectBySkillID(defender, skillID, ownerID, ownerType) delSuccess = True else: # 某类技能中的一个 -- Gitblit v1.8.0