6603 【后端】【2.0】增加新版的sp和被动技能 - 修复无法清除buff问题
3个文件已修改
42 ■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_30.py 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4101.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py
@@ -1797,7 +1797,34 @@
        return curBuff
    
    return None
def FindBuffByOwnerEx(gameObj, skillTypeID, ownerID, ownerType):
    findSkill = GameWorld.GetGameData().GetSkillBySkillID(skillTypeID)
    buffType = GetBuffType(findSkill)
    buffTuple = GetBuffManagerByBuffType(gameObj, buffType)
    if buffTuple == ():
        return None, None, None, None
    
    buffManager = buffTuple[0]
    for i in range(0, buffManager.GetBuffCount()):
        curBuff = buffManager.GetBuff(i)
        if not curBuff:
            continue
        #判断是否拥有同一类型的技能
        if curBuff.GetSkill().GetSkillTypeID() != skillTypeID:
            continue
        #判断是否拥有同一类型的技能
        if curBuff.GetOwnerID() != ownerID:
            continue
        if curBuff.GetOwnerType() != ownerType:
            continue
        return curBuff, buffManager, buffType, findSkill
    return None, None, None, None
#---------------------------------------------------------------------
## 执行清空命令 参数:玩家, 保留技能类型列表
#  @param curPlayer 玩家
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_30.py
@@ -30,23 +30,28 @@
def UseSkill(attacker, defender, curSkill, tagRoundPosX, tagRoundPosY, isEnhanceSkill, tick):
    if not defender:
        return
    if not GameWorld.CanHappen(curSkill.GetHappenRate(), ChConfig.Def_MaxRateValue):
        #清除失败也触发CD
        return BaseAttack.DoSkillEx_AttackSucess(attacker, defender, curSkill, tick, isEnhanceSkill)
    
    delSuccess = False
    # 优先清理指定技能
    mark = curSkill.GetEffect(0).GetEffectValue(1)
    theSkillID = mark if mark > 10 else 0
    cleanCnt = mark if 0< mark <= 10 else 1
    if theSkillID:
        if not curSkill.GetEffect(0).GetEffectValue(2):
            findBuff = SkillCommon.FindBuffByID(defender, theSkillID)
            findBuff, buffManager, buffType, buffSkill = SkillCommon.FindBuffByID(defender, theSkillID)
        else:
            findBuff = SkillCommon.FindBuffByOwner(defender, theSkillID, attacker.GetID(), attacker.GetGameObjType())
            findBuff, buffManager, buffType, buffSkill = SkillCommon.FindBuffByOwnerEx(defender, theSkillID, attacker.GetID(), attacker.GetGameObjType())
        if findBuff:
            ownerID, ownerType = findBuff.GetOwnerID(), findBuff.GetOwnerType()
            #删除Buff
            BuffSkill.DoBuffDisApperEx(defender, findBuff, tick)
            skillID = buffSkill.GetSkillID()
            buffManager.DeleteBuffByTypeID(buffSkill.GetSkillTypeID())
            SkillShell.ClearBuffEffectBySkillID(defender, skillID, ownerID, ownerType)
            delSuccess = True
    else:
        # 某类技能中的一个
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4101.py
@@ -30,4 +30,4 @@
    findBuff = SkillCommon.FindBuffByOwner(defender, effect.GetEffectValue(1), attacker.GetID(), attacker.GetGameObjType())
    if not findBuff:
        return 0
    return effect.GetEffectValue(0)*findBuff.GetLayer()
    return effect.GetEffectValue(2)*findBuff.GetLayer()