8325 【主干】【BT0.1】【后端】套装技能(套装技能升级支持;召唤兽对玩家主人使用技能支持)
2个文件已修改
68 ■■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChEquip.py 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChEquip.py
@@ -1269,10 +1269,9 @@
    if not suitCntDict:
        return
    #GameWorld.DebugLog('    suitCntDict=%s'%suitCntDict)
    learnSkillList = []
    delSkillIDList = []
    learnSkillInfo = {}
    suiteSkillTypeIDList = []
    skillManager = curPlayer.GetSkillManager()
    playerName = curPlayer.GetName()
    for suiteID, starList in suitCntDict.items():
        ipyDataList = IpyGameDataPY.GetIpyGameDataList('EquipSuitAttr', suiteID)
        if not ipyDataList:
@@ -1283,39 +1282,58 @@
            skillID = ipyData.GetSkillID()
            activateIndex = ipyData.GetActivateIndex()
            isActivate = GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_EquipPartSuiteActivate, activateIndex)
            #GameWorld.DebugLog("suiteID=%s,suiteCnt=%s,needStar=%s,isActivate=%s" % (suiteID, suiteCnt, needStar, isActivate))
            skillData = None if not skillID else GameWorld.GetGameData().GetSkillBySkillID(skillID)
            skillTypeID = 0 if not skillData else skillData.GetSkillTypeID()
            skillLV = 0 if not skillData else skillData.GetSkillLV()
            #GameWorld.DebugLog("suiteID=%s,suiteCnt=%s,needStar=%s,isActivate=%s,skillID=%s,skillTypeID=%s,skillLV=%s" % (suiteID, suiteCnt, needStar, isActivate, skillID, skillTypeID, skillLV))
            if skillTypeID and skillTypeID not in suiteSkillTypeIDList:
                suiteSkillTypeIDList.append(skillTypeID)
            if isActivate and [1 if star >= needStar else 0 for star in starList].count(1) >= suiteCnt:
                #GameWorld.DebugLog("    套装: suiteID=%s,suiteCnt=%s,needStar=%s" % (suiteID, suiteCnt, needStar))
                for attrID, attrValue in ipyData.GetAttrInfo().items():
                    PlayerControl.CalcAttrDict_Type(attrID, attrValue, allAttrListSuit)
                    #GameWorld.DebugLog("        属性: ID=%s +%s" % (attrID, attrValue))
                #技能
                if skillID and not skillManager.FindSkillBySkillTypeID(skillID):
                    learnSkillList.append(skillID)
#                #广播,改为激活时广播即可
#                notifyMark = ipyData.GetIsNotify()
#                if notifyMark and not GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_EquipPartSuiteNotify, notifyMark):
#                    PlayerControl.WorldNotify(0, 'AllStarLevelUp' if needStar else 'AllStarLevelUp2', [playerName, suiteID, suiteCnt, needStar])
#                    GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_PDict_EquipPartSuiteNotify, notifyMark, 1)
                if skillTypeID and skillLV and skillLV > learnSkillInfo.get(skillTypeID, 0):
                    learnSkillInfo[skillTypeID] = skillLV
            else:
                if skillID and skillManager.FindSkillBySkillTypeID(skillID):
                    delSkillIDList.append(skillID)
                    skillManager.DeleteSkillBySkillTypeID(skillID)
    #GameWorld.DebugLog("suiteSkillTypeIDList:%s" % suiteSkillTypeIDList)
    #GameWorld.DebugLog("learnSkillInfo:%s" % learnSkillInfo)
    skillChange = False
    playerCtl = PlayerControl.PlayerControl(curPlayer)
    for skillTypeID in suiteSkillTypeIDList:
        if skillTypeID in learnSkillInfo:
            #需要学习的不处理
            continue
        curSkill = skillManager.FindSkillBySkillTypeID(skillTypeID)
        if not curSkill:
            continue
        skillChange = True
        skillID = curSkill.GetSkillID()
        GameWorld.DebugLog("    删除套装技能: skillID=%s" % skillID)
        skillManager.DeleteSkillBySkillID(skillID)
        playerCtl.RefreshSkillFightPowerByDel(skillID)
                            
    for skillID in learnSkillList:
        GameWorld.DebugLog('    激活套装技能 skillResID=%s' % (skillID))
        skillData = GameWorld.GetGameData().FindSkillByType(skillID, 1)
    for skillTypeID, skillLV in learnSkillInfo.items():
        skillData = GameWorld.GetGameData().FindSkillByType(skillTypeID, skillLV)
        if not skillData:
            continue
        skillManager.LVUpSkillBySkillTypeID(skillID)
        PlayerControl.PlayerControl(curPlayer).RefreshSkillFightPowerEx(skillID, 0)
        skillID = skillData.GetSkillID()
        curSkill = skillManager.FindSkillBySkillTypeID(skillTypeID)
        if curSkill:
            if skillLV == curSkill.GetSkillLV():
                continue
            delSkillID = curSkill.GetSkillID()
            GameWorld.DebugLog("    删除套装技能等级: skillTypeID=%s,skillLV=%s,skillID=%s,delSkillID=%s" % (skillTypeID, skillLV, skillID, delSkillID))
            skillManager.DeleteSkillBySkillID(delSkillID)
            playerCtl.RefreshSkillFightPowerByDel(delSkillID)
        
    for delSkillID in delSkillIDList:
        PlayerControl.PlayerControl(curPlayer).RefreshSkillFightPowerByDel(delSkillID)
        GameWorld.DebugLog("    激活套装技能等级: skillTypeID=%s,skillLV=%s,skillID=%s" % (skillTypeID, skillLV, skillID))
        skillManager.LVUPSkillByID(skillID)
        playerCtl.RefreshSkillFightPowerEx(skillID, 0)
        skillChange = True
        
    if learnSkillList or delSkillIDList:
    if skillChange:
        # 重刷被动技能
        PassiveBuffEffMng.GetPassiveEffManager().RegistPassiveEff(curPlayer)    
    return
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
@@ -609,6 +609,8 @@
    
    owner = NPCCommon.GetSummonNPCOwner(IPY_GameWorld.gotNPC, curNPC)
    if not owner:
        owner = NPCCommon.GetSummonNPCOwner(IPY_GameWorld.gotPlayer, curNPC)
    if not owner:
        return False
    
    return GameWorld.IsSameObj(curTag, owner)