From 875d928db2370eaaa6a43bf01d0761d7939dab5f Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期六, 13 十月 2018 17:14:42 +0800
Subject: [PATCH] 4064 【后端】【主干】直接给玩家的货币类物品优化处理; 2094 邮件发放神兽装备,神兽背包空间不足逻辑错误;

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/FunctionNPCCommon.py |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/FunctionNPCCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/FunctionNPCCommon.py
index 6774b4b..11882e1 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/FunctionNPCCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/FunctionNPCCommon.py
@@ -440,8 +440,8 @@
         if not curItem:
             GameWorld.ErrLog("Store shop item error! shopType=%s,itemID=%s" % (shopType, itemID))
             return
-        packType = ShareDefine.rptRune if curItem.GetType() == ChConfig.Def_ItemType_Rune else IPY_GameWorld.rptItem
-        needSpace = int(math.ceil(float(itemCnt) / curItem.GetPackCount()))
+        packType = ChConfig.GetItemPackType(curItem.GetType())
+        needSpace = ItemControler.GetItemNeedPackCount(packType, curItem, itemCnt)
         needPackSpaceDict[packType] = needPackSpaceDict.get(packType, 0) + needSpace
         
         if i == 0:
@@ -515,7 +515,7 @@
         if not curItemObj:
             continue
         userData = curItemObj.GetUserData()
-        packType = ShareDefine.rptRune if curItemObj.GetType() == ChConfig.Def_ItemType_Rune else IPY_GameWorld.rptItem
+        packType = ChConfig.GetItemPackType(curItemObj.GetType())
         if not itemControl.PutInItem(packType, curItemObj, event=[ChConfig.ItemGive_BuyItem, isForceEvent, dataDict]):
             curItemObj.Clear()
             continue

--
Gitblit v1.8.0