| | |
| | | import ItemCommon
|
| | | import ChConfig
|
| | | import ChEquip
|
| | | import EventShell
|
| | |
|
| | | import random
|
| | |
|
| | |
| | | return
|
| | |
|
| | | maxWashLV = GetEquipWashMaxLV(curPlayer, equipPackindex, equipPlace)
|
| | | washLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashLV % equipPackindex) + 1
|
| | | washLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashLV % equipPackindex)
|
| | | GameWorld.DebugLog("装备洗练: classLV=%s,equipPlace=%s,checkUseGoldAttr=%s,washType=%s,washLV=%s,maxWashLV=%s"
|
| | | % (classLV, equipPlace, checkUseGoldAttr, washType, washLV, maxWashLV), playerID)
|
| | |
|
| | | if maxWashLV < 1:
|
| | | if maxWashLV < washLV:
|
| | | return
|
| | |
|
| | | washData = GetEquipWashData(washType, washLV)
|
| | |
| | | return
|
| | |
|
| | | preWashData = None # 上一洗练等级数据
|
| | | if washLV > 1:
|
| | | if washLV > 0:
|
| | | preWashData = GetEquipWashData(washType, washLV - 1)
|
| | | if not preWashData:
|
| | | GameWorld.ErrLog("找不到上一级洗练数据,无法洗练!preWashLV=%s" % (washLV - 1))
|
| | |
| | | return
|
| | | equipPlace = ipyData.GetEquipPlace()
|
| | | classLV = ipyData.GetClassLV()
|
| | | washLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashLV % equipPackindex) + 1
|
| | | washLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashLV % equipPackindex)
|
| | | maxWashLV = GetEquipWashMaxLV(curPlayer, equipPackindex, equipPlace)
|
| | | GameWorld.DebugLog("确认洗练结果: classLV=%s, equipPlace=%s,isSave=%s,washLV=%s,maxWashLV=%s"
|
| | | % (classLV, equipPlace, isSave, washLV, maxWashLV), playerID)
|
| | |
| | | washType = GetEquipWashType(equipPlace)
|
| | | if washType is None:
|
| | | return
|
| | | if maxWashLV < 1:
|
| | | if maxWashLV < 0:
|
| | | return
|
| | | washData = GetEquipWashData(washType, washLV)
|
| | | if not washData:
|
| | |
| | | if tempValue < getattr(washData, "GetAttrMax%s" % attrNum)():
|
| | | return
|
| | | washLV += 1
|
| | | # 字典存储的从0开始,0代表1级,所以实际存进去的值需减1
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_EquipWashLV % (equipPackindex), washLV - 1)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_EquipWashLV % (equipPackindex), washLV)
|
| | | GameWorld.DebugLog("装备洗练等级升级: equipPackindex=%s,washLV=%s" % (equipPackindex, washLV), curPlayer.GetPlayerID())
|
| | |
|
| | | # 洗练广播
|
| | |
| | | for place in syncPlaceList:
|
| | | equipPart = ChPyNetSendPack.tagMCEquipPartXLAttr()
|
| | | equipPart.EquipPlace = place
|
| | | equipPart.XLAttrLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashLV % place) + 1
|
| | | equipPart.XLAttrLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashLV % place)
|
| | | equipPart.XLAttrList = []
|
| | | for attrNum in range(1, Def_EquipWashMaxAttrCount + 1):
|
| | | washValue = ChPyNetSendPack.tagMCEquipPartXLAttrValue()
|
| | |
| | |
|
| | | def CalcAttr_EquipWash(curPlayer, equipIndex, equipPlace, allAttrList):
|
| | | ## 装备位洗练属性
|
| | | washLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashLV % equipIndex) + 1
|
| | | washLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashLV % equipIndex)
|
| | | maxWashLV = GetEquipWashMaxLV(curPlayer, equipIndex, equipPlace)
|
| | | washLV = min(washLV, maxWashLV)
|
| | | washType = GetEquipWashType(equipPlace)
|
| | |
| | | # washTypeLV = 999
|
| | | # placeList = GetEquipWashPlaceList(washType)
|
| | | # for equipPlace in placeList:
|
| | | # washLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashLV % equipPlace) + 1
|
| | | # washLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashLV % equipPlace)
|
| | | # washTypeLV = min(washTypeLV, washLV)
|
| | | #
|
| | | # if not washTypeLV:
|