From 00916d353a461680aa6e9f1431a92743b1a3e903 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 28 五月 2019 14:12:38 +0800
Subject: [PATCH] 6970 【2.0】【后端】缥缈仙域仙草园(修复2星灵草园采完后不结算的bug)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossGrassland.py |   37 ++++++++++++++++++++++---------------
 1 files changed, 22 insertions(+), 15 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossGrassland.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossGrassland.py
index 2614330..b0a40d6 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossGrassland.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossGrassland.py
@@ -243,21 +243,28 @@
         return
     
     # 采集次数是否已用完
-    collNPCIpyDataList = IpyGameDataPY.GetIpyGameDataListNotLog("MapRefreshNPC", mapID)
-    if not collNPCIpyDataList:
-        return
-    
-    for collIpyData in collNPCIpyDataList:
-        npcIDList = collIpyData.GetNPCIDList()
-        for npcID in npcIDList:
-            collectNPCIpyData = IpyGameDataPY.GetIpyGameData("CollectNPC", npcID)
-            if not collectNPCIpyData:
-                return
-            limitMaxTime = collectNPCIpyData.GetMaxCollectCount()
-            totalCollTime = NPCCommon.GetTodayCollectCount(curPlayer, npcID)
-            if totalCollTime < limitMaxTime:
-                GameWorld.DebugLog("草园NPC采集次数未用完! npcID=%s,totalCollTime=%s < limitMaxTime=%s" % (npcID, totalCollTime, limitMaxTime))
-                return
+    if mapID == PlayerControl.GetCustomMapID(curPlayer):
+        refreshMapNPCDict = IpyGameDataPY.GetFuncEvalCfg("CrossGrasslandCfg", 2)
+        npcCountDict = refreshMapNPCDict.get((mapID, lineID), {})
+        npcIDList = npcCountDict.keys()
+    else:
+        collNPCIpyDataList = IpyGameDataPY.GetIpyGameDataListNotLog("MapRefreshNPC", mapID)
+        if not collNPCIpyDataList:
+            return
+        
+        npcIDList = []
+        for collIpyData in collNPCIpyDataList:
+            npcIDList += collIpyData.GetNPCIDList()
+            
+    for npcID in npcIDList:
+        collectNPCIpyData = IpyGameDataPY.GetIpyGameData("CollectNPC", npcID)
+        if not collectNPCIpyData:
+            return
+        limitMaxTime = collectNPCIpyData.GetMaxCollectCount()
+        totalCollTime = NPCCommon.GetTodayCollectCount(curPlayer, npcID)
+        if totalCollTime < limitMaxTime:
+            GameWorld.DebugLog("草园NPC采集次数未用完! npcID=%s,totalCollTime=%s < limitMaxTime=%s" % (npcID, totalCollTime, limitMaxTime))
+            return
             
     # 宝箱怪攻击次数是否已用完
     boxNPCID = IpyGameDataPY.GetFuncCfg("CrossGrasslandCfg", 1)

--
Gitblit v1.8.0