From 06eec1e27d26532824a710bba2483b0c7f39c27e Mon Sep 17 00:00:00 2001 From: xdh <xiefantasy@qq.com> Date: 星期六, 22 十二月 2018 18:03:50 +0800 Subject: [PATCH] 5372 【后端】【1.4】聚魂副本开发(npc速度通知) --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4508.py | 35 ++++++++++++++++++++++++++++++++--- 1 files changed, 32 insertions(+), 3 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4508.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4508.py index ac475bc..ab1c352 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4508.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4508.py @@ -15,18 +15,34 @@ import GameWorld import SkillCommon import BuffSkill +import SkillShell +import IPY_GameWorld def CheckCanHappen(attacker, defender, passiveEffect, skillID, **skillkwargs): + # 先判断概率 + rate = passiveEffect.GetEffectValue(0) + if rate and not GameWorld.CanHappen(rate): + return False + + # 关联技能 + checkSkillID = passiveEffect.GetEffectValue(2) + if checkSkillID: + useSkill = skillkwargs.get("useSkill", None) + if not useSkill: + return False + if useSkill.GetSkillTypeID() != checkSkillID: + return False + curSkill = GameWorld.GetGameData().GetSkillBySkillID(skillID) if not curSkill: return False - + buffType = SkillCommon.GetBuffType(curSkill) buffTuple = SkillCommon.GetBuffManagerByBuffType(attacker, buffType) #通过类型获取目标的buff管理器为空,则跳出 if buffTuple == (): return False - + buffManager = buffTuple[0] buff = buffManager.FindBuff(curSkill.GetSkillTypeID()) if not buff: @@ -34,8 +50,21 @@ if buff.GetLayer() <= 0: return False - + triggerSkillID = passiveEffect.GetEffectValue(1) + BuffSkill.SetBuffLayer(attacker, buff, buff.GetLayer()-1, skillTypeID=curSkill.GetSkillTypeID()) + + if triggerSkillID and attacker.GetGameObjType() == IPY_GameWorld.gotPlayer: + skillManager = attacker.GetSkillManager() + #获得技能 + triggerSkill = skillManager.FindSkillBySkillTypeID(triggerSkillID) + if triggerSkill: + #玩家技能会升级 + SkillShell.UsePassiveTriggerSkill(attacker, triggerSkill, defender, GameWorld.GetGameWorld().GetTick(), isEnhanceSkill = True) + else: + triggerSkill = GameWorld.GetGameData().GetSkillBySkillID(triggerSkillID) + if triggerSkill: + SkillShell.UsePassiveTriggerSkill(attacker, triggerSkill, defender, GameWorld.GetGameWorld().GetTick(), isEnhanceSkill = True) return True -- Gitblit v1.8.0