From 43a11e5827fdcf81eee3abcbcc526503c60bbab3 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期三, 17 七月 2019 15:16:53 +0800
Subject: [PATCH] 8012 子 【2.0.300】【开发】升星功能调整 / 【2.0.300】【后端】升星功能调整

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4501.py |   26 +++++++++-----------------
 1 files changed, 9 insertions(+), 17 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 6397dc3..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, **skillkwargs):
-    curSkill = GameWorld.GetGameData().GetSkillBySkillID(skillID)
-    if not curSkill:
-        return
     
-    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