hxp
2019-05-28 cce3ffb8fc917a82db16b7c82afc7d82485c55bd
6986 【2.0】【后端】宝箱支持开出可上架拍卖行的拍品
3个文件已修改
14 ■■■■ 已修改文件
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 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
PySysDB/PySysDBPY.h
@@ -1043,6 +1043,7 @@
    WORD        CostGold;        //消耗仙玉
    BYTE        ShowType;        //前端表现类型0-无表现, >0有表现需同步结果,具体类型前端自定义
    BYTE        IsBind;            //开出物品是否绑定
    BYTE        AucionItemCanSell;    //开出拍品可否上架集市
};
//宝箱表产出表
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
@@ -841,6 +841,7 @@
                        ("WORD", "CostGold", 0),
                        ("BYTE", "ShowType", 0),
                        ("BYTE", "IsBind", 0),
                        ("BYTE", "AucionItemCanSell", 0),
                        ),
                "ChestsAward":(
@@ -3150,6 +3151,7 @@
        self.CostGold = 0
        self.ShowType = 0
        self.IsBind = 0
        self.AucionItemCanSell = 0
        return
        
    def GetChestsItemID(self): return self.ChestsItemID # 宝箱物品ID
@@ -3158,6 +3160,7 @@
    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 # 开出拍品可否上架集市
# 宝箱表产出表
class IPY_ChestsAward():
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