xdh
2019-05-30 e618542a206ac40241588ee6c2438733b5426965
7020 【2.0】【后端】符印镶嵌修改
1个文件已修改
18 ■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerRune.py 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerRune.py
@@ -209,7 +209,9 @@
        if not srcIpyData:
            GameWorld.DebugLog("该符印没有配置属性! 无法镶嵌! itemID=%s" % srcRuneItemID, curPlayer.GetPlayerID())
            return True
        srcRuneAttrType = srcIpyData.GetAttrType()
        srcRuneAttrTypeList = srcIpyData.GetAttrType()
        srcRuneAttrTypeCntDict = {attrType:1 for attrType in srcRuneAttrTypeList}
        maxSameAttrRuneCnt = IpyGameDataPY.GetFuncCfg('RuneUnlock', 5)
        # 判断是否已有镶嵌该属性类型
        doubleCnt = 0 #双属性符印个数
        for RuneNum in xrange(1, maxRuneHole + 1):
@@ -223,13 +225,19 @@
            if not ipyData:
                continue
            attrTypeList = ipyData.GetAttrType()
            if srcRuneAttrType == attrTypeList:
                GameWorld.DebugLog("已有镶嵌该属性类型! 无法镶嵌! RuneHoleNum=%s,srcRuneAttrType=%s" % (RuneNum, srcRuneAttrType), curPlayer.GetPlayerID())
                return True
            for attrType in attrTypeList:
                if attrType in srcRuneAttrTypeCntDict:
                    srcRuneAttrTypeCntDict[attrType] += 1
                    if srcRuneAttrTypeCntDict[attrType] > maxSameAttrRuneCnt:
                        GameWorld.DebugLog(
                            "该属性类型已镶嵌数量超过%s! 无法镶嵌! ,attrType=%s" % (maxSameAttrRuneCnt, attrType),
                            curPlayer.GetPlayerID())
                        return
            if len(attrTypeList) > 1:
                doubleCnt +=1
        
        if len(srcRuneAttrType) > 1 and doubleCnt >= __GetCanInlayDoubleAttrRuneCnt(curPlayer):
        if len(srcRuneAttrTypeList) > 1 and doubleCnt >= __GetCanInlayDoubleAttrRuneCnt(curPlayer):
            GameWorld.DebugLog("当前可镶嵌双属性符印个数已达上限%s! 无法镶嵌! itemID=%s" % (doubleCnt, srcRuneItemID), curPlayer.GetPlayerID())
            return True