hch
2019-06-01 7ce7a4931b65c4e05ea755b238f85dbc25e36266
6603 【后端】【2.0】增加新版的sp和被动技能 -- 清除负面buff
1个文件已修改
36 ■■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_30.py 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_30.py
@@ -36,11 +36,11 @@
        return BaseAttack.DoSkillEx_AttackSucess(attacker, defender, curSkill, tick, isEnhanceSkill)
    
    delSuccess = False
    buffSkill = None
    buffType = 0
    
    # 优先清理指定技能
    theSkillID = curSkill.GetEffect(0).GetEffectValue(1)
    mark = curSkill.GetEffect(0).GetEffectValue(1)
    theSkillID = mark if mark > 10 else 0
    cleanCnt = mark if 0< mark <= 10 else 1
    if theSkillID:
        if curSkill.GetEffect(0).GetEffectValue(1):
            findBuff = SkillCommon.FindBuffByID(defender, theSkillID)
@@ -48,12 +48,13 @@
            findBuff = SkillCommon.FindBuffByOwner(defender, theSkillID, attacker.GetID(), attacker.GetGameObjType())
        if findBuff:
            delSuccess = True
            buffSkill = findBuff.GetSkill()
            buffType = ChConfig.Def_SkillBuffList.get(buffSkill.GetSkillType())
    else:
        # 某类技能中的一个
        delSuccess, buffSkill, buffType = ClearBySkillType(curSkill, defender, tick)
        for _ in range(cleanCnt):
            delResult = ClearBySkillType(curSkill, defender, tick)
            if delResult:
                delSuccess = True
    if not delSuccess:
        # 没有可清除BUFF也进入CD
        return BaseAttack.DoSkillEx_AttackSucess(attacker, defender, curSkill, tick, isEnhanceSkill)
@@ -65,22 +66,14 @@
        #刷新玩家属性
        playerControl = PlayerControl.PlayerControl(defender)
        
        if buffType == IPY_GameWorld.bfActionBuff:
            playerControl.RefreshPlayerActionState()
            if BuffSkill.CheckBuffRefresh(buffSkill, False):
                playerControl.RefreshPlayerAttrByBuff()
        else:
            playerControl.RefreshPlayerAttrByBuff()
        playerControl.RefreshPlayerActionState()
        playerControl.RefreshPlayerAttrByBuff()
    #NPC
    elif curObjType == IPY_GameWorld.gotNPC:
        npcControl = NPCCommon.NPCControl(defender)
        
        if buffType == IPY_GameWorld.bfActionBuff:
            npcControl.RefreshNPCActionState()
            if BuffSkill.CheckBuffRefresh(buffSkill, False):
                npcControl.RefreshNPCAttrState()
        else:
            npcControl.RefreshNPCAttrState()
        npcControl.RefreshNPCActionState()
        npcControl.RefreshNPCAttrState()
        
    return BaseAttack.DoSkillEx_AttackSucess(attacker, defender, curSkill, tick, isEnhanceSkill)
@@ -97,8 +90,7 @@
        skillTypeList = [skillType]
    
    delSuccess = False
    buffSkill = None
    buffType = 0
    for skillType in skillTypeList:
        
        buffType = ChConfig.Def_SkillBuffList.get(skillType)
@@ -123,5 +115,5 @@
        SkillShell.ClearBuffEffectBySkillID(defender, skillID, ownerID, ownerType)
        delSuccess = True
        break
    return delSuccess, buffSkill, buffType
    return delSuccess