hxp
2019-05-09 751709e3494aad919e4313c26066be24e2d4bf8a
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipWash.py
@@ -28,7 +28,6 @@
import ItemCommon
import ChConfig
import ChEquip
import EventShell
import random
@@ -109,11 +108,11 @@
        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)
@@ -206,7 +205,7 @@
        return
    
    preWashData = None # 上一洗练等级数据
    if washLV > 1:
    if washLV > 0:
        preWashData = GetEquipWashData(washType, washLV - 1)
        if not preWashData:
            GameWorld.ErrLog("找不到上一级洗练数据,无法洗练!preWashLV=%s" % (washLV - 1))
@@ -303,7 +302,7 @@
        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)
@@ -311,7 +310,7 @@
    washType = GetEquipWashType(equipPlace)
    if washType is None:
        return
    if maxWashLV < 1:
    if maxWashLV < 0:
        return
    washData = GetEquipWashData(washType, washLV)
    if not washData:
@@ -360,8 +359,7 @@
        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())
    
    # 洗练广播
@@ -384,7 +382,7 @@
    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()
@@ -415,7 +413,7 @@
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)
@@ -441,7 +439,7 @@
#        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: