From a20d1ef24191c07fc7150303ca2aa965a2262f19 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 27 五月 2019 14:50:23 +0800
Subject: [PATCH] 3724 【BUG】【2.0】快速连续点击进入草园不弹结算(优化自定义场景采集判断,优化进入自定义场景验证)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py |   17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 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 342bef8..2b9d7b3 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
@@ -5830,19 +5830,22 @@
 #};
 def OnGetCustomSceneCollectAward(index, clientData, tick):
     curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
+    playerID = curPlayer.GetPlayerID()
     npcID = clientData.NPCID
     if not curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_ClientCustomScene):
-        GameWorld.DebugLog("非自定义场景中,无法获取定义采集奖励!")
+        GameWorld.ErrLog("非自定义场景中,无法获取定义采集奖励!", playerID)
         return
     mapID = PlayerControl.GetCustomMapID(curPlayer)
     lineID = PlayerControl.GetCustomLineID(curPlayer)
-    GameWorld.DebugLog("前端场景采集: mapID=%s,lineID=%s,npcID=%s" % (mapID, lineID, npcID))
+    GameWorld.Log("前端场景采集: mapID=%s,lineID=%s,npcID=%s" % (mapID, lineID, npcID), playerID)
+    if not mapID:
+        GameWorld.ErrLog("无自定义场景地图ID,不允许采集!", playerID)
+        return
     
-    if mapID:
-        #if FBCommon.GetCustomMapStep(curPlayer, mapID, lineID) != ChConfig.CustomMapStep_Fight:
-        #    return
-        FBLogic.OnCustomSceneCollectOK(curPlayer, mapID, lineID, npcID)
-                
+    if not FBLogic.OnCustomSceneCollectOK(curPlayer, mapID, lineID, npcID):
+        GameWorld.ErrLog("自定义场景地图不允许采集! mapID=%s,lineID=%s,npcID=%s" % (mapID, lineID, npcID), playerID)
+        return
+    
     collectNPCIpyData = IpyGameDataPY.GetIpyGameData("CollectNPC", npcID)
     if collectNPCIpyData:
         DoGiveCollectNPCAward(curPlayer, npcID, collectNPCIpyData)

--
Gitblit v1.8.0