From ca4de46e0beb47d7ec1dfa3817f59e2ba885bf76 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 16 十一月 2020 19:52:47 +0800
Subject: [PATCH] 4862 【主干】【长尾】【BT】宝箱支持部分拍品、非拍品配置

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/Item_Chests.py |    8 +++++---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py            |    7 +++++--
 PySysDB/PySysDBPY.h                                                                             |    1 +
 3 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/PySysDB/PySysDBPY.h b/PySysDB/PySysDBPY.h
index d088b4f..16f8175 100644
--- a/PySysDB/PySysDBPY.h
+++ b/PySysDB/PySysDBPY.h
@@ -1132,6 +1132,7 @@
 	BYTE		ShowType;		//前端表现类型0-无表现, >0有表现需同步结果,具体类型前端自定义
 	BYTE		IsBind;			//开出物品是否绑定
 	BYTE		AucionItemCanSell;	//开出拍品可否上架集市
+	list		AucionItemDiffSellIDList;	//可否上架差异拍品ID列表,即可上架代表不可上架的拍品ID列表,不可上架代表可上架的拍品ID列表
 };
 
 //宝箱表产出表
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
index 4be0d75..960ee3b 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
@@ -917,6 +917,7 @@
                         ("BYTE", "ShowType", 0),
                         ("BYTE", "IsBind", 0),
                         ("BYTE", "AucionItemCanSell", 0),
+                        ("list", "AucionItemDiffSellIDList", 0),
                         ),
 
                 "ChestsAward":(
@@ -3461,7 +3462,8 @@
         self.CostGold = 0
         self.ShowType = 0
         self.IsBind = 0
-        self.AucionItemCanSell = 0
+        self.AucionItemCanSell = 0
+        self.AucionItemDiffSellIDList = []
         return
         
     def GetChestsItemID(self): return self.ChestsItemID # 宝箱物品ID
@@ -3470,7 +3472,8 @@
     def GetCostGold(self): return self.CostGold # 消耗仙玉
     def GetShowType(self): return self.ShowType # 前端表现类型0-无表现, >0有表现需同步结果,具体类型前端自定义
     def GetIsBind(self): return self.IsBind # 开出物品是否绑定
-    def GetAucionItemCanSell(self): return self.AucionItemCanSell # 开出拍品可否上架集市
+    def GetAucionItemCanSell(self): return self.AucionItemCanSell # 开出拍品可否上架集市
+    def GetAucionItemDiffSellIDList(self): return self.AucionItemDiffSellIDList # 可否上架差异拍品ID列表,即可上架代表不可上架的拍品ID列表,不可上架代表可上架的拍品ID列表
 
 # 宝箱表产出表
 class IPY_ChestsAward():
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 27a7a75..878c36c 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
@@ -49,6 +49,7 @@
     costItemCountTotal = chestsIpyData.GetCostItemCount() * useCnt
     costGoldTotal = chestsIpyData.GetCostGold() * useCnt
     auctionItemCanSell = chestsIpyData.GetAucionItemCanSell()
+    aucionItemDiffSellIDList = chestsIpyData.GetAucionItemDiffSellIDList()
     
     if costGoldTotal and not PlayerControl.HaveMoney(curPlayer, IPY_GameWorld.TYPE_Price_Gold_Money, costGoldTotal):
         return
@@ -67,8 +68,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,auctionItemCanSell=%s" 
-                       % (needSpaceDict, jobAwardItemList, moneyType, moneyCount, notifyItemList, updOpenCount, auctionItemCanSell))
+    GameWorld.DebugLog("    needSpaceDict=%s,jobAwardItemList=%s,moneyType=%s,moneyCount=%s,notifyItemList=%s,updOpenCount=%s,auctionItemCanSell=%s,aucionItemDiffSellIDList=%s" 
+                       % (needSpaceDict, jobAwardItemList, moneyType, moneyCount, notifyItemList, updOpenCount, auctionItemCanSell, aucionItemDiffSellIDList))
     
     for packType, needSpace in needSpaceDict.items():
         packSpace = ItemCommon.GetItemPackSpace(curPlayer, packType, needSpace)
@@ -95,7 +96,8 @@
     # 给奖励
     syncItemList = []
     for itemID, itemCount in jobAwardItemList:
-        isAuctionItem = 1 if auctionItemCanSell and IpyGameDataPY.GetIpyGameDataNotLog("AuctionItem", itemID) else 0
+        canSell = (not auctionItemCanSell) if itemID in aucionItemDiffSellIDList else auctionItemCanSell
+        isAuctionItem = 1 if canSell 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" 

--
Gitblit v1.8.0