From 1fd883c95ef2a3c8386648319d9b2acb4676c92c Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 20 三月 2025 18:57:24 +0800
Subject: [PATCH] 10263 【英文】【BT】【GM】后端支持NPC仿真实玩家战斗和快速战斗(优化释放被动UsePassive计数,防止可能引起的死循环;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py
index a7fa34e..50c5d8a 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py
@@ -2006,7 +2006,15 @@
     return attacker.GetDictByKey("UsePassive")
 
 def SetUsingPassiveSkill(attacker, value):
-    return attacker.SetDict("UsePassive", value)
+    if value > 0:
+        attacker.SetDict("UsePassive", attacker.GetDictByKey("UsePassive") + 1)
+    else:
+        attacker.SetDict("UsePassive", max(0, attacker.GetDictByKey("UsePassive") - 1))
+    return
+
+def ClearUsingPassiveSkill(attacker):
+    attacker.SetDict("UsePassive", 0)
+    return
 
 def CheckPlayerAtkInterval(curPlayer, skillTypeID, tick):
     ''' 验证是否基本攻击间隔 '''

--
Gitblit v1.8.0