From 3861b284c63fd8ba519c71e386a8f49dcad26dab Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 24 十一月 2025 11:35:15 +0800
Subject: [PATCH] 332 【主界面】座骑系统-服务端(按阶解锁的改为手动解锁)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_Zhanchui.py |   48 ++++++++++++++++++++++++++++++++++++++++++------
 1 files changed, 42 insertions(+), 6 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 8d6271e..4aa788e 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
@@ -17,6 +17,7 @@
 
 import GameWorld
 import ItemControler
+import PlayerBeauty
 import FBCommon
 
 def OnTurnFightRequest(curPlayer, mapID, funcLineID, tagType, tagID, valueList):
@@ -45,14 +46,27 @@
     
     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]
+    
     # 首通不扣次数
     FBCommon.AddEnterFBCount(curPlayer, mapID, isFree=True)
     FBCommon.SetFBPass(curPlayer, mapID, funcLineID)
     ItemControler.GivePlayerItemOrMail(curPlayer, itemList, event=["Zhanchui", False, {}], isNotifyAward=False)
-    overMsg.update({FBCommon.Over_itemInfo:FBCommon.GetJsonItemList(itemList)})
-    
     return
-
+    
 def OnPlayerFBSweepAsk(curPlayer, mapID, lineID, sweepCnt, dataEx):
     ## 可否扫荡
     
@@ -61,13 +75,35 @@
 def OnPlayerFBSweepResult(curPlayer, mapID, lineID, sweepCnt, dataEx, askRet):
     ## 扫荡结果,次数消耗已在外层处理扣除
     
-    itemList = FBCommon.GetSweepAwardList(mapID, lineID, sweepCnt)
-    GameWorld.DebugLog("白骨盈野扫荡: mapID=%s,lineID=%s,sweepCnt=%s" % (mapID, lineID, sweepCnt))
+    itemList = []
+    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))
+        
     ItemControler.GivePlayerItemOrMail(curPlayer, itemList, event=["Zhanchui", False, {}], isNotifyAward=False)
     
     isPass = 1
-    overDict = {FBCommon.Over_itemInfo:FBCommon.GetJsonItemList(itemList), FBCommon.Over_isSweep: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]
+        jsonItemList.append(itemDict)
+    overDict = {FBCommon.Over_itemInfo:jsonItemList, FBCommon.Over_isSweep:1}
     FBCommon.NotifyFBOver(curPlayer, mapID, lineID, isPass, overDict)
     
     return True

--
Gitblit v1.8.0