From c98b8d50ba3d7a4a8ecd7952674c09ea1161e08b Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期四, 31 一月 2019 10:04:53 +0800
Subject: [PATCH] 6105 【后端】【1.5.200】诛仙宝石开发(升级修改)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipStone.py | 13 ++++++-------
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py | 4 ++--
2 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipStone.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipStone.py
index 94ead76..b9bd568 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipStone.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipStone.py
@@ -329,12 +329,7 @@
level = curStoneEff.GetEffectValue(1)
upgradeStoneID = curStoneEff.GetEffectValue(2)
- stoneTypeItemIDDict = IpyGameDataPY.GetFuncEvalCfg("GemUpCostFormula", 1)
- GameWorld.DebugLog("stoneEffType=%s,stoneTypeItemIDDict=%s,level=%s,upgradeStoneID=%s"
- % (stoneEffType, stoneTypeItemIDDict, level, upgradeStoneID))
- if stoneEffType not in stoneTypeItemIDDict:
- return
- stoneTypeItemID = stoneTypeItemIDDict[stoneEffType]
+ GameWorld.DebugLog("stoneEffType=%s,level=%s,upgradeStoneID=%s" % (stoneEffType, level, upgradeStoneID))
if not upgradeStoneID:
GameWorld.Log("该宝石已是最大级,不能升级!stoneIndex=%s,stoneItemID=%s,curEffID=%s,upgradeStoneID=%s"
@@ -344,6 +339,10 @@
if not needCount:
return
if upWay == 0: #仙玉
+ stoneTypeItemIDDict = IpyGameDataPY.GetFuncEvalCfg("GemUpCostFormula", 1)
+ if stoneEffType not in stoneTypeItemIDDict:
+ return
+ stoneTypeItemID = stoneTypeItemIDDict[stoneEffType]
unitPrice = ItemCommon.GetShopItemPrice(stoneTypeItemID, IPY_GameWorld.TYPE_Price_Gold_Money)
if not unitPrice:
return
@@ -357,7 +356,7 @@
return
else:
#同级宝石
- costItemIndexList, bindCnt, unBindCnt = ItemCommon.GetPackItemBindStateIndexInfo(curPlayer, stoneItemID)
+ costItemIndexList, bindCnt, unBindCnt = ItemCommon.GetPackItemBindStateIndexInfo(curPlayer, stoneItemID, packType=stonePackType)
if bindCnt + unBindCnt < needCount-1:
GameWorld.DebugLog("同级宝石不足 %s!" % (needCount-1))
return
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 01897b1..ca018ff 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
@@ -1398,7 +1398,7 @@
return hasEnough, itemIndexList, findItemIsBind, needCnt
-def GetPackItemBindStateIndexInfo(curPlayer, itemID, needCount=0):
+def GetPackItemBindStateIndexInfo(curPlayer, itemID, needCount=0, packType=IPY_GameWorld.rptItem):
''' 获取背包消耗道具绑定及未绑定索引情况
@param needCount: 所需个数, 默认绑定优先,当找到已经足够的个数后不再遍历,减少无用遍历
@return: 可消耗物品列表[[绑定物品索引], [不绑定物品索引]], 绑定个数, 未绑定个数
@@ -1406,7 +1406,7 @@
consumeItemIndexList = [[], []] # 可消耗物品列表[[绑定物品索引], [不绑定物品索引]]
bindCnt, unBindCnt = 0, 0
- curPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptItem)
+ curPack = curPlayer.GetItemManager().GetPack(packType)
for i in range(0, curPack.GetCount()):
curItem = curPack.GetAt(i)
if not curItem:
--
Gitblit v1.8.0