From c3f4da0363b139731e4c542507a486c335d44f20 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 07 三月 2019 15:26:22 +0800
Subject: [PATCH] 6332 【后端】【2.0】主要是拍品相关规则调整及背包优化(GivePlayerAppointItem 默认都给非拍品)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerReincarnation.py    |    2 
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFestivalLogin.py    |    2 
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py            |   54 ++++++++++++--------------
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGameEvent.py        |    2 
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/ShopItemManage.py |    2 
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerNewGuyCard.py       |    2 
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChItem.py                   |    8 ++--
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCostVIP.py          |    2 
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py          |    2 
 9 files changed, 36 insertions(+), 40 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/ShopItemManage.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/ShopItemManage.py
index f1551c7..6ffd14f 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/ShopItemManage.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/ShopItemManage.py
@@ -512,7 +512,7 @@
 #        else:
 #            realItemID = ItemControler.GetAppointItemRealID(itemID)
 #            for i in range(buyCount):
-#                ItemControler.GivePlayerAppointItem(curPlayer, itemID, isBind, True, True, event=["BuyShopItem", True, eventDataEx])
+#                ItemControler.GivePlayerAppointItem(curPlayer, itemID, False, event=["BuyShopItem", True, eventDataEx])
 #       
 #        if shopID in discountShopIDDict:
 #            notifyMark = discountShopIDDict[shopID]
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChItem.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChItem.py
index 6da9a22..fde6cee 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChItem.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChItem.py
@@ -1875,10 +1875,10 @@
     #===========================================================================
            
     # 套装
-    if equipData.isSuite:
-        curItem.SetIsSuite(equipData.isSuite)
-    if equipData.suiteLV:
-        curItem.SetUserAttr(ShareDefine.Def_IudetSuiteLV, equipData.suiteLV)
+    #if equipData.isSuite:
+    #    curItem.SetIsSuite(equipData.isSuite)
+    #if equipData.suiteLV:
+    #    curItem.SetUserAttr(ShareDefine.Def_IudetSuiteLV, equipData.suiteLV)
     # 物品来源
     if equipData.source:
         curItem.SetUserAttr(ShareDefine.Def_IudetSource, equipData.source)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py
index 8dd3087..75cc076 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py
@@ -2083,7 +2083,7 @@
     if GetAppointItemRealID(itemID):
         isOK = False
         for _ in xrange(itemCount):
-            if GivePlayerAppointItem(curPlayer, itemID, itemIsBind, showEff, showSysInfo, event):
+            if GivePlayerAppointItem(curPlayer, itemID, False, event):
                 isOK = True # 只要有成功的就返回成功,防止异常情况失败可能导致被刷
         return isOK
     
@@ -2108,42 +2108,37 @@
                                    showSysInfo, event)
 
 
-## 给玩家定制物品表物品\PyMapTable\AppointItemList.txt
-#  @param curPlayer 当前玩家
-#  @param index 表index
-#  @param isBind 是否绑定
-#  @param showEff 显示放入背包的特效
-#  @return 布尔值
-def GivePlayerAppointItem(curPlayer, index, isBind, showEff=False, showSysInfo=False, event=["", False, {}]):
-    itemDictData = GetAppointItemDictData(index, isBind)
+def GivePlayerAppointItem(curPlayer, appointID, isAuctionItem, event=["", False, {}]):
+    '''给玩家定制物品表物品,定制物品默认个数1
+    @param appointID 定制表ID
+    @param isAuctionItem 是否拍品
+    '''
+    itemDictData = GetAppointItemDictData(appointID, isAuctionItem)
     if not itemDictData:
         return False
+    
+    return GivePlayerEquip(curPlayer, itemDictData, event=event)
 
-    return GivePlayerEquip(curPlayer, itemDictData, showEff, showSysInfo=showSysInfo, event=event)
-
-## 获取定制表物品数据
-#  @param index 表index
-#  @param isAuctionItem 是否拍品
-#  @return ItemDictData
-def GetAppointItemDictData(index, isAuctionItem):
-    itemID = GetAppointItemRealID(index)
+def GetAppointItemDictData(appointID, isAuctionItem):
+    '''获取定制表物品数据,定制物品默认个数1
+    @param appointID 定制表ID
+    @param isAuctionItem 是否拍品
+    '''
+    itemID = GetAppointItemRealID(appointID)
     if not itemID:
         return {}
-    ipyData = IpyGameDataPY.GetIpyGameData("AppointItem", index)
+    ipyData = IpyGameDataPY.GetIpyGameData("AppointItem", appointID)
     if not ipyData:
-        GameWorld.ErrLog("GetAppointItemDictData() Index=%s not data" % (index))
         return {}
     itemDictData = {}
    
     itemDictData['legendAttrID'] = ipyData.GetLegendAttrID()
     itemDictData['legendAttrValue'] = ipyData.GetLegendAttrValue()
-    itemDictData['SuiteLV'] = ipyData.GetSuiteLV()
+    #itemDictData['SuiteLV'] = ipyData.GetSuiteLV()
     itemDictData['ItemID'] = itemID
     itemDictData['CancelUseLimit'] = ipyData.GetCancelUseLimit()
     
-    # 设置是否绑定
-    isBind =  1 if not isAuctionItem else 0
-    itemDictData['IsBind'] = isBind
+    itemDictData['IsAuctionItem'] = isAuctionItem
     
     #装备绝版属性,随等级变化
     itemDictData['OutOfPrintAttrID'] = ipyData.GetOutOfPrintAttr()
