From 8cde6fcb2806974b7c35de295ce03f73c2c92bfe Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 09 六月 2025 11:18:36 +0800
Subject: [PATCH] 10263 【英文】【越南】【BT】【砍树】后端支持NPC仿真实玩家战斗和快速战斗(防范剩余血量计算报错;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/MirrorAttack.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/MirrorAttack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/MirrorAttack.py
index 4430e63..609f1a1 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/MirrorAttack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/MirrorAttack.py
@@ -145,6 +145,8 @@
     
     def CalcHPPer(self):
         ## 结算当前阶段双方阵营剩余血量占比,一般用于结算计算
+        if not self.curHPMax or not self.tagHPMax:
+            return 0, 0
         curHPPer = round(self.curHP / float(self.curHPMax) * 100, 2)
         tagHPPer = round(self.tagHP / float(self.tagHPMax) * 100, 2)
         return curHPPer, tagHPPer

--
Gitblit v1.8.0