From 2502456291ed4a568b17b9bf781db6997475b39e Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 25 十一月 2021 15:23:44 +0800
Subject: [PATCH] 5287 【BT5】【主干】后台查询玩家背包道具报错(物品过多时长度超65535,简化返回物品数据信息)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4501.py |   28 ++++++++++------------------
 1 files changed, 10 insertions(+), 18 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4501.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4501.py
index 0bb0c94..b2f21cd 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4501.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4501.py
@@ -1,7 +1,7 @@
 #!/usr/bin/python
 # -*- coding: GBK -*-
 #
-# @todo: 攻击有xx%几率附加xx%技能伤害,持续xx秒
+# @todo: 攻击有xx%几率附加xx%技能伤害,持续xx秒, 附加目标处于XX状态
 #
 # @author: Alee
 # @date 2018-1-30 下午05:11:45
@@ -13,26 +13,18 @@
 
 import ChConfig
 import GameWorld
-import PassiveBuffEffMng
+import GameObj
 import SkillCommon
 
-def CheckCanHappen(attacker, defender, passiveEffect, skillID):
-    curSkill = GameWorld.GetGameData().GetSkillBySkillID(skillID)
-    if not curSkill:
-        return
+def CheckCanHappen(attacker, defender, passiveEffect, skillID, **skillkwargs):
     
-    buffType = SkillCommon.GetBuffType(curSkill)
-    buffTuple = SkillCommon.GetBuffManagerByBuffType(attacker, buffType)
-    #通过类型获取目标的buff管理器为空,则跳出
-    if buffTuple == ():
-        return
-    
-    buffManager = buffTuple[0]
-    buff = buffManager.FindBuff(skillID)
-    if not buff:
-        return
-    return GameWorld.CanHappen(buff.GetValue())
+    if passiveEffect.GetEffectValue(2) and defender:
+        if not GameObj.GetPyPlayerState(defender, passiveEffect.GetEffectValue(2)):
+            #GameWorld.DebugLog("状态触发----%s"%effect.GetEffectValue(1))
+            return False
+        
+    return GameWorld.CanHappen(passiveEffect.GetEffectValue(1))
 
 
 def GetValue(attacker, defender, passiveEffect):
-    return float(passiveEffect.GetEffectValue(0))/ChConfig.Def_MaxRateValue
+    return passiveEffect.GetEffectValue(0)

--
Gitblit v1.8.0