From 8068ba5ca1ea2aef5908e2e42604be27d6ffcf3c Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期四, 06 六月 2019 15:53:19 +0800
Subject: [PATCH] 7152 【后端】每次炼制灵根丹数量随机1-2

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/Item_Chests.py |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/Item_Chests.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/Item_Chests.py
index 4d1186c..8d37733 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/Item_Chests.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/Item_Chests.py
@@ -45,6 +45,7 @@
     costItemID = chestsIpyData.GetCostItemID()
     costItemCountTotal = chestsIpyData.GetCostItemCount() * useCnt
     costGoldTotal = chestsIpyData.GetCostGold() * useCnt
+    auctionItemCanSell = chestsIpyData.GetAucionItemCanSell()
     
     if costGoldTotal and not PlayerControl.HaveMoney(curPlayer, IPY_GameWorld.TYPE_Price_Gold_Money, costGoldTotal):
         return
@@ -63,8 +64,8 @@
     if not awardInfo:
         return
     needSpaceDict, jobAwardItemList, moneyType, moneyCount, notifyItemList, updOpenCount = awardInfo
-    GameWorld.DebugLog("    needSpaceDict=%s,jobAwardItemList=%s,moneyType=%s,moneyCount=%s,notifyItemList=%s,updOpenCount=%s" 
-                       % (needSpaceDict, jobAwardItemList, moneyType, moneyCount, notifyItemList, updOpenCount))
+    GameWorld.DebugLog("    needSpaceDict=%s,jobAwardItemList=%s,moneyType=%s,moneyCount=%s,notifyItemList=%s,updOpenCount=%s,auctionItemCanSell=%s" 
+                       % (needSpaceDict, jobAwardItemList, moneyType, moneyCount, notifyItemList, updOpenCount, auctionItemCanSell))
     
     for packType, needSpace in needSpaceDict.items():
         packSpace = ItemCommon.GetItemPackSpace(curPlayer, packType, needSpace)
@@ -91,7 +92,8 @@
     # 给奖励
     syncItemList = []
     for itemID, itemCount in jobAwardItemList:
-        curItem = ItemControler.GetOutPutItemObj(itemID, itemCount, False, curPlayer=curPlayer)
+        isAuctionItem = 1 if auctionItemCanSell and IpyGameDataPY.GetIpyGameDataNotLog("AuctionItem", itemID) else 0
+        curItem = ItemControler.GetOutPutItemObj(itemID, itemCount, isAuctionItem, curPlayer=curPlayer)
         if not curItem:
             GameWorld.ErrLog("宝箱创建奖励物品异常!chestsItemID=%s,useCnt=%s,itemID=%s,itemCount=%s,isBind=%s" 
                              % (chestsItemID, useCnt, itemID, itemCount, isBind), curPlayer.GetPlayerID())
@@ -205,6 +207,8 @@
     notifyItemList = []
     jobAwardItemList = []
     for itemID, itemCount in awardItemDict.items():
+        if not itemCount:
+            continue
         jobItemID = __GetChestsJobItem(chestsItemID, job, itemID, jobItemList)
         if not jobItemID:
             return

--
Gitblit v1.8.0