From d37ff1be4e18dee345942f1cac676c616636cb61 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 18 一月 2024 15:57:41 +0800
Subject: [PATCH] 10019 【砍树】回合战斗(每次攻击触发精怪技能支持)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
index ea9f691..9e9374d 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
@@ -4107,7 +4107,7 @@
     #  @remarks 刷新NPC属性
     def RefreshNPCAttrState(self, canSyncClient=True, isReborn=False):
         curNPC = self.__Instance
-        #curNPCMaxHP_Before = GameObj.GetMaxHP(curNPC)
+        maxHPBef = GameObj.GetMaxHP(curNPC)
         #清空NPC战斗属性
         curNPC.ClearBattleEffect()
         #--------------------------------------------
@@ -4162,6 +4162,11 @@
 #            curNPC.Notify_MaxHP()
         
         PassiveBuffEffMng.GetPassiveEffManager().RegistPassiveEff(curNPC)
+        
+        maxHPAdd = GameObj.GetMaxHP(curNPC) - maxHPBef
+        if maxHPAdd > 0:
+            #GameWorld.DebugLog("NPC刷属性提升了最大生命值,当前生命值一起增加: curID=%s,maxHPBef=%s,maxHPAdd=%s" % (curNPC.GetID(), maxHPBef, maxHPAdd))
+            GameObj.SetHP(curNPC, GameObj.GetHP(curNPC) + maxHPAdd)
         return
     
     def SetMirrorPlayerNPCAttr(self, mirrorPlayerID, isReborn):
@@ -4191,6 +4196,8 @@
         GameObj.SetSuckHPDefPer(curNPC, PropDict.get("SuckHPDefPer", 0))
         GameObj.SetCurePer(curNPC, PropDict.get("CurePer", 0))
         GameObj.SetCureDefPer(curNPC, PropDict.get("CureDefPer", 0))
+        GameObj.SetFinalHurtPer(curNPC, PropDict.get("FinalHurtPer", 0))
+        GameObj.SetFinalHurtReducePer(curNPC, PropDict.get("FinalHurtReducePer", 0))
         
         if not isReborn:
             return

--
Gitblit v1.8.0