From faead810c3511a5032c2eea146cd9ab741fa1b53 Mon Sep 17 00:00:00 2001 From: hch <305670599@qq.com> Date: 星期二, 28 八月 2018 12:17:45 +0800 Subject: [PATCH] fix:修复部分NPC血量超过亿用错接口导致逻辑异常问题,如AI根据血量释放技能 --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MergeBoss.py | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MergeBoss.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MergeBoss.py index 43083e9..5e4ced9 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MergeBoss.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MergeBoss.py @@ -40,7 +40,7 @@ import NPCCommon import BuffSkill import ChNPC - +import GameObj import random #当前副本地图的状态 @@ -807,7 +807,7 @@ objID = curNPC.GetID() npcID = curNPC.GetNPCID() - g_curBossDict["%s_%s" % (objID, npcID)] = [objID, npcID, curNPC.GetHP(), curNPC.GetMaxHP(), + g_curBossDict["%s_%s" % (objID, npcID)] = [objID, npcID, GameObj.GetHP(curNPC), GameObj.GetMaxHP(curNPC), curNPC.GetPosX(), curNPC.GetPosY()] __CheckOutTimeBuff(tick) @@ -1142,7 +1142,7 @@ hpPerList = sorted(hpPerDict.keys(), reverse = True) maxBuffCnt = bossBuffInfo[2] - nowHPPer = defender.GetHP() * 100 / defender.GetMaxHP() # 当前百分比 + nowHPPer = GameObj.GetHP(defender) * 100 / GameObj.GetMaxHP(defender) # 当前百分比 gameFB = GameWorld.GetGameFB() hpPerMarkKey = FBDict_BossHPPerMark % (objID, npcID) hpPerLogicMark = gameFB.GetGameFBDictByKey(hpPerMarkKey) -- Gitblit v1.8.0