| | |
| | | % (equipIndex, curEquip.GetItemTypeID()), playerID)
|
| | | return
|
| | |
|
| | | equipColor = curEquip.GetItemColor()
|
| | | colorPlusMaxLVDict = IpyGameDataPY.GetFuncEvalCfg("DogzAssist", 4) # {颜色:等级上限, ...}
|
| | | if equipColor not in colorPlusMaxLVDict:
|
| | | return
|
| | | maxPlusLV = colorPlusMaxLVDict[equipColor]
|
| | | |
| | | equipPlace = curEquip.GetEquipPlace()
|
| | | curPlusLV = curEquip.GetUserAttrByIndex(ShareDefine.Def_IudetDogzEquipPlus, 0)
|
| | | curPlusExpTotal = curEquip.GetUserAttrByIndex(ShareDefine.Def_IudetDogzEquipPlus, 1)
|
| | | if curPlusLV >= maxPlusLV:
|
| | | GameWorld.Log("神兽装备已满级, 无法强化!equipColor=%s,curPlusLV=%s,maxPlusLV=%s" % (equipColor, curPlusLV, maxPlusLV), playerID)
|
| | | return
|
| | |
|
| | | ipyData = IpyGameDataPY.GetIpyGameData("DogzEquipPlus", equipPlace, curPlusLV)
|
| | | if not ipyData:
|
| | | return
|
| | | curLVUPTotalExp = ipyData.GetPlusLVUPTotalExp()
|
| | | if not curLVUPTotalExp:
|
| | | lvUPTotalExp = ipyData.GetPlusLVUPTotalExp()
|
| | | if not lvUPTotalExp:
|
| | | GameWorld.Log("神兽装备升级所需总经验为0, 无法强化!equipPlace=%s,curPlusLV=%s" % (equipPlace, curPlusLV), playerID)
|
| | | return
|
| | | |
| | | nextLVIpyData = None
|
| | | if curPlusExpTotal >= curLVUPTotalExp:
|
| | | nextLVIpyData = IpyGameDataPY.GetIpyGameDataNotLog("DogzEquipPlus", equipPlace, curPlusLV + 1)
|
| | | if not nextLVIpyData:
|
| | | GameWorld.Log("神兽装备已满级, 无法强化!equipPlace=%s,curPlusLV=%s" % (equipPlace, curPlusLV), playerID)
|
| | | return
|
| | |
|
| | | costGoldTotal = 0
|
| | | addExpTotal = 0
|
| | |
| | | ItemCommon.DelItem(curPlayer, delItem, curItem.GetCount(), False, ChConfig.ItemDel_DogzEquipPlus, infoDict)
|
| | |
|
| | | updPlusLV = curPlusLV
|
| | | if updPlusExpTotal >= curLVUPTotalExp:
|
| | | doCount = 0
|
| | | while nextLVIpyData and updPlusExpTotal >= nextLVIpyData.GetPlusLVUPTotalExp() and doCount < 100:
|
| | | doCount += 1
|
| | | nextLV = updPlusLV + 1
|
| | | nextLVIpyData = IpyGameDataPY.GetIpyGameDataNotLog("DogzEquipPlus", equipPlace, nextLV)
|
| | | if not nextLVIpyData:
|
| | | break
|
| | | updPlusLV = nextLV
|
| | | |
| | | doCount, maxDoCount = 0, maxPlusLV * 2
|
| | | while updPlusExpTotal >= lvUPTotalExp and updPlusLV < maxPlusLV and doCount < maxDoCount:
|
| | | doCount += 1
|
| | | nextLV = updPlusLV + 1
|
| | | nextLVIpyData = IpyGameDataPY.GetIpyGameDataNotLog("DogzEquipPlus", equipPlace, nextLV)
|
| | | if not nextLVIpyData:
|
| | | GameWorld.DebugLog(" 没有下一级数据,不能升级!nextLV=%s" % (nextLV), playerID)
|
| | | break
|
| | | updPlusLV = nextLV
|
| | | lvUPTotalExp = nextLVIpyData.GetPlusLVUPTotalExp()
|
| | | GameWorld.DebugLog(" 升级: equipPlace=%s,maxPlusLV=%s,updPlusLV=%s,updPlusExpTotal=%s,lvUPTotalExp=%s" |
| | | % (equipPlace, maxPlusLV, updPlusLV, updPlusExpTotal, lvUPTotalExp), playerID)
|
| | | |
| | | isRefreshAtrr = False
|
| | | # 未强化过
|
| | | if not curPlusExpTotal:
|
| | |
| | |
|
| | | return
|
| | |
|
| | | def GetDogzEquipPlusLVExpInfo(equipColor, equipPlace, totalExp):
|
| | | ## 获取当前神兽装备最高强化等级的强化熟练度
|
| | | retLV, retExp = 0, 0
|
| | | colorPlusMaxLVDict = IpyGameDataPY.GetFuncEvalCfg("DogzAssist", 4) # {颜色:等级上限, ...}
|
| | | if equipColor not in colorPlusMaxLVDict:
|
| | | return retLV, retExp
|
| | | maxPlusLV = colorPlusMaxLVDict[equipColor]
|
| | | for lv in xrange(maxPlusLV + 1):
|
| | | ipyData = IpyGameDataPY.GetIpyGameDataNotLog("DogzEquipPlus", equipPlace, lv)
|
| | | if lv and not ipyData:
|
| | | break
|
| | | |
| | | lvUPTotalExp = ipyData.GetPlusLVUPTotalExp()
|
| | | if not lvUPTotalExp:
|
| | | break
|
| | | |
| | | if totalExp < lvUPTotalExp:
|
| | | return lv, totalExp
|
| | | retLV, retExp = lv, lvUPTotalExp
|
| | | |
| | | return retLV, retExp
|
| | |
|
| | | def RefreshDogzAttr(curPlayer):
|
| | | ## 刷新神兽属性
|
| | |
|