| | |
| | | equipPlaceList = [] # 有穿戴装备的装备位列表
|
| | | suitCntDict = {} #套装数量字典
|
| | | legendAttrDict = {} #所有传奇属性
|
| | | equipScoreTotal = 0 #为解决装备评分、战力不一致的情况,装备战力改为由评分作为参数计算战力
|
| | |
|
| | | #玩家当前可装备的装备类型
|
| | | for equipIndex in xrange(playerEquip.GetCount()):
|
| | |
| | | continue
|
| | |
|
| | | equipPlaceList.append(equipIndex)
|
| | | equipScoreTotal += ItemCommon.GetEquipGearScore(curEquip)
|
| | |
|
| | | #基础属性效果
|
| | | for i in range(0, curEquip.GetEffectCount()):
|
| | |
| | | PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_Wash, allAttrListWash)
|
| | | PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_EquipOutOfPrint, allAttrListOutOfPrintEquip)
|
| | |
|
| | | #计算装备基础属性附加战力
|
| | | LV = curPlayer.GetLV()
|
| | | Atk = baseEquipAttrDict.get(ShareDefine.Def_Effect_Atk, 0)
|
| | | MinAtk = baseEquipAttrDict.get(ShareDefine.Def_Effect_MinAtk, 0) + Atk
|
| | | MaxAtk = baseEquipAttrDict.get(ShareDefine.Def_Effect_MaxAtk, 0) + Atk
|
| | | MaxHP = baseEquipAttrDict.get(ShareDefine.Def_Effect_MaxHP, 0)
|
| | | Def = baseEquipAttrDict.get(ShareDefine.Def_Effect_Def, 0)
|
| | | fightPowerEx = eval(IpyGameDataPY.GetFuncCompileCfg("FightpowerFormula", 2))
|
| | | curPlayer.SetDict(ChConfig.Def_PlayerKey_MFPEx % ShareDefine.Def_MFPType_Equip, fightPowerEx)
|
| | | #计算装备基础属性附加战力 (目前组成: 评分战力 + ...)
|
| | | equipFightPowerEx = eval(IpyGameDataPY.GetFuncCompileCfg("FightpowerFormula", 2))
|
| | | #GameWorld.DebugLog("装备评分战力: equipScoreTotal=%s,equipFightPowerEx=%s" % (equipScoreTotal, equipFightPowerEx))
|
| | | curPlayer.SetDict(ChConfig.Def_PlayerKey_MFPEx % ShareDefine.Def_MFPType_Equip, equipFightPowerEx)
|
| | | return
|
| | |
|
| | |
|
| | |
| | | for suiteKey, cnt in suitCntDict.items():
|
| | | groupType,suiteType,suiteLV = suiteKey.split('_')
|
| | | suiteLV = int(suiteLV)
|
| | | job = 0 if groupType == '2' else myjob #仙器组合默认职业0
|
| | | job = 0 if groupType == ChConfig.EquipGroupType_Relics else myjob #仙器组合默认职业0
|
| | | ipyData = IpyGameDataPY.GetIpyGameData('EquipSuitAttr', int(groupType), int(suiteType), int(suiteLV), job)
|
| | | if not ipyData:
|
| | | continue
|
| | |
| | | paramList= [name, cnt, suiteLV, groupType, suiteType]
|
| | | notifyRecord = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipPartSuiteNotify % (groupType, suiteType, cnt))
|
| | | if not notifyRecord & pow(2, suiteLV):
|
| | | if groupType == '1':
|
| | | if groupType == ChConfig.EquipGroupType_Armor:
|
| | | if cnt >=5:
|
| | | PlayerControl.WorldNotify(0, 'EquipSuit5', paramList)
|
| | | notifyRecord |= pow(2, suiteLV)
|
| | |
| | | break
|
| | | return findGroupType
|
| | |
|
| | | # 获取满套装化的最低阶数,如5件套,4件5级,1件3级,则返回3
|
| | | def GetEquipSuitsLVByType(curPlayer, suitType, groupType):
|
| | | suiteLV = 999
|
| | | equipSuitTypeDict = IpyGameDataPY.GetFuncEvalCfg('EquipSuitType')
|
| | | if groupType not in equipSuitTypeDict:
|
| | | return 0
|
| | | maxCnt = len(equipSuitTypeDict[groupType])
|
| | | cnt = 0
|
| | | for equipPlace in equipSuitTypeDict[groupType]:
|
| | | curSuiteLV = GetEquipPartSuiteLV(curPlayer, equipPlace, suitType)
|
| | | if curSuiteLV > 0:
|
| | | cnt += 1
|
| | | suiteLV = min(curSuiteLV, suiteLV)
|
| | | |
| | | if cnt != maxCnt:
|
| | | return 0
|
| | | return 0 if suiteLV == 999 else suiteLV
|
| | |
|
| | |
|
| | | ## 通知公共部位套装等级
|
| | | def NotifyEquipPartSuiteLV(curPlayer, index=None):
|