From 476fb6e578f29c09d558187deeb215afe2e5bf59 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期四, 14 三月 2019 11:42:28 +0800
Subject: [PATCH] 6307 【后端】【2.0】多套装备开发单(优化代码)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipWash.py |   17 +++--------------
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py          |   30 +++++++-----------------------
 2 files changed, 10 insertions(+), 37 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 2177e5c..60811e1 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
@@ -54,21 +54,10 @@
         return 0
     
     equipStar = ChEquip.GetEquipPartStarByRank(curPlayer, equipPackindex, curEquip)
-    ipyData = IpyGameDataPY.GetIpyGameDataNotLog("ItemWashMax", washType, equipStar)
-    if ipyData:
-        return ipyData.GetLevelMax()
-    
-    ipyDataList = IpyGameDataPY.GetIpyGameDataByCondition('ItemWashMax', {'Type':washType}, True, False)
-    if not ipyDataList:
+    ipyData = IpyGameDataPY.InterpolationSearch('ItemWashMax', 'Star', equipStar, {'Type':washType})
+    if not ipyData:
         return 0
-    maxStar = ipyDataList[-1].GetStar()
-    if equipStar > maxStar:
-        return ipyDataList[-1].GetLevelMax()
-    findMax = 0
-    for ipyData in ipyDataList:
-        if equipStar >= ipyData.GetStar():
-            findMax = ipyData.GetLevelMax()
-    return findMax
+    return ipyData.GetLevelMax()
     
     
 
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py
index cb736bb..997069e 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py
@@ -1929,21 +1929,10 @@
     if not findType:
         return 0
     equipStar = ChEquip.GetEquipPartStarByRank(curPlayer, equipPackindex, curItem)
-    ipyData = IpyGameDataPY.GetIpyGameDataNotLog("ItemPlusMax", findType, equipStar)
-    if ipyData:
-        return ipyData.GetLevelMax()
-    
-    ipyDataList = IpyGameDataPY.GetIpyGameDataByCondition('ItemPlusMax', {'Type':findType}, True, False)
-    if not ipyDataList:
+    ipyData = IpyGameDataPY.InterpolationSearch('ItemPlusMax', 'Star', equipStar, {'Type':findType})
+    if not ipyData:
         return 0
-    maxStar = ipyDataList[-1].GetStar()
-    if equipStar > maxStar:
-        return ipyDataList[-1].GetLevelMax()
-    findMax = 0
-    for ipyData in ipyDataList:
-        if equipStar >= ipyData.GetStar():
-            findMax = ipyData.GetLevelMax()
-    return findMax
+    return ipyData.GetLevelMax()
     
 
 ## 获取物品最高强化进化等级
@@ -1953,16 +1942,11 @@
     packType = IPY_GameWorld.rptEquip
     curPlusLV = ChEquip.GetEquipPartPlusLVByRank(curPlayer, packType, equipPackindex, curItem)
     equipPlace = curItem.GetEquipPlace()
-    ipyDataList = IpyGameDataPY.GetIpyGameDataByCondition('EquipPlusEvolve', {'EquipPlace':equipPlace}, True)
-    if not ipyDataList:
+    ipyData = IpyGameDataPY.InterpolationSearch('EquipPlusEvolve', 'NeedPlusLV', curPlusLV, {'EquipPlace':equipPlace})
+    if not ipyData:
         return 0
-    maxEvolvelv = 0
-    for ipyData in ipyDataList:
-        if curPlusLV >= ipyData.GetNeedPlusLV():
-            maxEvolvelv = ipyData.GetEvolveLV()
-        else:
-            break
-    return maxEvolvelv
+    return ipyData.GetEvolveLV()
+    
 
 ## 获取物品最高星数
 #  @param itemType: 物品类型

--
Gitblit v1.8.0