From 0f22af9f3a0093e8db2ae2af40d3ea0f745dcd9b Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 13 三月 2019 11:22:38 +0800
Subject: [PATCH] 6332 【后端】【2.0】主要是拍品相关规则调整及背包优化(是否绑定改为是否拍品)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChEquip.py | 4 ++++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py | 15 ++++++---------
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py | 5 ++---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/AddLegendAttr.py | 2 +-
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChItem.py | 4 ++--
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py | 7 +++----
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerAuctionHouse.py | 6 +++---
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerCompensation.py | 2 +-
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCompensationTube.py | 4 ++--
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py | 2 +-
10 files changed, 25 insertions(+), 26 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerCompensation.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerCompensation.py
index 5278138..75bf6eb 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerCompensation.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerCompensation.py
@@ -77,7 +77,7 @@
curItemData.ItemID = curItemDict['ItemID']
curItemData.Count = curItemDict['Count']
#curItemData.IsBind = curItemDict.get('IsBind',0)
- curItemData.IsBind = 1 if not curItemDict.get('IsAuctionItem',0) else 0
+ curItemData.IsBind = curItemDict.get('IsAuctionItem',0)
curItemData.UserData = curItemDict.get('UserData', '')
return curItemData
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/AddLegendAttr.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/AddLegendAttr.py
index 62df057..547a570 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/AddLegendAttr.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/AddLegendAttr.py
@@ -41,7 +41,7 @@
GameWorld.DebugAnswer(curPlayer, "非装备无法获得传奇属性!")
return
- if not curItem.GetIsBind():
+ if curItem.GetIsBind():
GameWorld.DebugAnswer(curPlayer, "拍品无法生成传奇属性!")
return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py
index 4e91a7f..5cc1f28 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py
@@ -601,7 +601,7 @@
continue
itemDict['ItemID'] = itemInfo.GetItemTypeID()
itemDict['Count'] = itemInfo.GetCount()
- itemDict['IsAuctionItem'] = 0 if itemInfo.GetIsBind() else 1
+ itemDict['IsAuctionItem'] = itemInfo.GetIsBind()
#itemDict['IsSuite'] = int(itemInfo.GetIsSuite())
itemDict['UserData'] = itemInfo.GetUserData()
jsonItemList.append(itemDict)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChEquip.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChEquip.py
index 16da2fa..58a5a3a 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChEquip.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChEquip.py
@@ -69,6 +69,10 @@
return False
playerItemControl = ItemControler.PlayerItemControler(curPlayer)
+ if curItem.GetIsBind():
+ GameWorld.DebugLog("拍品无法穿戴!")
+ return False
+
#---验证是否可以换这件装备---
if not ItemCommon.CheckItemCanUse(curItem):
return False
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 8288db0..4e52c5d 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChItem.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChItem.py
@@ -1531,7 +1531,7 @@
return
# 使用拍品
- if not curItem.GetIsBind():
+ if curItem.GetIsBind():
DoLogic_PlayerUseAuctionItem(curPlayer, curItem)
return
@@ -1548,7 +1548,7 @@
playerID = curPlayer.GetPlayerID()
itemID = curItem.GetItemTypeID()
- curItem.SetIsBind(1) # 设置为非拍品
+ curItem.SetIsBind(0) # 设置为非拍品
curItem.ClearUserAttr(ShareDefine.Def_IudetAuctionItemCreateTime)
GameWorld.DebugLog("玩家使用拍品: itemID=%s" % (itemID), playerID)
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 08d7b47..e0a3777 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py
@@ -320,7 +320,7 @@
# @remarks 函数详细说明.
def CanPackItemByItemType(srcItemID, srcItemIsBind, destItemID, destItemIsBind):
## 拍品项目,只有非拍品可堆叠,即绑定物品
- if srcItemID == destItemID and srcItemIsBind == destItemIsBind and srcItemIsBind:
+ if srcItemID == destItemID and srcItemIsBind == destItemIsBind and not srcItemIsBind:
return True
return False
@@ -1115,8 +1115,7 @@
packIndex = ChConfig.GetItemPackType(curItemData.GetType(), packIndex)
tagItemCount = GetItemCount(tagItem)
- isBind = tagItem.GetIsBind()
- isAuctionItem = not isBind
+ isAuctionItem = tagItem.GetIsBind()
if not self.CanPutInItem(packIndex, tagItem.GetItemTypeID(), tagItemCount, isAuctionItem, defaultPile):
GameWorld.DebugLog("背包满,不能放入物品 count = %d"%GetItemCount(tagItem))
tagItem.Clear()
@@ -1364,7 +1363,6 @@
GameWorld.Log("找不到ItemID = %d" % curItemID)
return False, 0
- isBind = True
if curItemID in ChConfig.Def_TransformItemIDList:
# 货币直接转换的物品如果是放入背包的则直接转化,无需暂用格子
if packIndex == IPY_GameWorld.rptItem:
@@ -1373,7 +1371,6 @@
elif isAuctionItem:
maxPackCount = curItemCount
defaultPile = False # 新放入的拍品只能放空位置,所以不判断堆叠
- isBind = False
else:
maxPackCount = curItemData.GetPackCount()
@@ -1413,7 +1410,7 @@
if item.GetIsLocked():
continue
- if (CanPackItemByItemType(item.GetItemTypeID(), item.GetIsBind(), curItemID, isBind) and
+ if (CanPackItemByItemType(item.GetItemTypeID(), item.GetIsBind(), curItemID, isAuctionItem) and
maxPackCount > GetItemCount(item)):
#该物品锁定不执行==============================================
#可堆叠
@@ -1546,7 +1543,7 @@
#curItemGUID = curItem.GetGUID()
curItemCount = curItem.GetCount()
#curItemIsBind = curItem.GetIsBind()
- isAuctionItem = 0 if curItem.GetIsBind() else 1
+ isAuctionItem = curItem.GetIsBind()
#toPackIndex = ChConfig.GetItemPackType(curItem.GetType(), toPackIndex)
# 常规物品转移到虚拟符印背包
@@ -2194,7 +2191,7 @@
#tmpEquipData.starLV = int(itemData.get('StarLV', '0'))
#tmpEquipData.holeCnt = int(itemData.get('HoleCount', '0'))
#tmpEquipData.stoneData = eval(itemData.get('StoneData', '[]'))
- tmpEquipData.isBind = 1 if not isAuctionItem else 0
+ tmpEquipData.isBind = isAuctionItem
#tmpEquipData.isSuite = int(itemData.get('IsSuit', '0'))
#tmpEquipData.suiteLV = int(itemData.get('SuiteLV', '0'))
#if tmpEquipData.suiteLV:
@@ -2390,7 +2387,7 @@
'''获取生成到装备上的传奇属性
@return: None 或者 [[传奇属性效果ID列表], [属性值列表]]
'''
- if not curItem.GetIsBind():
+ if curItem.GetIsBind():
#GameWorld.DebugLog("拍品无法生成传奇属性!")
return
itemID = curItem.GetItemTypeID()
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py
index 638c549..cb736bb 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py
@@ -376,8 +376,7 @@
if isAuctionItem:
curSingleItem.SetUserAttr(ShareDefine.Def_IudetAuctionItemCreateTime, int(time.time()))
- else:
- curSingleItem.SetIsBind(1)
+ curSingleItem.SetIsBind(1)
ItemControler.SetItemCount(curSingleItem, itemCount)
@@ -2015,7 +2014,7 @@
addItemDict = {}
addItemDict['ItemID'] = curItem.GetItemTypeID()
addItemDict['Count'] = curItem.GetCount()
- addItemDict['IsAuctionItem'] = 0 if curItem.GetIsBind() else 1
+ addItemDict['IsAuctionItem'] = curItem.GetIsBind()
#addItemDict['IsBind'] = int(curItem.GetIsBind())
#addItemDict['EquipGS'] = GetEquipGearScore(curItem)
#addItemDict['ItemStarLV'] = curItem.GetItemStarLV()
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
index db1f752..61b2437 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
@@ -5204,11 +5204,10 @@
#self.__SetItemProtect(curMapItem, dropType, ownerID)
return
- def __CreateDropItem(self, curNPC, itemID, count, isBind, dropPlayer):
+ def __CreateDropItem(self, curNPC, itemID, count, isAuctionItem, dropPlayer):
## 创建掉落的物品
- if not isBind and not IpyGameDataPY.GetIpyGameDataNotLog("AuctionItem", itemID):
- isBind = 1
- isAuctionItem = not isBind
+ if isAuctionItem and not IpyGameDataPY.GetIpyGameDataNotLog("AuctionItem", itemID):
+ isAuctionItem = 0
curItem = ItemControler.GetOutPutItemObj(itemID, count, isAuctionItem, curPlayer=dropPlayer)
if not curItem:
return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerAuctionHouse.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerAuctionHouse.py
index f0e4de5..bff6cc4 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerAuctionHouse.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerAuctionHouse.py
@@ -43,7 +43,7 @@
curItem = playerPack.GetAt(itemIndex)
if curItem.IsEmpty():
return
- if curItem.GetIsBind():
+ if not curItem.GetIsBind():
GameWorld.Log("非拍品,绑定无法上架!", playerID)
return
itemGUID = curItem.GetGUID()
@@ -128,7 +128,7 @@
curItem = playerPack.GetAt(itemIndex)
if curItem.IsEmpty():
return
- if curItem.GetIsBind():
+ if not curItem.GetIsBind():
GameWorld.Log("非拍品,无法上架!", playerID)
return
curItemGUID = curItem.GetGUID()
@@ -185,7 +185,7 @@
if curPlayer and not familyID:
ItemCommon.DelItem(curPlayer, curItem, curItem.GetCount())
else:
- if curItem.GetIsBind():
+ if not curItem.GetIsBind():
GameWorld.Log("非拍品,绑定无法上架!", playerID)
curItem.Clear()
continue
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCompensationTube.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCompensationTube.py
index 5010831..fccfcca 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCompensationTube.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCompensationTube.py
@@ -82,7 +82,7 @@
if not curItemData:
continue
- isAuctionItem = not curPackItem.IsBind
+ isAuctionItem = curPackItem.IsBind
packType = ChConfig.GetItemPackType(curItemData.GetType())
needSpace = ItemControler.GetItemNeedPackCount(packType, curItemData, curPackItem.Count, isAuctionItem)
needPackSpaceDict[packType] = needPackSpaceDict.get(packType, 0) + needSpace
@@ -137,7 +137,7 @@
for i in xrange(curPackData.Count):
curPackItem = curPackData.Items[i]
itemID = curPackItem.ItemID
- isAuctionItem = not curPackItem.IsBind and not auctionItemTimeout
+ isAuctionItem = curPackItem.IsBind and not auctionItemTimeout
if ItemControler.GetAppointItemRealID(itemID):
curCreateItem = ItemControler.GetItemByData(ItemControler.GetAppointItemDictData(itemID, isAuctionItem))
else:
--
Gitblit v1.8.0