hxp
2019-11-21 3fa43daecc099f2701baec224a791ca09766cdf4
8341 【恺英】【后端】强化进化系统优化(强化支持消耗材料)
4个文件已修改
46 ■■■■ 已修改文件
PySysDB/PySysDBPY.h 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipPlus.py 38 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
PySysDB/PySysDBPY.h
@@ -120,6 +120,7 @@
    list        AttrType;    //属性类型
    list        AttrValue;    //属性值
    DWORD        CostCount;    //消耗铜钱
    list        CostItemInfo;    //消耗物品材料及个数 [itemID, itemCount]
    DWORD        AddExp;    //提升熟练度值
    DWORD        TotalExp;    //升级所需熟练度总值
};
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -4931,7 +4931,7 @@
ItemDel_CoatDecompose, # 时装分解
ItemDel_EquipEvolve, # 装备进阶
ItemDel_EquipStarUp, # 装备升星
ItemDel_EquipPlusEvolve, # 装备强化进化
ItemDel_EquipPlus, # 装备强化进化
ItemDel_LingQiEquipBreak, # 灵器突破
ItemDel_HorsePetAwake, # 骑宠觉醒 
) = range(2000, 2000 + 42)
@@ -4977,7 +4977,7 @@
                   ItemDel_CoatDecompose:"CoatDecompose",
                   ItemDel_EquipEvolve:"EquipEvolve",
                   ItemDel_EquipStarUp:"EquipStarUp",
                   ItemDel_EquipPlusEvolve:"EquipPlusEvolve",
                   ItemDel_EquipPlus:"EquipPlus",
                   ItemDel_LingQiEquipBreak:"LingQiEquipBreak",
                   ItemDel_HorsePetAwake:"HorsePetAwake",
                   }
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 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:
        #升级
        curPartPlusLV += 1
        curExp = curExp - totalExp
            isLVUp = True
    else:
        isLVUp = True
    if isLVUp:
        curPartPlusLV += 1
        __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))
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
@@ -125,6 +125,7 @@
                        ("list", "AttrType", 0),
                        ("list", "AttrValue", 0),
                        ("DWORD", "CostCount", 0),
                        ("list", "CostItemInfo", 0),
                        ("DWORD", "AddExp", 0),
                        ("DWORD", "TotalExp", 0),
                        ),
@@ -1736,6 +1737,7 @@
        self.AttrType = []
        self.AttrValue = []
        self.CostCount = 0
        self.CostItemInfo = []
        self.AddExp = 0
        self.TotalExp = 0
        return
@@ -1745,6 +1747,7 @@
    def GetAttrType(self): return self.AttrType # 属性类型
    def GetAttrValue(self): return self.AttrValue # 属性值
    def GetCostCount(self): return self.CostCount # 消耗铜钱
    def GetCostItemInfo(self): return self.CostItemInfo # 消耗物品材料及个数 [itemID, itemCount]
    def GetAddExp(self): return self.AddExp # 提升熟练度值
    def GetTotalExp(self): return self.TotalExp # 升级所需熟练度总值