@@ -2184,7 +2179,8 @@
         return
     
     itemID = int(itemData.get('ItemID', 0))
-    equipItem = ItemCommon.CreateSingleItem(itemID)
+    isAuctionItem = int(itemData.get('IsAuctionItem', 0))
+    equipItem = ItemCommon.CreateSingleItem(itemID, isAuctionItem=isAuctionItem)
     if not equipItem:
         return
     
@@ -2193,11 +2189,11 @@
     #tmpEquipData.starLV = int(itemData.get('StarLV', '0'))
     #tmpEquipData.holeCnt = int(itemData.get('HoleCount', '0'))
     #tmpEquipData.stoneData = eval(itemData.get('StoneData', '[]'))
-    tmpEquipData.isBind = int(itemData.get('IsBind', '0'))
-    tmpEquipData.isSuite = int(itemData.get('IsSuit', '0'))
-    tmpEquipData.suiteLV = int(itemData.get('SuiteLV', '0'))
-    if tmpEquipData.suiteLV:
-        tmpEquipData.isSuite = 1
+    tmpEquipData.isBind = 1 if not isAuctionItem else 0
+    #tmpEquipData.isSuite = int(itemData.get('IsSuit', '0'))
+    #tmpEquipData.suiteLV = int(itemData.get('SuiteLV', '0'))
+    #if tmpEquipData.suiteLV:
+    #    tmpEquipData.isSuite = 1
     tmpEquipData.source = int(itemData.get('Source', str(ShareDefine.Item_Source_Unkown)))
     
     tmpEquipData.legendAttrIDList = itemData.get('legendAttrID', [])
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
index 41e41ba..1a6d2ea 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
@@ -386,7 +386,7 @@
         
         if ItemControler.GetAppointItemRealID(itemID):
             # 定制物品转化为物品信息字典
-            appointItemObj = ItemControler.GetItemByData(ItemControler.GetAppointItemDictData(itemID, isBind))
+            appointItemObj = ItemControler.GetItemByData(ItemControler.GetAppointItemDictData(itemID, False))
             if not appointItemObj:
                 GameWorld.ErrLog("邮件定制物品转化失败!itemID, itemCnt, isBind" % (itemID, itemCnt, isBind))
                 continue
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCostVIP.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCostVIP.py
index c8aa163..18b5148 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCostVIP.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCostVIP.py
@@ -324,7 +324,7 @@
                 giveFailList.append(itemInfo)
             
         elif itemType == Item_Type_Appoint:
-            if not ItemControler.GivePlayerAppointItem(curPlayer, itemId, itemIsBind, True, showSysInfo=True):
+            if not ItemControler.GivePlayerAppointItem(curPlayer, itemId, False):
                 giveFailList.append(itemInfo)
                 
     if giveFailList:
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFestivalLogin.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFestivalLogin.py
index e7ab629..bb0b066 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFestivalLogin.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFestivalLogin.py
@@ -252,7 +252,7 @@
             ItemControler.GivePlayerItem(curPlayer, itemId, itemNum, 0, [IPY_GameWorld.rptItem], True)
             
         elif itemType == Item_Type_Appoint:
-            ItemControler.GivePlayerAppointItem(curPlayer, itemId, itemIsBind, True)
+            ItemControler.GivePlayerAppointItem(curPlayer, itemId, False)
 
 ## 奖励物品列表
 #  @param curPlayer
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGameEvent.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGameEvent.py
index 77386e2..14b960a 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGameEvent.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGameEvent.py
@@ -452,7 +452,7 @@
         ItemControler.GivePlayerItem(curPlayer, itemID, itemCnt, 0, 
                                      [IPY_GameWorld.rptItem, IPY_GameWorld.rptAnyWhere])
     elif itemType == 1:
-        ItemControler.GivePlayerAppointItem(curPlayer, itemID, isBind)
+        ItemControler.GivePlayerAppointItem(curPlayer, itemID, False)
     
     else:
         GameWorld.ErrLog("钓鱼奖励类型不支持itemType=%s" % itemType, curPlayer.GetPlayerID())
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerNewGuyCard.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerNewGuyCard.py
index a3ff786..4cf1eb7 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerNewGuyCard.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerNewGuyCard.py
@@ -542,7 +542,7 @@
         isAppoint = itemInfo[3] if len(itemInfo) > 3 else 0
         
         if isAppoint:
-            isOK = ItemControler.GivePlayerAppointItem(curPlayer, itemID, itemBind, True, True)
+            isOK = ItemControler.GivePlayerAppointItem(curPlayer, itemID, False)
         else:
             isOK = ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, 0, [IPY_GameWorld.rptItem],
                                                 True, showSysInfo=True)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerReincarnation.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerReincarnation.py
index aed7f19..154ebf4 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerReincarnation.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerReincarnation.py
@@ -267,7 +267,7 @@
             continue
         itemID, itemCount, isBind, isAppoint = awardItem
         if isAppoint:
-            ItemControler.GivePlayerAppointItem(curPlayer, itemID, isBind, True, True)
+            ItemControler.GivePlayerAppointItem(curPlayer, itemID, False)
         else:
             ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, 0, [IPY_GameWorld.rptItem], True, showSysInfo=True)
     

--
Gitblit v1.8.0