From 2638c8b67d1dcac1c774f942ac144579c6f82ec1 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 11 九月 2018 21:41:11 +0800
Subject: [PATCH] 3479 【后端】【主干】【1.0.15】助战发送喊话时新增逻辑(自动加入匹配中的队伍);

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 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 a59fb05..cdb2f21 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py
@@ -1360,7 +1360,7 @@
     DropItemToOtherPack(curPlayer, clientData.SrcBackpack, clientData.DesBackPack, clientData.SrcIndex, clientData.IsAll)
     return
 
-def DropItemToOtherPack(curPlayer, fromPackIndex, toPackIndex, index, isAll=False):
+def DropItemToOtherPack(curPlayer, fromPackIndex, desPackIndex, index, isAll=False):
     '''拖动某个背包物品到玩家物品背包
     '''
     movePack = curPlayer.GetItemManager().GetPack(fromPackIndex)
@@ -1371,18 +1371,27 @@
     
     #整个背包转移
     if isAll:
+        fullPackList = []
         for itemIndex in xrange(movePack.GetCount()):
             curItem = movePack.GetAt(itemIndex)
             if not curItem or curItem.IsEmpty():
                 continue
+            toPackIndex = ChConfig.GetItemPackType(curItem.GetType(), desPackIndex)
+            if toPackIndex in fullPackList:
+                continue
             if not __DoDropItemToOtherPack(curPlayer, itemControl, fromPackIndex, toPackIndex, itemIndex, curItem):
-                return
+                if toPackIndex not in fullPackList:
+                    fullPackList.append(toPackIndex)
+                    
+        for fullPackIndex in fullPackList:
+            PlayerControl.NotifyCode(curPlayer, "GeRen_chenxin_676165", [fullPackIndex])
             
     #单个物品转移
     else:
         curItem = movePack.GetAt(index)
         if not curItem or curItem.IsEmpty():
             return
+        toPackIndex = ChConfig.GetItemPackType(curItem.GetType(), desPackIndex)
         __DoDropItemToOtherPack(curPlayer, itemControl, fromPackIndex, toPackIndex, index, curItem)
     return
 
@@ -1391,7 +1400,7 @@
     #curItemGUID = curItem.GetGUID()
     curItemCount = curItem.GetCount()
     curItemIsBind = curItem.GetIsBind()
-    toPackIndex = ChConfig.GetItemPackType(curItem.GetType(), toPackIndex)
+    #toPackIndex = ChConfig.GetItemPackType(curItem.GetType(), toPackIndex)
     
     # 常规物品转移到虚拟符印背包
     if toPackIndex == ShareDefine.rptRune:

--
Gitblit v1.8.0