From de55e89b8004896e736da4f8d63a8f974d9fc298 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期一, 20 八月 2018 20:12:31 +0800
Subject: [PATCH] fix:挂机表
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTreasure.py | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTreasure.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTreasure.py
index e72b2a5..375083d 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTreasure.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTreasure.py
@@ -113,14 +113,16 @@
# 寻宝道具, 目前默认消耗1个
elif costType == 2:
costItemList = IpyGameDataPY.GetFuncEvalCfg(TreasureSet1, 3) # 消耗道具物品ID列表
- costItemID = costItemList[treasureIndex]
- if not costItemID:
+ if not costItemList:
GameWorld.ErrLog("该寻宝类型索引不支持消耗道具寻宝!treasureType=%s,treasureIndex=%s" % (treasureType, treasureIndex), playerID)
return
-
- costItem = ItemCommon.FindItemInPackByItemID(curPlayer, costItemID, IPY_GameWorld.rptItem)
- if not costItem:
- GameWorld.DebugLog("寻宝消耗道具不足!costItemID=%s" % (costItemID), playerID)
+ costItemID, costItemCount = costItemList[treasureIndex]
+ if not costItemID or not costItemCount:
+ return
+ costItemIndexList, bindCnt, unBindCnt = ItemCommon.GetPackItemBindStateIndexInfo(curPlayer, costItemID)
+ if bindCnt + unBindCnt < costItemCount:
+ GameWorld.DebugLog("寻宝消耗道具不足!costItemID=%s,costItemCount=%s,bindCnt=%s,unBindCnt=%s"
+ % (costItemID, costItemCount, bindCnt, unBindCnt), playerID)
return
# 仙玉寻宝
@@ -296,8 +298,8 @@
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TreasureFreeTime % (treasureType, treasureIndex), curTime)
GameWorld.DebugLog("消耗免费次数,更新免费CD计算时间: %s" % curTime, playerID)
elif costType == 2:
- ItemCommon.DelItem(curPlayer, costItem, 1, True, ChConfig.ItemDel_Treasure)
- GameWorld.DebugLog("扣除寻宝道具,costItemID=%s" % costItemID, playerID)
+ ItemCommon.DelCostItemByBind(curPlayer, costItemIndexList, bindCnt, unBindCnt, costItemCount, ChConfig.ItemDel_Treasure)
+ GameWorld.DebugLog("扣除寻宝道具,costItemID=%s,costItemCount=%s" % (costItemID, costItemCount), playerID)
else:
infoDict = {"TreasureType":treasureType, "TreasureIndex":treasureIndex}
PlayerControl.PayMoney(curPlayer, IPY_GameWorld.TYPE_Price_Gold_Money, costGold, ChConfig.Def_Cost_Treasure, infoDict)
--
Gitblit v1.8.0