From a410c052ad4992ca846e3e30f0ccf9ab0b85a1d7 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 17 九月 2025 17:14:32 +0800
Subject: [PATCH] 129 【战斗】战斗系统-服务端(甄姬、曹操技能;增加本次技能万分比效果ID6004;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/BattleObj.py |   33 ++++++++++++++++++++++++++++++++-
 1 files changed, 32 insertions(+), 1 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/BattleObj.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/BattleObj.py
index b11f819..59773b3 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/BattleObj.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/BattleObj.py
@@ -37,13 +37,40 @@
         self._AffectBuffDict = {} # 被动buff {(触发方式, 有效来源):{buffID:[effID, ...], ...}, ...}
         return
     
-    def GetPassiveEffByTrigger(self, triggerWay, connSkillTypeID=0):
+    def GetPassiveEffByTrigger(self, triggerWay, connSkill=None, connSkillTypeID=0):
         '''获取可触发的效果列表,技能跟buff根据触发优先级按顺序触发,优先级越高越先执行,相同时技能优先
                         优先级之后有需要再扩展
         @return: [["skill/buff", skillID/buffID, effIDList], ...]
         '''
         effList = []
         
+        if not connSkillTypeID and connSkill:
+            connSkillTypeID = connSkill.GetSkillTypeID()
+            
+        if connSkill:
+            skillID = connSkill.GetSkillID()
+            skillManager = self._batObj.GetSkillManager()
+            # 非对象身上的技能,读取本技能被动触发的效果,一般是主技能拆分的子技能
+            if not skillManager.FindSkillByID(skillID):
+                effIDList = []
+                for index in xrange(connSkill.GetEffectCount()):
+                    effect = connSkill.GetEffect(index)
+                    effectID = effect.GetEffectID()
+                    if effectID == 0:
+                        continue
+                    triggerWay = effect.GetTriggerWay()
+                    triggerSrc = effect.GetTriggerSrc()
+                    if not triggerWay:
+                        continue
+                    if triggerWay == ChConfig.TriggerWay_CurSkillEff:
+                        continue
+                    if triggerSrc != ChConfig.TriggerSrc_SkillSelf:
+                        # 仅添加本技能的
+                        continue
+                    effIDList.append(effectID)
+                if effIDList:
+                    effList.append(["skill", skillID, effIDList])
+                    
         # 优先取关联技能的
         if connSkillTypeID and connSkillTypeID not in [ChConfig.TriggerSrc_Skill, ChConfig.TriggerSrc_Buff, ChConfig.TriggerSrc_SkillSelf, ChConfig.TriggerSrc_BuffSelf]:
             # 技能
@@ -641,6 +668,7 @@
         self._buffMgr = ObjPool.GetPoolMgr().acquire(BuffManager, self)
         self._passiveEffMgr = ObjPool.GetPoolMgr().acquire(PassiveEffManager, self)
         self._lastHurtValue = 0
+        self._mainTagIDList = [] # 主技能目标ID列表,一般用于技能拆分成多个技能效果时,子技能可能会用到主技能的对象做逻辑
         
         # 统计
         self.hurtStat = 0 # 输出统计
@@ -832,6 +860,9 @@
     def GetLastHurtValue(self): return self._lastHurtValue
     def SetLastHurtValue(self, lastHurtValue): self._lastHurtValue = lastHurtValue
     
+    def GetMainTagIDList(self): return self._mainTagIDList
+    def SetMainTagIDList(self, mainTagIDList): self._mainTagIDList = mainTagIDList
+    
     def StatHurtValue(self, hurtValue):
         ## 统计输出
         self.hurtStat += hurtValue

--
Gitblit v1.8.0