3428 子 【开发】神兽技能 / 【后端】神兽技能 -- 优化可叠加的同技能配置,高级技能叠加问题
4个文件已修改
38 ■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerDogz.py 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTJG.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuffEffMng.py 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -1227,7 +1227,7 @@
) = range( 0, Def_AutoAtkSkillType )
#技能类型
Def_SkillType_Count = 23
Def_SkillType_Count = 24
(
   Def_SkillType_Special      ,  #特殊技能   0        
   Def_SkillType_Atk          ,  #攻击类   1
@@ -1252,6 +1252,7 @@
   Def_SkillType_AttrSkill,         # 属性类技能 20
   Def_SkillType_PassiveLstPlsBuff,  #被动触发持续增益类buff 21
   Def_SkillType_PassiveLstDepBuff,  #被动触发持续减益类buff 22
   Def_SkillType_AttrSkillNoLearn,   # 可叠加的同类型ID属性类技能 不可学习 算属性直接取表 目前用于神兽技能 23
   
) = range( 0, Def_SkillType_Count )
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerDogz.py
@@ -564,6 +564,7 @@
    PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_DogzBattleSkill, skillAttrList)
    return
# 助战神兽技能属性,必须在 SetDogzIsHelpFight后调用
def CalcDogzBattleSkillAttr(curPlayer):
    skillAttrList = [{} for _ in range(4)]
@@ -585,6 +586,26 @@
            curEffect = curSkill.GetEffect(effectIndex)
            SkillShell.CalcBuffEffAttr(curPlayer, curEffect, skillAttrList)
            
    # Def_SkillType_AttrSkillNoLearn 非学习属性技能 叠加属性计算
    ipyDataMgr = IpyGameDataPY.IPY_Data()
    for i in xrange(ipyDataMgr.GetDogzCount()):
        ipyData = ipyDataMgr.GetDogzByIndex(i)
        if not GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_DogzFightState, i):
            #未助战
            continue
        for skillID in ipyData.GetHelpBattleSkills():
            skillData = GameWorld.GetGameData().GetSkillBySkillID(skillID)
            if not skillData:
                continue
            # 同技能类型ID可多个叠加的属性时直接取表
            if skillData.GetSkillType() != ChConfig.Def_SkillType_AttrSkillNoLearn:
                continue
            for effectIndex in xrange(skillData.GetEffectCount()):
                curEffect = skillData.GetEffect(effectIndex)
                SkillShell.CalcBuffEffAttr(curPlayer, curEffect, skillAttrList)
    
    #GameWorld.DebugLog("神兽技能属性: skillFPEx=%s, %s" % ( skillFPEx, skillAttrList))
    return skillAttrList
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTJG.py
@@ -922,7 +922,7 @@
        # 此时由服务端重新找一次挂机NPC
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PlayerKey_TJGNPC, npcID)
    
    GameWorld.DebugLog("弥补脱机----npcid  %s-%s-%s"%(
    GameWorld.DebugLog("弥补脱机----playerID:%s ,npcid  %s-%s-%s"%(curPlayer.GetID(),
                    curPlayer.NomalDictGetProperty(ChConfig.Def_PlayerKey_TJGNPC), times,
                    curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_TotalExpRate)))
    
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuffEffMng.py
@@ -1135,21 +1135,25 @@
        if curSkill.GetFuncType() != ChConfig.Def_SkillFuncType_Dogz:
            continue
        skillID = curSkill.GetSkillID()
        if skillID in dogzSkills:
            dogzSkills.remove(skillID)
            continue
        
        delDogzSkills.append(skillID)
        
    GameWorld.DebugLog("PlayerDogzSkill:%s - 删除%s"%(dogzSkills, delDogzSkills))
    
    # 删除非助战技能
    # 删除神兽技能
    for skillID in delDogzSkills:
        skillManager.DeleteSkillBySkillID(skillID, False)
    
    # 添加助战技能,同类技能取最高
    dogzSkills.sort()
    for skillID in dogzSkills:
        skillData = GameWorld.GetGameData().GetSkillBySkillID(skillID)
        if not skillData:
            continue
        if skillData.GetSkillType() == ChConfig.Def_SkillType_AttrSkillNoLearn:
            # 同技能可多个叠加的技能不能学,算属性时直接取表
            continue
        skillManager.LearnSkillByID(skillID, False)
    
    # 刷被动效果