hxp
2019-11-21 3fa43daecc099f2701baec224a791ca09766cdf4
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipPlus.py
@@ -89,7 +89,8 @@
    if not plusIpyData:
        return
    costSilver = plusIpyData.GetCostCount()
    if not costSilver:
    costItemInfo = plusIpyData.GetCostItemInfo()
    if not costSilver and not costItemInfo:
        #GameWorld.DebugLog("已到强化最大等级! curPartPlusLV=%s" % curPartPlusLV, playerID)        
        return
    
@@ -104,16 +105,39 @@
                      % (curPartPlusLV, maxPlusLV, curEvolveLV), playerID)
        return
    
    if not PlayerControl.PayMoney(curPlayer, IPY_GameWorld.TYPE_Price_Silver_Money, costSilver, isNotify=False):
    if costSilver and not PlayerControl.HaveMoney(curPlayer, IPY_GameWorld.TYPE_Price_Silver_Money, costSilver):
        GameWorld.DebugLog("铜钱不足,无法强化! costSilver=%s" % costSilver)
        return
    
    totalExp = plusIpyData.GetTotalExp()
    curExp = ChEquip.GetEquipPartProficiency(curPlayer, packType, index) + plusIpyData.GetAddExp()
    costItemID, costItemCount = 0, 0
    if costItemInfo:
        costItemID, costItemCount = costItemInfo
        itemPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptItem)
        hasEnough, itemIndexList = ItemCommon.GetItem_FromPack_ByID(costItemID, itemPack, costItemCount)
        if not hasEnough:
            GameWorld.DebugLog("材料不足,无法强化! costItemID=%s, costItemCount=%s" % (costItemID, costItemCount))
            return
    if costSilver:
        PlayerControl.PayMoney(curPlayer, IPY_GameWorld.TYPE_Price_Silver_Money, costSilver, isNotify=False)
    
    if curExp >= totalExp:
        #升级
    if costItemID:
        ItemCommon.ReduceItem(curPlayer, itemPack, itemIndexList, costItemCount, True, ChConfig.ItemDel_EquipPlus)
    isLVUp = False
    curExp = 0
    addExp = plusIpyData.GetAddExp()
    totalExp = plusIpyData.GetTotalExp()
    if addExp and totalExp:
        curExp = ChEquip.GetEquipPartProficiency(curPlayer, packType, index) + addExp
        if curExp >= totalExp:
            curExp = curExp - totalExp
            isLVUp = True
    else:
        isLVUp = True
    if isLVUp:
        curPartPlusLV += 1
        curExp = curExp - totalExp
        __EquipMayaPlusChange(curPlayer, packType, curEquip, index, curPartPlusLV)
        
    DataRecordPack.DR_UpStarLVSuccess(curPlayer, curExp, curPartPlusLV)
@@ -198,7 +222,7 @@
            return
        delItemDict[tuple(indexList)] = itemCnt
    for itemIndexList, delCnt in delItemDict.items():
        ItemCommon.ReduceItem(curPlayer, itemPack, itemIndexList, delCnt, True, ChConfig.ItemDel_EquipPlusEvolve)
        ItemCommon.ReduceItem(curPlayer, itemPack, itemIndexList, delCnt, True, ChConfig.ItemDel_EquipPlus)
        
    ChEquip.SetEquipPartPlusEvolveLV(curPlayer, packType, equipPackindex, nextEvolveLV)
    DoLogic_OnEquipPartStarLVChange(curPlayer, packType, ItemCommon.GetItemClassLV(curEquip))