hxp
2020-01-16 f724b8e55ee83824c3231bd955785b839f88be63
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4536.py
@@ -20,23 +20,30 @@
def CheckCanHappen(attacker, defender, passiveEffect, skillID, **skillkwargs):
    if not defender:
        return
    useSkill = skillkwargs.get("useSkill", None)
    if useSkill:
        if useSkill.GetSkillTypeID() == skillID:
            # 自己不加时长
            return
    findBuff = SkillCommon.FindBuffByOwner(attacker, skillID, defender.GetID(), defender.GetGameObjType())
    if not findBuff:
        return False
    curValue = findBuff.GetValue2()
    if curValue >= passiveEffect.GetEffectValue(1):
        return False
    remainTime = findBuff.GetRemainTime()
    findBuff.SetRemainTime(remainTime + passiveEffect.GetEffectValue(0))
    curSkill = GameWorld.GetGameData().GetSkillBySkillID(skillID)
    BuffSkill.PYSync_RefreshBuff(attacker, findBuff, SkillCommon.GetBuffType(curSkill), notifyAll=False, owner = defender)
    
    findBuff.SetValue2(curValue + 1)
    return False
def GetSkillData(passiveEffect):
    return None
def GetValue(attacker, defender, passiveEffect):
    return 0