From d6641e24bb33be9a0aad206dc12701f1ff5fcbb5 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期三, 16 十月 2019 15:19:01 +0800 Subject: [PATCH] 8262 【主干】【后端】仙盟宴会及传功优化(答题改为立即给每题奖励,只要在宴会地图即可获得奖励) 去除boss首杀记录查询CD --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4519.py | 23 +++++++++++++++++++---- 1 files changed, 19 insertions(+), 4 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4519.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4519.py index 9b42979..f0e8fc5 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4519.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4519.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: GBK -*- # -# @todo: 进入濒死状态 血量为1, 不触发技能 +# @todo: 进入濒死状态 血量为1 # # @author: Alee # @date 2017-12-9 下午09:41:44 @@ -15,15 +15,30 @@ import GameWorld import SkillCommon import BuffSkill +import IPY_GameWorld def CheckCanHappen(attacker, defender, passiveEffect, skillID, **skillkwargs): + if attacker.GetPlayerAction() == IPY_GameWorld.paDie: + # 当前已经被处理为死亡,那么就不触发 + return False + + zhanshaState = attacker.GetDictByKey(ChConfig.Def_PlayerKey_Zhansha) + + if zhanshaState: + # 按位判断,1为斩杀情况下,此技能不可被触发,2为终极斩杀不触发,3为任何斩杀都不触发 + if (passiveEffect.GetEffectValue(2) & pow(2, zhanshaState-1)) != 0: + return False + attacker.SetHP(1) - - return False + + # False 可用于多次触发不死的作用 + return True if passiveEffect.GetEffectValue(1) else False def GetSkillData(passiveEffect): - return + skillID = passiveEffect.GetEffectValue(1) + + return GameWorld.GetGameData().GetSkillBySkillID(skillID) def AfterUsePassiveSkill(attacker, defender, passiveEffect, tick): return -- Gitblit v1.8.0