From 20a1055eb4352a9ea75d52a472f724557deb8d4a Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期三, 26 九月 2018 14:09:54 +0800
Subject: [PATCH] 1889 采集宝箱上限提示

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py |   44 +++++++++++++++++++++++---------------------
 1 files changed, 23 insertions(+), 21 deletions(-)

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 ab5e9a7..e6ff985 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
@@ -5010,7 +5010,7 @@
     return max(value / pow(10, nlen), 1)
 
 
-Def_CollNPCCfg_Len = 9
+Def_CollNPCCfg_Len = 10
 (
 Def_CollNPCCfg_CanTogether, # 是否允许同时采集
 Def_CollNPCCfg_SysMsgMark, # 不可同时采集提示
@@ -5021,6 +5021,7 @@
 Def_CollNPCCfg_ZhenQi, # 获得的真气/魔魂
 Def_CollNPCCfg_GiveItemModeID, # 获得的物品信息模板编号
 Def_CollNPCCfg_NotCostItemNotify, # 消耗品不足提示
+Def_CollNPCCfg_LimitSysMsgMark, #采集上限提示
 ) = range(Def_CollNPCCfg_Len)
 
 
@@ -5095,7 +5096,8 @@
         GameWorld.DebugLog("    maxTime=%s,todayTime=%s" % (limitMaxTime, todayCollTime))
         
     if limitMaxTime > 0 and todayCollTime >= limitMaxTime:
-        PlayerControl.NotifyCode(curPlayer, "GeRen_liubo_807125")
+        
+        PlayerControl.NotifyCode(curPlayer, collectNPCInfo[Def_CollNPCCfg_LimitSysMsgMark], [limitMaxTime])
         return True
     
     # 采集消耗
@@ -5446,38 +5448,38 @@
     GameWorld.DebugLog("    最终可得到物品giveItemInfoList=%s" % giveItemInfoList)
     
     syncItemInfoList = [] # 同步的采集到的物品信息列表
-    for itemType, itemID, itemCnt, isBind in giveItemInfoList:
+    for itemID, itemCnt, isBind in giveItemInfoList:
         if not ItemCommon.CheckPackHasSpace(curPlayer, IPY_GameWorld.rptItem):
             break
         
         isBind = setBind or isBind
-        if itemType == 0:
-            getItemObj = ItemControler.GetOutPutItemObj(itemID)
-        elif itemType == 1:
-            itemDictData = ItemControler.GetAppointItemDictData(itemID, isBind)
-            getItemObj = ItemControler.GetItemByData(itemDictData)
-        elif itemType == 2:
-            quality = ItemCommon.GetRandEquipQualityByTable(itemID, "CollectEquipRandQuality")
-            if quality == 0:
-                isBroadcast = False
-                getItemObj = ItemCommon.RandNormalEquip(curPlayer, itemID, isBind, "CollectNormalEquip")
-            else:
-                getItemObj, isBroadcast = ItemCommon.RandGreateEquip(curPlayer, itemID, isBind, "CollectGreateEquip", quality)
-            if getItemObj == None:
-                continue
-            
-            itemID = getItemObj.GetItemTypeID()
+        
+        getItemObj = ItemControler.GetOutPutItemObj(itemID)
+#        elif itemType == 1:
+#            itemDictData = ItemControler.GetAppointItemDictData(itemID, isBind)
+#            getItemObj = ItemControler.GetItemByData(itemDictData)
+#        elif itemType == 2:
+#            quality = ItemCommon.GetRandEquipQualityByTable(itemID, "CollectEquipRandQuality")
+#            if quality == 0:
+#                isBroadcast = False
+#                getItemObj = ItemCommon.RandNormalEquip(curPlayer, itemID, isBind, "CollectNormalEquip")
+#            else:
+#                getItemObj, isBroadcast = ItemCommon.RandGreateEquip(curPlayer, itemID, isBind, "CollectGreateEquip", quality)
+#            if getItemObj == None:
+#                continue
+#            
+#            itemID = getItemObj.GetItemTypeID()
         userData = getItemObj.GetUserData()
         getItemObj.SetCount(itemCnt)
         getItemObj.SetIsBind(isBind)
         ItemCommon.NotifyItemDropByKill(curPlayer, getItemObj, npcID)
             
-        SendGameServerGoodItemRecord(mapID, npcID, curPlayer.GetPlayerName(), curPlayer.GetPlayerID(), itemID)
+        #SendGameServerGoodItemRecord(mapID, npcID, curPlayer.GetPlayerName(), curPlayer.GetPlayerID(), itemID)
         #可以放入背包
         if not ItemControler.DoLogic_PutItemInPack(curPlayer, getItemObj, True, True,
                                                    event=["CollectNPC", False, {"npcID":npcID}]):
             break
-        syncItemInfoList.append([itemType, itemID, itemCnt, isBind, userData])
+        syncItemInfoList.append([itemID, itemCnt, isBind, userData])
     return syncItemInfoList
 
 ## 采集结果同步

--
Gitblit v1.8.0