From 563e6d6c9bb5e09f7ef7d3534466acd2dbc2aa36 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 04 十一月 2021 14:33:42 +0800
Subject: [PATCH] 9325 【BT3】【BT4】【BT5】【主干】【后端】日常扫荡优化

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_KillDevil.py |   23 +++++++++++++++++++++--
 1 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_KillDevil.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_KillDevil.py
index 9eaeb7e..29e70dd 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_KillDevil.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_KillDevil.py
@@ -214,7 +214,7 @@
     lineID = 0
     mapID = FBCommon.GetRecordMapID(GameWorld.GetMap().GetMapID())
     ipyData = IpyGameDataPY.GetIpyGameDataByCondition('FairyDomain', {'MapID':mapID, 'LineID':lineID})
-    fdeventID = ipyData.GetID()
+    fdeventID = ipyData.GetID() if ipyData else 0
     GameWorld.DebugLog("副本结算: isPass=%s" % (isPass))
     
     noAssistPlayerID, assistMoneyType, assistPlayerMoneyDict = PlayerAssist.OnFBAssistOver(isPass, mapID)
@@ -313,5 +313,24 @@
 def CheckCanAttackTagObjInFB(attacker, defender):
     return GameWorld.GetGameFB().GetFBStep() == FB_Step_Fight
 
+## 可否扫荡
+def OnPlayerFBSweepAsk(curPlayer, mapID, lineID, sweepCnt, isFinish, dataEx):
+    curState = PlayerFairyDomain.GetFairyDomainFBEventState(curPlayer, mapID, lineID)
+    if curState not in [PlayerFairyDomain.FDEventState_CanVisit, PlayerFairyDomain.FDEventState_Visiting]:
+        GameWorld.DebugLog("缥缈无法扫荡! 不存在该事件或无法进入! mapID=%s,lineID=%s,curState=%s" % (mapID, lineID, curState))
+        return False
+    return True
 
-
+## 扫荡结果
+def OnPlayerFBSweepResult(curPlayer, mapID, lineID, sweepCnt, isFinish, dataEx):
+    ipyData = IpyGameDataPY.GetIpyGameDataByCondition('FairyDomain', {'MapID':mapID, 'LineID':lineID})
+    if ipyData:
+        fdeventID = ipyData.GetID()
+        PlayerFairyDomain.SetFairyDomainEventState(curPlayer, fdeventID, PlayerFairyDomain.FDEventState_Visited)
+    
+    isPass = 1
+    _, bossID = FBCommon.GetFBLineRefreshNPC(ChConfig.Def_FBMapID_KillDevil)
+    jsonItemList, totalExp, totalMoney = NPCCommon.GiveKillNPCDropPrize(curPlayer, mapID, {bossID:1})
+    overDict = {FBCommon.Over_itemInfo:jsonItemList, FBCommon.Over_isSweep:1}
+    FBCommon.NotifyFBOver(curPlayer, mapID, lineID, isPass, overDict)
+    return

--
Gitblit v1.8.0