From 0e2a25b6e5c9935cd80e937c4c8eb393c527bd20 Mon Sep 17 00:00:00 2001 From: hch <305670599@qq.com> Date: 星期二, 07 五月 2019 19:59:00 +0800 Subject: [PATCH] 860312 数据库操作函数更改 --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipWash.py | 244 ++++++++++++++++++++---------------------------- 1 files changed, 100 insertions(+), 144 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipWash.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipWash.py index a08f4aa..4fe25fc 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipWash.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipWash.py @@ -33,69 +33,55 @@ import random -Def_EquipWashMaxType = 3 # 装备洗练最大归组类型 +Def_EquipWashMaxType = 2 # 装备洗练最大归组类型 Def_EquipWashMaxAttrCount = 3 # 装备洗练最大洗练属性条数 +g_allIndexList = [] #可洗炼的部位缓存 def OnEquipWashLogin(curPlayer): Sycn_EquipWashInfo(curPlayer, isLogin=True) return -def GetEquipWashMaxLV(curPlayer, equipPlace): +def GetEquipWashMaxLV(curPlayer, equipPackindex, equipPlace): # @return: 0-未开放; >=1-该装备位最大可洗练等级 washType = GetEquipWashType(equipPlace) if not washType: return 0 - maxLVDict = IpyGameDataPY.GetFuncEvalCfg("EquipWashGroup%s" % washType, 2) - if not maxLVDict: - return 0 + equipPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptEquip) - curEquip = equipPack.GetAt(equipPlace) + curEquip = equipPack.GetAt(equipPackindex) if not curEquip or curEquip.IsEmpty(): - GameWorld.DebugLog("该装备位没有装备,无法洗练!equipPlace=%s" % (equipPlace)) + GameWorld.DebugLog("该装备位没有装备,无法洗练!equipPackindex=%s" % (equipPackindex)) return 0 - equipClassLV = ItemCommon.GetItemClassLV(curEquip) - minClassLVCfg = min(maxLVDict) - if equipClassLV < minClassLVCfg: - GameWorld.DebugLog("该装备位装备阶级=%s < minClassLVCfg(%s),无法洗练!equipPlace=%s" - % (equipClassLV, minClassLVCfg, equipPlace)) + + equipStar = ChEquip.GetEquipPartStarByRank(curPlayer, equipPackindex, curEquip) + ipyData = IpyGameDataPY.InterpolationSearch('ItemWashMax', 'Star', equipStar, {'Type':washType}) + if not ipyData: return 0 - if equipClassLV in maxLVDict: - maxWashLV = maxLVDict[equipClassLV] - if not maxWashLV: - GameWorld.DebugLog("该装备位装备阶级=%s,maxWashLV=%s,无法洗练!equipPlace=%s" - % (equipClassLV, maxWashLV, equipPlace)) - return 0 - return maxWashLV - maxClassLVCfg = max(maxLVDict) - if equipClassLV > maxClassLVCfg: - return maxLVDict[maxClassLVCfg] - # 默认返回当前部位洗练等级 - return curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashLV % equipPlace) + 1 + return ipyData.GetLevelMax() + + -def GetEquipWashPlaceList(washType): - ## 获取洗练类型对应的所有装备位 - placeList = IpyGameDataPY.GetFuncEvalCfg("EquipWashGroup%s" % washType, 1) - if placeList: - return placeList - return [] def GetEquipWashType(equipPlace): ## 获取装备位对应的洗练类型 - for washType in range(1, Def_EquipWashMaxType + 1): - placeList = GetEquipWashPlaceList(washType) - if equipPlace in placeList: - return washType - return + return IpyGameDataPY.GetFuncEvalCfg('EquipWashGroup', 1, {}).get(equipPlace) + def GetEquipWashData(washType, washLV): return IpyGameDataPY.GetIpyGameData("EquipWash", washType, washLV) def GetAllEquipWashPlace(): # 获取所有可洗练的装备位 - allPlaceList = [] - for washType in range(1, Def_EquipWashMaxType + 1): - allPlaceList += GetEquipWashPlaceList(washType) - return allPlaceList + global g_allIndexList + if not g_allIndexList: + maxClasslv = IpyGameDataPY.GetFuncCfg('EquipMaxClasslv') + for equipPlace in IpyGameDataPY.GetFuncEvalCfg('EquipWashGroup', 1, {}): + for classLV in xrange(1, maxClasslv+1): + ipyData = IpyGameDataPY.GetIpyGameData('EquipPlaceIndexMap', classLV, equipPlace) + if not ipyData: + continue + g_allIndexList.append(ipyData.GetGridIndex()) + return g_allIndexList #// A3 25 装备洗炼 #tagCMEquipXLAttrChange # @@ -110,18 +96,22 @@ curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index) playerID = curPlayer.GetPlayerID() - equipPlace = clientData.EquipPlace + equipPackindex = clientData.EquipPlace checkUseGoldAttr = clientData.CheckUseGoldAttr - + ipyData = IpyGameDataPY.GetIpyGameDataByCondition('EquipPlaceIndexMap', {'GridIndex':equipPackindex}) + if not ipyData: + return + equipPlace = ipyData.GetEquipPlace() + classLV = ipyData.GetClassLV() washType = GetEquipWashType(equipPlace) - maxWashLV = GetEquipWashMaxLV(curPlayer, equipPlace) - washLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashLV % equipPlace) + 1 - GameWorld.DebugLog("装备洗练: equipPlace=%s,checkUseGoldAttr=%s,washType=%s,washLV=%s,maxWashLV=%s" - % (equipPlace, checkUseGoldAttr, washType, washLV, maxWashLV), playerID) - if washType is None: GameWorld.Log("该装备位无法洗练! equipPlace=%s" % (equipPlace), playerID) return + + maxWashLV = GetEquipWashMaxLV(curPlayer, equipPackindex, equipPlace) + washLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashLV % equipPackindex) + 1 + GameWorld.DebugLog("装备洗练: classLV=%s,equipPlace=%s,checkUseGoldAttr=%s,washType=%s,washLV=%s,maxWashLV=%s" + % (classLV, equipPlace, checkUseGoldAttr, washType, washLV, maxWashLV), playerID) if maxWashLV < 1: return @@ -134,11 +124,11 @@ maxValueAttrNumList = [] # 已达到当前等级最大值的属性编号列表 for attrNum in range(1, Def_EquipWashMaxAttrCount + 1): maxValue = getattr(washData, "GetAttrMax%s" % attrNum)() - washValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashValue % (equipPlace, attrNum)) - washValueTemp = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashValueTemp % (equipPlace, attrNum)) + washValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashValue % (equipPackindex, attrNum)) + washValueTemp = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashValueTemp % (equipPackindex, attrNum)) if washValueTemp != 0: - GameWorld.Log("还有未选择是否保存的洗练属性,不可洗练!equipPlace=%s,attrNum=%s,washValueTemp=%s" - % (equipPlace, attrNum, washValueTemp), playerID) + GameWorld.Log("还有未选择是否保存的洗练属性,不可洗练!equipPackindex=%s,attrNum=%s,washValueTemp=%s" + % (equipPackindex, attrNum, washValueTemp), playerID) return if washValue >= maxValue: maxValueAttrNumList.append(attrNum) @@ -171,7 +161,7 @@ if attrNum in maxValueAttrNumList: continue - washValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashValue % (equipPlace, attrNum)) + washValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashValue % (equipPackindex, attrNum)) if checkUseGoldAttr & pow(2, attrNum - 1): useGoldAttrNumList.append(attrNum) randValueMin = getattr(washData, "GetAttrCostGoldMin%s" % attrNum)() @@ -184,8 +174,8 @@ randValueMin, randValueMax = randRange break if not randValueMin and not randValueMax: - GameWorld.ErrLog("找不到该装备位当前洗练值范围随机值!equipPlace=%s,washType=%s,washLV=%s,attrNum=%s,washValue=%s,randDict=%s" - % (equipPlace, washType, washLV, attrNum, washValue, randDict)) + GameWorld.ErrLog("找不到该装备位当前洗练值范围随机值!equipPackindex=%s,washType=%s,washLV=%s,attrNum=%s,washValue=%s,randDict=%s" + % (equipPackindex, washType, washLV, attrNum, washValue, randDict)) return GameWorld.DebugLog("随机范围属性%s, washValue=%s, %s~%s" % (attrNum, washValue, randValueMin, randValueMax)) randValue = random.randint(randValueMin, randValueMax) @@ -228,7 +218,7 @@ ItemCommon.DelCostItemByBind(curPlayer, mustItemIndexList, mustBindCnt, mustUnBindCnt, delMustIDCount, "EquipWash") if needGold: - infoDict = {"EquipPlace":equipPlace, "WashType":washType, "WashLV":washLV, "CheckUseGoldCnt":checkUseGoldCnt} + infoDict = {'classLV':classLV, "EquipPlace":equipPlace, "WashType":washType, "WashLV":washLV, "CheckUseGoldCnt":checkUseGoldCnt} PlayerControl.PayMoney(curPlayer, IPY_GameWorld.TYPE_Price_Gold_Money, needGold, ChConfig.Def_Cost_EquipWash, infoDict) GameWorld.DebugLog("随机洗练: randAttrDict=%s,fixMaxValueDict=%s" % (randAttrDict, fixMaxValueDict), playerID) @@ -237,7 +227,7 @@ minPer = 1 minPerAttrNum = 1 for attrNum in range(1, Def_EquipWashMaxAttrCount + 1): - washValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashValue % (equipPlace, attrNum)) + washValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashValue % (equipPackindex, attrNum)) preMaxValue = 0 if not preWashData else getattr(preWashData, "GetAttrMax%s" % attrNum)() curMaxValue = getattr(washData, "GetAttrMax%s" % attrNum)() curPer = (washValue - preMaxValue) / float(curMaxValue - preMaxValue) @@ -255,7 +245,7 @@ # 最终洗练值确认 isRefreshAttr = False for attrNum, randValue in randAttrDict.items(): - washValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashValue % (equipPlace, attrNum)) + washValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashValue % (equipPackindex, attrNum)) tempValue = washValue + randValue preMaxValue = 0 if not preWashData else getattr(preWashData, "GetAttrMax%s" % attrNum)() maxValue = getattr(washData, "GetAttrMax%s" % attrNum)() @@ -275,21 +265,21 @@ # 使用钻石洗练的直接更新,不用确认 if attrNum in useGoldAttrNumList: isRefreshAttr = True - PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_EquipWashValue % (equipPlace, attrNum), tempValue) - dataDict = {'equipPlace':equipPlace,'attrNum':attrNum,'oldValue':washValue,'newValue':tempValue} + PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_EquipWashValue % (equipPackindex, attrNum), tempValue) + dataDict = {'classLV':classLV, 'equipPlace':equipPlace,'attrNum':attrNum,'oldValue':washValue,'newValue':tempValue} DataRecordPack.Cache_FightPowerChangeInfo(curPlayer, ChConfig.PowerDownType_EquipWash, dataDict) GameWorld.DebugLog(" 勾选洗练,直接更新数值: %s" % tempValue, playerID) else: - PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_EquipWashValueTemp % (equipPlace, attrNum), tempValue) + PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_EquipWashValueTemp % (equipPackindex, attrNum), tempValue) #屏蔽自动升级 # if isRefreshAttr and washLV < maxWashLV: # CheckEquipWashLVUp(curPlayer, equipPlace, washLV, washData) - Sycn_EquipWashInfo(curPlayer, equipPlace) + Sycn_EquipWashInfo(curPlayer, equipPackindex) if isRefreshAttr: - RefreshEquipWashAttr(curPlayer) + RefreshEquipWashAttr(curPlayer, classLV) PlayerActLogin.AddLoginAwardActionCnt(curPlayer, ChConfig.Def_LoginAct_EquipWash, 1) return @@ -306,13 +296,17 @@ curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index) playerID = curPlayer.GetPlayerID() - equipPlace = clientData.EquipPlace + equipPackindex = clientData.EquipPlace isSave = clientData.IsSave - - washLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashLV % equipPlace) + 1 - maxWashLV = GetEquipWashMaxLV(curPlayer, equipPlace) - GameWorld.DebugLog("确认洗练结果: equipPlace=%s,isSave=%s,washLV=%s,maxWashLV=%s" - % (equipPlace, isSave, washLV, maxWashLV), playerID) + ipyData = IpyGameDataPY.GetIpyGameDataByCondition('EquipPlaceIndexMap', {'GridIndex':equipPackindex}) + if not ipyData: + return + equipPlace = ipyData.GetEquipPlace() + classLV = ipyData.GetClassLV() + washLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashLV % equipPackindex) + 1 + 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: @@ -328,80 +322,64 @@ if washLV >= maxWashLV: GameWorld.DebugLog("已达到最大洗练等级,不可升级!", playerID) return - if CheckEquipWashLVUp(curPlayer, equipPlace, washLV, washData): - RefreshEquipWashAttr(curPlayer) - Sycn_EquipWashInfo(curPlayer, equipPlace) + if CheckEquipWashLVUp(curPlayer, equipPackindex, classLV, equipPlace, washLV, washData): + RefreshEquipWashAttr(curPlayer, classLV) + Sycn_EquipWashInfo(curPlayer, equipPackindex) EquipWashSuccess(curPlayer) else: GameWorld.DebugLog("升级失败,有属性未达到最大值,无法升级!", playerID) return for attrNum in range(1, Def_EquipWashMaxAttrCount + 1): - tempValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashValueTemp % (equipPlace, attrNum)) + tempValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashValueTemp % (equipPackindex, attrNum)) if not tempValue: continue - PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_EquipWashValueTemp % (equipPlace, attrNum), 0) + PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_EquipWashValueTemp % (equipPackindex, attrNum), 0) if isSave == 1: - oldValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashValue % (equipPlace, attrNum)) - PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_EquipWashValue % (equipPlace, attrNum), tempValue) - dataDict = {'equipPlace':equipPlace,'attrNum':attrNum,'oldValue':oldValue,'newValue':tempValue} + oldValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashValue % (equipPackindex, attrNum)) + PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_EquipWashValue % (equipPackindex, attrNum), tempValue) + dataDict = {'classLV':classLV, 'equipPlace':equipPlace,'attrNum':attrNum,'oldValue':oldValue,'newValue':tempValue} DataRecordPack.Cache_FightPowerChangeInfo(curPlayer, ChConfig.PowerDownType_EquipWash, dataDict) - GameWorld.DebugLog("保存洗练数据: equipPlace=%s,attrNum=%s,tempValue=%s" % (equipPlace, attrNum, tempValue), playerID) + GameWorld.DebugLog("保存洗练数据: classLV=%s, equipPlace=%s,attrNum=%s,tempValue=%s" % (classLV, equipPlace, attrNum, tempValue), playerID) if isSave == 1: - RefreshEquipWashAttr(curPlayer) + RefreshEquipWashAttr(curPlayer, classLV) #屏蔽自动升级 # if washLV < maxWashLV: # CheckEquipWashLVUp(curPlayer, equipPlace, washLV, washData) - Sycn_EquipWashInfo(curPlayer, equipPlace) + Sycn_EquipWashInfo(curPlayer, equipPackindex) return -def CheckEquipWashLVUp(curPlayer, equipPlace, washLV, washData): +def CheckEquipWashLVUp(curPlayer, equipPackindex, classLV, equipPlace, washLV, washData): # 检查洗练类型升级 for attrNum in range(1, Def_EquipWashMaxAttrCount + 1): - tempValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashValue % (equipPlace, attrNum)) + tempValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashValue % (equipPackindex, attrNum)) # 只要有未达到本级最大值的,则不能升级 if tempValue < getattr(washData, "GetAttrMax%s" % attrNum)(): return washLV += 1 # 字典存储的从0开始,0代表1级,所以实际存进去的值需减1 - PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_EquipWashLV % (equipPlace), washLV - 1) - GameWorld.DebugLog("装备洗练等级升级: equipPlace=%s,washLV=%s" % (equipPlace, washLV), curPlayer.GetPlayerID()) + PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_EquipWashLV % (equipPackindex), washLV - 1) + GameWorld.DebugLog("装备洗练等级升级: equipPackindex=%s,washLV=%s" % (equipPackindex, washLV), curPlayer.GetPlayerID()) # 洗练广播 - PlayerControl.WorldNotify(0, "WashCongratulation", [curPlayer.GetPlayerName(), curPlayer.GetPlayerID(), equipPlace, washLV]) - for washType in range(1, Def_EquipWashMaxType + 1): - placeList = GetEquipWashPlaceList(washType) - if equipPlace not in placeList: - continue - - minWashLV = 999 - for equipPlace in placeList: - minWashLV = min(minWashLV, curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashLV % equipPlace) + 1) - - if minWashLV == washLV: - # 有精确命中数据等级,代表刚好达成该洗练套装 - washSpecLVIpyData = IpyGameDataPY.GetIpyGameDataNotLog("EquipWashSpec", washType, washLV) - if washSpecLVIpyData: - PlayerControl.WorldNotify(0, "WashMasterCongratulation", [curPlayer.GetPlayerName(), curPlayer.GetPlayerID(), washType, washLV]) - EventShell.EventRespons_EquipWash(curPlayer, washType, washLV) - break + PlayerControl.WorldNotify(0, "WashCongratulation", [curPlayer.GetPlayerName(), curPlayer.GetPlayerID(), classLV, equipPlace, washLV]) return True -def Sycn_EquipWashInfo(curPlayer, equipPlace=-1, isLogin=False): +def Sycn_EquipWashInfo(curPlayer, equipPackindex=-1, isLogin=False): hasValue = False pack = ChPyNetSendPack.tagMCEquipPartXLAttrInfo() pack.Clear() pack.InfoList = [] - if equipPlace == -1: + if equipPackindex == -1: syncPlaceList = GetAllEquipWashPlace() else: - syncPlaceList = [equipPlace] + syncPlaceList = [equipPackindex] for place in syncPlaceList: equipPart = ChPyNetSendPack.tagMCEquipPartXLAttr() @@ -428,16 +406,18 @@ NetPackCommon.SendFakePack(curPlayer, pack) return -def RefreshEquipWashAttr(curPlayer): - ChEquip.RefreshPlayerEquipAttribute(curPlayer) +def RefreshEquipWashAttr(curPlayer, classLV): + ChEquip.RefreshPlayerEquipAttribute(curPlayer, classLV) #刷新所有属性 playControl = PlayerControl.PlayerControl(curPlayer) playControl.RefreshPlayerAttrState() return -def CalcAttr_EquipWash(curPlayer, equipPlace, allAttrList): +def CalcAttr_EquipWash(curPlayer, equipIndex, equipPlace, allAttrList): ## 装备位洗练属性 - washLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashLV % equipPlace) + 1 + washLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashLV % equipIndex) + 1 + maxWashLV = GetEquipWashMaxLV(curPlayer, equipIndex, equipPlace) + washLV = min(washLV, maxWashLV) washType = GetEquipWashType(equipPlace) if washType is None: return @@ -447,49 +427,25 @@ #GameWorld.DebugLog("装备位属性: equipPlace=%s,washLV=%s" % (equipPlace, washLV)) for attrNum in range(1, Def_EquipWashMaxAttrCount + 1): attrID = getattr(washData, "GetAttrType%s" % attrNum)() - attrValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashValue % (equipPlace, attrNum)) + maxValue = getattr(washData, "GetAttrMax%s" % attrNum)() + attrValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashValue % (equipIndex, attrNum)) + attrValue = min(attrValue, maxValue) #GameWorld.DebugLog(" attrNum=%s,attrID=%s, attrValue=%s" % (attrNum, attrID, attrValue)) if attrValue: PlayerControl.CalcAttrDict_Type(attrID, attrValue, allAttrList) return -def CalcAttr_EquipWashSpec(curPlayer, equipPlaceList, allAttrList): - ## 装备洗练类型等级对应特殊套属性 - for washType in range(1, Def_EquipWashMaxType + 1): - washTypeLV = 999 - placeList = GetEquipWashPlaceList(washType) - for equipPlace in placeList: - if equipPlace not in equipPlaceList: - washTypeLV = 0 # 需穿戴装备才有效 - break - washLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashLV % equipPlace) + 1 - washTypeLV = min(washTypeLV, washLV) - #GameWorld.DebugLog("洗练套装属性: washType=%s,washTypeLV=%s" % (washType, washTypeLV)) - if not washTypeLV: - continue - washSpecData = IpyGameDataPY.InterpolationSearch("EquipWashSpec", "WashLVNeed", washTypeLV, {"WashTypeNeed":washType}) - if not washSpecData: - continue - - attrTypeList = washSpecData.GetAddAttrType() - attrValueList = washSpecData.GetAddAttrValue() - for i, attrID in enumerate(attrTypeList): - PlayerControl.CalcAttrDict_Type(attrID, attrValueList[i], allAttrList) - #GameWorld.DebugLog(" EquipWashSpec attrID=%s, attrValue=%s" % (attrID, attrValueList[i])) - - return - def EquipWashSuccess(curPlayer): - succList = [ShareDefine.SuccType_EquipWashLV1,ShareDefine.SuccType_EquipWashLV2,ShareDefine.SuccType_EquipWashLV3] - for washType in range(1, Def_EquipWashMaxType + 1): - washTypeLV = 999 - placeList = GetEquipWashPlaceList(washType) - for equipPlace in placeList: - washLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashLV % equipPlace) + 1 - washTypeLV = min(washTypeLV, washLV) - - if not washTypeLV: - continue - PlayerSuccess.DoAddSuccessProgress(curPlayer, succList[washType-1], 1, [washTypeLV]) +# succList = [ShareDefine.SuccType_EquipWashLV1,ShareDefine.SuccType_EquipWashLV2,ShareDefine.SuccType_EquipWashLV3] +# for washType in range(1, Def_EquipWashMaxType + 1): +# washTypeLV = 999 +# placeList = GetEquipWashPlaceList(washType) +# for equipPlace in placeList: +# washLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashLV % equipPlace) + 1 +# washTypeLV = min(washTypeLV, washLV) +# +# if not washTypeLV: +# continue +# PlayerSuccess.DoAddSuccessProgress(curPlayer, succList[washType-1], 1, [washTypeLV]) return -- Gitblit v1.8.0