From b1d37ed3a47ba7b8d6356bf64943daae9023418c Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 09 六月 2025 11:20:18 +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 1617140..a6126b2 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/MirrorAttack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/MirrorAttack.py
@@ -143,6 +143,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