From ea1b7e5229ebbae2340b5616c796f2a2b00a123f Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期二, 28 五月 2019 10:54:34 +0800
Subject: [PATCH] 6805 【后端】【2.0】副本前端化(代码优化)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_Guard.py |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_Guard.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_Guard.py
index a5743b2..3321d6a 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_Guard.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_Guard.py
@@ -40,16 +40,22 @@
 
 def OnClientEndFB(curPlayer, mapID, lineID, dataList):
     #客户端副本发送结束
+    if PlayerControl.GetCustomMapID(curPlayer) != mapID:
+        return
+    hasEnter = GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_PlayerFBStar_MapId, lineID, False,
+                                           [mapID])
+    if hasEnter:
+        return
+    GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_PlayerFBStar_MapId, lineID, 1, False, [mapID])
     itemID, giveExp = FBCommon.GetFBLineReward(mapID, 0)
-    #
     overDict = {}
-    ItemControler.GivePlayerItem(curPlayer, itemID, 1, 0, [IPY_GameWorld.rptItem, IPY_GameWorld.rptAnyWhere])
+    ItemControler.GivePlayerItemOrMail(curPlayer, [[itemID, 1, 0]])
     if giveExp:
         PlayerControl.PlayerControl(curPlayer).AddExp(giveExp)
         overDict[FBCommon.Over_exp] = giveExp
     if itemID:
         overDict[FBCommon.Over_itemInfo] = FBCommon.GetJsonItemList([itemID])
-    GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_PlayerFBStar_MapId, lineID, 1, False, [mapID])
+
     FBCommon.NotifyFBOver(curPlayer,mapID,lineID,1,overDict)
     EventShell.EventRespons_FBEvent(curPlayer, "guardfbpass")
     PlayerControl.SetCustomMap(curPlayer, 0, 0)

--
Gitblit v1.8.0