hch
2019-06-22 666882e6e4f8bfbc698c21229d4bbd3f4a318738
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuffEffMng.py
@@ -405,6 +405,7 @@
             4107:ChConfig.TriggerType_SkillValue,   # 增加技能伤害固定值 82
             4108:ChConfig.TriggerType_SkillSuccess,  # 使用技能成功后不触发技能 处理消耗等问题用 87
             4109:ChConfig.TriggerType_SkillValue,   # 增加技能伤害固定值 82
             4110:ChConfig.TriggerType_ChangeSkillEff, # 改变技能特效
             }
    return tdict.get(effectID, -1) 
    #===========================================================================
@@ -1707,3 +1708,44 @@
    return True
# 被动技能改变值  无条件限制 纯取值
def GetPassiveSkillValueByTriggerTypeEx(attacker, defender, connSkill, triggerType):
    attacker = FindRealAttacker(attacker)
    if not attacker:
        return 0
    passiveEff = GetPassiveEffManager().GetPassiveEff(attacker)
    if not passiveEff:
        return 0
    connSkillID = connSkill.GetSkillTypeID() if connSkill else 0
    skills = passiveEff.GetPassiveSkillsByTriggerType(triggerType, connSkill)
    if not skills:
        return 0
    curValue = 0
    for skillTypeID, effectID in skills:
        if connSkillID == skillTypeID:
            continue
        curSkill = attacker.GetSkillManager().FindSkillBySkillTypeID(skillTypeID)
        if not curSkill:
            continue
        effect = SkillCommon.GetSkillEffectByEffectID(curSkill, effectID)
        if not effect:
            continue
        pyName = "PassiveSkill_%s" % effectID
        callFunc = GameWorld.GetExecFunc(PassiveBuff, "%s.%s" % (pyName, "CheckCanHappen"))
        # 条件不满足
        if callFunc and not callFunc(attacker, defender, effect, curSkill):
            continue
        callFunc = GameWorld.GetExecFunc(PassiveBuff, "%s.%s" % (pyName, "GetValue"))
        if callFunc is None:
            continue
        curValue += callFunc(attacker, defender, effect, skillTypeID)
    return curValue