| | |
| | | suitCntDict[suiteID].append(equipPartStar)
|
| | |
|
| | | #传奇属性
|
| | | legendAttrCount = curEquip.GetUserAttrCount(ShareDefine.Def_IudetLegendAttrID)
|
| | | legendAttrValueCount = curEquip.GetUserAttrCount(ShareDefine.Def_IudetLegendAttrValue)
|
| | | if legendAttrCount and legendAttrCount == legendAttrValueCount:
|
| | | for legendIndex in xrange(legendAttrCount):
|
| | | legendAttrID = curEquip.GetUserAttrByIndex(ShareDefine.Def_IudetLegendAttrID, legendIndex)
|
| | | legendAttrValue = curEquip.GetUserAttrByIndex(ShareDefine.Def_IudetLegendAttrValue, legendIndex)
|
| | | PlayerControl.CalcAttrDict_Type(legendAttrID, legendAttrValue, allAttrListEquip)
|
| | | #GameWorld.DebugLog(" 传奇属性: ID=%s +%s" % (legendAttrID, legendAttrValue))
|
| | | __CalcFuncAddEquipAttrPer(equipPlace, legendAttrID, legendAttrValue, equip_addEquipBaseAttrPerList)
|
| | | legAttrIDList, legAttrValueList = ItemControler.GetEquipLegendAttrAll(curEquip)
|
| | | for i, legendAttrID in enumerate(legAttrIDList):
|
| | | legendAttrValue = legAttrValueList[i]
|
| | | PlayerControl.CalcAttrDict_Type(legendAttrID, legendAttrValue, allAttrListEquip)
|
| | | #GameWorld.DebugLog(" 传奇属性: ID=%s +%s" % (legendAttrID, legendAttrValue))
|
| | | __CalcFuncAddEquipAttrPer(equipPlace, legendAttrID, legendAttrValue, equip_addEquipBaseAttrPerList)
|
| | |
|
| | | #物品强化属性
|
| | | __CalcAttr_ItemPlus(curPlayer, curEquip, packType, equipIndex, allAttrListPlus, plus_addEquipBaseAttrPerList)
|
| | |
| | | def CalcAttr_LegendAttr(curPlayer, curEquip, allAttrListEquip, legendAttrDict={}):
|
| | | ## 计算传奇属性
|
| | |
|
| | | # 传奇属性ID列表
|
| | | legendAttrIDList = [curEquip.GetUserAttrByIndex(ShareDefine.Def_IudetLegendAttrID, i) \
|
| | | for i in range(curEquip.GetUserAttrCount(ShareDefine.Def_IudetLegendAttrID))]
|
| | | # 传奇属性值列表
|
| | | legendAttrValueList = [curEquip.GetUserAttrByIndex(ShareDefine.Def_IudetLegendAttrValue, i) \
|
| | | for i in range(curEquip.GetUserAttrCount(ShareDefine.Def_IudetLegendAttrValue))]
|
| | | if not legendAttrIDList or len(legendAttrIDList) != len(legendAttrValueList):
|
| | | legAttrIDList, legAttrValueList = ItemControler.GetEquipLegendAttrAll(curEquip)
|
| | | if not legAttrIDList:
|
| | | #GameWorld.DebugLog("没有传奇属性!")
|
| | | return
|
| | | #GameWorld.DebugLog("传奇属性: place=%s,IDList=%s, v=%s" % (curEquip.GetEquipPlace(), legendAttrIDList, legendAttrValueList))
|
| | | #GameWorld.DebugLog("传奇属性: place=%s,IDList=%s, v=%s" % (curEquip.GetEquipPlace(), legAttrIDList, legAttrValueList))
|
| | |
|
| | | for i, attrID in enumerate(legendAttrIDList):
|
| | | value = legendAttrValueList[i]
|
| | | #GameWorld.DebugLog("加传奇属性: %s +%s" % (attrID, value))
|
| | | PlayerControl.CalcAttrDict_Type(attrID, value, allAttrListEquip)
|
| | | for i, legendAttrID in enumerate(legAttrIDList):
|
| | | legendAttrValue = legAttrValueList[i]
|
| | | #GameWorld.DebugLog("加传奇属性: %s +%s" % (legendAttrID, legendAttrValue))
|
| | | PlayerControl.CalcAttrDict_Type(legendAttrID, legendAttrValue, allAttrListEquip)
|
| | | #legendAttrDict[attrID] = legendAttrDict.get(attrID, 0) + value
|
| | |
|
| | | return
|