From 5f9bb5660f4a62ed7a30767a23d565fd9c152e2a Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 16 十二月 2025 20:38:01 +0800
Subject: [PATCH] 129 【战斗】战斗系统-服务端(关羽全部技能; 优化技能冷却时间字段对触发被动效果的技能也有效;)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/TurnPassive.py | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/TurnPassive.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/TurnPassive.py
index dacd25b..3dd3612 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/TurnPassive.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/TurnPassive.py
@@ -82,6 +82,12 @@
if not effSkill:
return
+ if effSkill.GetCoolDownTime():
+ if hasattr(effSkill, "GetRemainTime") and effSkill.GetRemainTime() > 0:
+ GameWorld.DebugLogEx("被动效果技能CD中! effSkillID=%s,RemainTime=%s", skillID, effSkill.GetRemainTime())
+ return
+ kwargs["byEffSkill"] = effSkill # 目前用于触发被动技能时,该效果技能提前先设置CD,防止嵌套触发时CD后置才设置,如关羽的怒技追击
+
kwargs["byTriggerWay"] = triggerWay
for effID in effIDList:
curEffect = effSkill.GetEffectByID(effID, triggerWay)
@@ -99,7 +105,16 @@
callFunc = GameWorld.GetExecFunc(PassiveTrigger, "%s.%s" % (pyName, "DoSkillEffectLogic"))
if not callFunc:
return
- callFunc(turnFight, batObj, tagObj, effSkill, curEffect, connSkill, connBuff, **kwargs)
+ isOK = callFunc(turnFight, batObj, tagObj, effSkill, curEffect, connSkill, connBuff, **kwargs)
+ if not isOK:
+ return
+
+ cdTime = effSkill.GetCoolDownTime()
+ if cdTime:
+ # 非触发技能的在后面设置CD即可
+ if hasattr(effSkill, "GetRemainTime"):
+ effSkill.SetRemainTime(cdTime)
+
return
def __doTriggerPassiveEffectByBuff(turnFight, batObj, tagObj, triggerWay, buffID, effIDList, connSkill=None, connBuff=None, **kwargs):
--
Gitblit v1.8.0