hxp
2020-11-16 ca4de46e0beb47d7ec1dfa3817f59e2ba885bf76
4862 【主干】【长尾】【BT】宝箱支持部分拍品、非拍品配置
3个文件已修改
12 ■■■■ 已修改文件
PySysDB/PySysDBPY.h 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/Item_Chests.py 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
PySysDB/PySysDBPY.h
@@ -1132,6 +1132,7 @@
    BYTE        ShowType;        //前端表现类型0-无表现, >0有表现需同步结果,具体类型前端自定义
    BYTE        IsBind;            //开出物品是否绑定
    BYTE        AucionItemCanSell;    //开出拍品可否上架集市
    list        AucionItemDiffSellIDList;    //可否上架差异拍品ID列表,即可上架代表不可上架的拍品ID列表,不可上架代表可上架的拍品ID列表
};
//宝箱表产出表
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":(
@@ -3462,6 +3463,7 @@
        self.ShowType = 0
        self.IsBind = 0
        self.AucionItemCanSell = 0
        self.AucionItemDiffSellIDList = []
        return
        
    def GetChestsItemID(self): return self.ChestsItemID # 宝箱物品ID
@@ -3471,6 +3473,7 @@
    def GetShowType(self): return self.ShowType # 前端表现类型0-无表现, >0有表现需同步结果,具体类型前端自定义
    def GetIsBind(self): return self.IsBind # 开出物品是否绑定
    def GetAucionItemCanSell(self): return self.AucionItemCanSell # 开出拍品可否上架集市
    def GetAucionItemDiffSellIDList(self): return self.AucionItemDiffSellIDList # 可否上架差异拍品ID列表,即可上架代表不可上架的拍品ID列表,不可上架代表可上架的拍品ID列表
# 宝箱表产出表
class IPY_ChestsAward():
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"