xdh
2019-01-28 c060aabfb4621e897f7b69d6e537fc3ccf59d860
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/EquipZhuXian.py
@@ -46,10 +46,22 @@
    ## 获取诛仙装备位是否解锁
    # @param equipPlaceIndex: 注意传入的参数是装备位索引
    equipPlace = GetZhuXianEquipPlaceByIndex(equipPlaceIndex)
    placeUnlockDict = IpyGameDataPY.GetFuncEvalCfg("EquipZhuXian", 1, {})  # 诛仙装备位对应解锁所需诛仙塔层数 {"装备位":诛仙塔层数, ...} 没配的默认解锁
    if str(equipPlace) not in placeUnlockDict:
    placeUnlockDict = IpyGameDataPY.GetConfigEx("EquipZhuXianUnlock") # 诛仙装备位对应解锁所需诛仙塔层数 {"装备位":诛仙塔层数, ...} 没配的默认解锁
    if not placeUnlockDict:
        placeUnlockDict = {}
        ipyDataMgr = IpyGameDataPY.IPY_Data()
        for index in xrange(ipyDataMgr.GetZhuXianTowerCount()):
            ipyData = ipyDataMgr.GetZhuXianTowerByIndex(index)
            unlockEquipPlace = ipyData.GetUnLockEquipPlace()
            if not unlockEquipPlace:
                continue
            towerID = ipyData.GetID()
            placeUnlockDict[unlockEquipPlace] = towerID
        IpyGameDataPY.SetConfigEx("EquipZhuXianUnlock", placeUnlockDict)
        GameWorld.DebugLog("加载诛仙塔解锁装备位: placeUnlockDict=%s" % placeUnlockDict)
    if equipPlace not in placeUnlockDict:
        return True
    needTowerLV = placeUnlockDict[str(equipPlace)]
    needTowerLV = placeUnlockDict[equipPlace]
    curTowerLV = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_ZhuXianTowerPassLV)  # 已过关的诛仙塔层数
    return curTowerLV >= needTowerLV
@@ -239,26 +251,16 @@
        if attrID not in attrIDSkillPlusDict:
            continue
        skillTypeIDList = attrIDSkillPlusDict[attrID]
        effSkillTypeID = 0
        for skillTypeID in skillTypeIDList:
            skillData = curPlayer.GetSkillManager().FindSkillBySkillTypeID(skillTypeID)
            if not skillData:
                continue
            if SkillCommon.CheckSkillJob(curPlayer, skillData):
                effSkillTypeID = skillTypeID
                break
        if not effSkillTypeID:
            continue
        if attrID in addAttrIDList:
            skillAddPerDict = PyGameData.g_zhuXianSkillAddPerDict.get(playerID, {})
            skillAddPerDict[effSkillTypeID] = plusValue
            PyGameData.g_zhuXianSkillAddPerDict[playerID] = skillAddPerDict
        elif attrID in reduceAttrIDList:
            skillReducePerDict = PyGameData.g_zhuXianSkillReducePerDict.get(playerID, {})
            skillReducePerDict[effSkillTypeID] = plusValue
            PyGameData.g_zhuXianSkillReducePerDict[playerID] = skillReducePerDict
            if attrID in addAttrIDList:
                skillAddPerDict = PyGameData.g_zhuXianSkillAddPerDict.get(playerID, {})
                skillAddPerDict[skillTypeID] = plusValue
                PyGameData.g_zhuXianSkillAddPerDict[playerID] = skillAddPerDict
            elif attrID in reduceAttrIDList:
                skillReducePerDict = PyGameData.g_zhuXianSkillReducePerDict.get(playerID, {})
                skillReducePerDict[skillTypeID] = plusValue
                PyGameData.g_zhuXianSkillReducePerDict[playerID] = skillReducePerDict
#    GameWorld.DebugLog("    PyGameData.g_zhuXianSkillAddPerDict=%s" % PyGameData.g_zhuXianSkillAddPerDict)
#    GameWorld.DebugLog("    PyGameData.g_zhuXianSkillReducePerDict=%s" % PyGameData.g_zhuXianSkillReducePerDict)