From ea17d553e94c26615f1032f1ab70e83bb54cdfaf Mon Sep 17 00:00:00 2001 From: hch <305670599@qq.com> Date: 星期一, 29 四月 2019 21:12:58 +0800 Subject: [PATCH] 6603 【后端】【2.0】增加新版的sp和被动技能 - 灼烧 --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py index 9ae4627..88f9e7d 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py @@ -633,6 +633,9 @@ index = 0 isPlayerTJG = (curObj.GetGameObjType() == IPY_GameWorld.gotPlayer and PlayerTJG.GetIsTJG(curObj)) + + skillIDListInDelBuff = [] # buff消失中需要处理添加buff,外层处理避免错乱 + while index < buffState.GetBuffCount(): curBuff = buffState.GetBuff( index ) if not curBuff: @@ -681,12 +684,29 @@ buffState.DeleteBuffByIndex( index ) SkillShell.ClearBuffEffectBySkillID(curObj, curSkill.GetSkillID(), ownerID, ownerType) + addSkillID = curObj.GetDictByKey(ChConfig.Def_PlayerKey_SkillInDelBuff) + if addSkillID and addSkillID not in skillIDListInDelBuff: + skillIDListInDelBuff.append(addSkillID) + + OnSkillAfterBuffDisappear(curObj, skillIDListInDelBuff, tick) + #执行DoBuffDisApper中,标记的玩家处理要求 __DoBuffDisApperByKey( curObj , tick ) return isRefresh, delResult +# DoBuffDisApper不能做Buff添加和删除逻辑!!!!!不然指针会错乱, 故在外层处理 +def OnSkillAfterBuffDisappear(curObj, skillIDListInDelBuff, tick): + posX, posY = curObj.GetPosX(), curObj.GetPosY() + for skillID in skillIDListInDelBuff: + skillData = GameWorld.GetGameData().GetSkillBySkillID(skillID) + if not skillData: + continue + + SkillShell.Trigger_UseSkill(curObj, curObj, skillData, tick, posX, posY) + return + #--------------------------------------------------------------------- ## 执行buff消失触发逻辑 # @param curObj 当前OBj -- Gitblit v1.8.0