From 214253cdf66295c0153a892e1414565c15984e00 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 12 一月 2026 10:19:05 +0800
Subject: [PATCH] 389 流向记录(记录主线、副本过关流向支持;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_Zhanchui.py |   56 ++++++++++++++++++++++++--------------------------------
 1 files changed, 24 insertions(+), 32 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_Zhanchui.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_Zhanchui.py
index 4aa788e..7a2442a 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_Zhanchui.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_Zhanchui.py
@@ -16,9 +16,14 @@
 #-------------------------------------------------------------------------------
 
 import GameWorld
+import PlayerGubao
 import ItemControler
 import PlayerBeauty
 import FBCommon
+import PlayerSuccess
+import ShareDefine
+import PlayerTask
+import ChConfig
 
 def OnTurnFightRequest(curPlayer, mapID, funcLineID, tagType, tagID, valueList):
     ## 回合战斗请求 
@@ -29,13 +34,12 @@
     
     return True, funcLineID
 
-def OnTurnFightOver(curPlayer, turnFight, mapID, funcLineID, overMsg):
-    ## 回合战斗结束
-    
+def OnTurnFightAward(curPlayer, guid, mapID, funcLineID, winFaction, statMsg, dateStr, reqData, awardDict):
+    ## 回合战斗结算奖励
     if not curPlayer:
         return
     
-    isWin = turnFight.isWin
+    isWin = winFaction == ChConfig.Def_FactionA
     
     if not isWin:
         return
@@ -46,25 +50,16 @@
     
     itemList = FBCommon.GetPassAwardList(mapID, funcLineID)
     GameWorld.DebugLog("过关奖励: mapID=%s,funcLineID=%s,itemList=%s" % (mapID, funcLineID, itemList))
-    overMsg.update({FBCommon.Over_itemInfo:FBCommon.GetJsonItemList(itemList)})
-    
-    turnFight.awardData = [itemList]
-    return
-
-def OnTurnFightAward(curPlayer, turnFight, mapID, funcLineID, awardData):
-    ## 回合战斗结算奖励
-    if not curPlayer:
-        return
-    
-    if not awardData:
-        return
-    
-    itemList = awardData[0]
+    awardDict.update({FBCommon.Over_itemInfo:FBCommon.GetJsonItemList(itemList)})
     
     # 首通不扣次数
     FBCommon.AddEnterFBCount(curPlayer, mapID, isFree=True)
     FBCommon.SetFBPass(curPlayer, mapID, funcLineID)
     ItemControler.GivePlayerItemOrMail(curPlayer, itemList, event=["Zhanchui", False, {}], isNotifyAward=False)
+    
+    PlayerTask.UpdTaskValue(curPlayer, ChConfig.TaskType_FBZhanchui)
+    #PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_OSAFBZhanchui, 1)
+    __onFBAward(curPlayer)
     return
     
 def OnPlayerFBSweepAsk(curPlayer, mapID, lineID, sweepCnt, dataEx):
@@ -79,26 +74,16 @@
     itemList += FBCommon.GetSweepAwardList(mapID, lineID, sweepCnt)
     GameWorld.DebugLog("白骨盈野扫荡: mapID=%s,lineID=%s,sweepCnt=%s,itemList=%s" % (mapID, lineID, sweepCnt, itemList))
     
-    addPer = PlayerBeauty.GetBeautyEffInfo(curPlayer, PlayerBeauty.EffType_FBZhanchuiAwardPer)[0] # 扫荡奖励百分比
-    if addPer:
-        GameWorld.DebugLog("红颜额外增加扫荡奖励百分比: %s, itemList=%s" % (addPer, itemList))
-        itemListEx = []
-        for itemInfo in itemList:
-            itemID = itemInfo[0]
-            itemCount = itemInfo[1]
-            addCount = int(itemCount * addPer / 100.0)
-            if addCount > 0:
-                itemListEx.append([itemID, addCount, 1]) # 标记是红颜效果额外获得的
-        itemList += itemListEx
-        GameWorld.DebugLog("itemListEx=%s,itemList=%s" % (itemListEx, itemList))
+    exItemCount, exItemID = PlayerBeauty.GetBeautyEffInfo(curPlayer, PlayerBeauty.EffType_FBZhanchuiItemEx) # 扫荡额外物品奖励
+    if exItemCount and exItemID:
+        itemList += [[exItemID, exItemCount, 1]] # 标记是红颜效果额外获得的
+        GameWorld.DebugLog("红颜额外增加扫荡物品奖励: exItemID=%s, exItemCount=%s, itemList=%s" % (exItemID, exItemCount, itemList))
         
     ItemControler.GivePlayerItemOrMail(curPlayer, itemList, event=["Zhanchui", False, {}], isNotifyAward=False)
     
     isPass = 1
     jsonItemList = []
     for itemInfo in itemList:
-        itemID = itemInfo[0]
-        itemCount = itemInfo[1]
         itemDict = {"ItemID":itemInfo[0], "Count":itemInfo[1]}
         if len(itemInfo) > 2:
             itemDict['BeautyEx'] = itemInfo[2]
@@ -106,4 +91,11 @@
     overDict = {FBCommon.Over_itemInfo:jsonItemList, FBCommon.Over_isSweep:1}
     FBCommon.NotifyFBOver(curPlayer, mapID, lineID, isPass, overDict)
     
+    PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_OSAFBZhanchui, 1)
+    __onFBAward(curPlayer)
     return True
+
+def __onFBAward(curPlayer):
+    ## 过关、扫荡都算
+    PlayerGubao.AddGubaoSpecEffLayer(curPlayer, PlayerGubao.GubaoEffType_Zhanchui, 1)
+    return

--
Gitblit v1.8.0