From 68c06a7abc6ad911baf81bde36e68019ecd1a11d Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 22 十二月 2025 19:06:15 +0800
Subject: [PATCH] 129 【战斗】战斗系统-服务端(小乔所有技能;增加触发方式53-友方造成持续伤害时;优化效果5022 5507 5509;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/BattleObj.py |    8 ++++++--
 1 files changed, 6 insertions(+), 2 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 e389169..061f81e 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/BattleObj.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/BattleObj.py
@@ -509,7 +509,7 @@
         return
     
     def GetBuffCount(self): return len(self._buffList)
-    def GetBuffByIndex(self, index): return self._buffList[index]
+    def GetBuffByIndex(self, index): return self._buffList[index] if len(self._buffList) > index else None
     
     def AddBuff(self, skillID):
         buff = None
@@ -906,6 +906,7 @@
         self._hp = 0 # 当前生命值
         self._xp = 0 # 当前怒气值
         self._isAlive = True # 是否活着
+        self._killer = None # 被谁击杀的
         self._initAttrDict = {} # 初始化时的属性,固定不变,初始化时已经算好的属性  {attrID:value, ...}
         self._batAttrDict = {} # 实际战斗属性,包含buff层级的实际属性 {attrID:+-value, ...} value可能是负值
         self._skillTempAttrDict = {} # 某次技能释放中临时的属性增减 {attrID:+-value, ...} value可能是负值
@@ -1103,12 +1104,15 @@
     
     # 战斗属性
     def IsAlive(self): return self._isAlive # 是否活着
-    def SetDead(self):
+    def SetDead(self, killer=None):
+        self._killer = killer
         self._isAlive = False
         self._hp = 0
     def SetRevive(self, hp):
+        self._killer = None
         self._isAlive = True
         self._hp = hp
+    def GetKiller(self): return self._killer
     def GetMaxHP(self): return int(self._batAttrDict.get(ChConfig.AttrID_MaxHP, 0))
     def SetMaxHP(self, maxHP, isNotify=False):
         maxHP = int(maxHP)

--
Gitblit v1.8.0