From aecf8422a914350ccbf779178a1fdc1acc8971c7 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期一, 11 三月 2019 16:27:41 +0800
Subject: [PATCH] 6341 【后端】【2.0】境界改版开发单
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py | 37 +++++++++++++++++++++----------------
1 files changed, 21 insertions(+), 16 deletions(-)
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 bef589d..8fda9bb 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py
@@ -2111,22 +2111,27 @@
isOK = True # 只要有成功的就返回成功,防止异常情况失败可能导致被刷
return isOK
- isOK = False
- doCount = itemCount
- maxPackCount = max(1, itemCount / auctionGroup) # 每组至少1个
- while itemCount > 0 and doCount > 0:
- doCount -= 1
- giveCount = maxPackCount if itemCount >= maxPackCount else itemCount
- if giveCount <= 0:
- break
- itemCount -= giveCount
- giveItem = GetOutPutItemObj(itemID, giveCount, isAuctionItem, curPlayer=curPlayer)
- if not giveItem:
- return isOK
- if DoLogic_PutItemInPack(curPlayer, giveItem, event, packIndexList):
- isOK = True # 只要有成功的就返回成功,防止异常情况失败可能导致被刷
-
- return isOK
+ if auctionGroup > 0:
+ isOK = False
+ doCount = itemCount
+ maxPackCount = max(1, itemCount / auctionGroup) # 每组至少1个
+ while itemCount > 0 and doCount > 0:
+ doCount -= 1
+ giveCount = maxPackCount if itemCount >= maxPackCount else itemCount
+ if giveCount <= 0:
+ break
+ itemCount -= giveCount
+ giveItem = GetOutPutItemObj(itemID, giveCount, isAuctionItem, curPlayer=curPlayer)
+ if not giveItem:
+ return isOK
+ if DoLogic_PutItemInPack(curPlayer, giveItem, event, packIndexList):
+ isOK = True # 只要有成功的就返回成功,防止异常情况失败可能导致被刷
+ return isOK
+
+ giveItem = GetOutPutItemObj(itemID, itemCount, isAuctionItem, curPlayer=curPlayer)
+ if not giveItem:
+ return False
+ return DoLogic_PutItemInPack(curPlayer, giveItem, event, packIndexList)
def GivePlayerAppointItem(curPlayer, appointID, isAuctionItem, event=["", False, {}]):
--
Gitblit v1.8.0