hch
2019-05-15 705b7ca7906054bb6a61a888369733ea49e88345
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)