From c82bf80c543ddc6bada1e3085acb8ab9ee7b13db Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 28 十一月 2025 14:26:33 +0800
Subject: [PATCH] 237 【福利内容】每日任务/每周任务/章节奖励-服务端(A340下发已完成的成就)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MainLevelBoss.py | 56 ++++++++++++++++++++++++++++++++++++++++++++------------
1 files changed, 44 insertions(+), 12 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MainLevelBoss.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MainLevelBoss.py
index 4706134..52ba12f 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MainLevelBoss.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MainLevelBoss.py
@@ -19,8 +19,9 @@
import IpyGameDataPY
import PlayerControl
import ItemControler
-
+import PlayerTask
import FBCommon
+import ChConfig
def OnTurnFightRequest(curPlayer, mapID, funcLineID, tagType, tagID, valueList):
## 回合战斗请求
@@ -59,7 +60,26 @@
GameWorld.DebugLog("最后一波未通过,无法挑战本关boss! passWave=%s < %s" % (wave, waveMax))
return
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ChallengeLVID, levelID)
+
+ PlayerTask.UpdTaskValue(curPlayer, ChConfig.TaskType_MainLevelChallenge)
+
return True, levelID
+
+def GetFBNPCLineupInfo(curPlayer, mapID, funcLineID):
+ ## 获取NPC阵容相关
+ # @return: npcLineupIDList, strongerLV, difficulty
+
+ chapterID, levelNum, _ = PlayerControl.GetMainLevelPassInfo(curPlayer)
+ levelIpyData = IpyGameDataPY.GetIpyGameData("MainLevel", chapterID, levelNum)
+ if not levelIpyData:
+ return
+
+ npcLineupIDList = levelIpyData.GetBossLineupIDList() # Boss波阵容ID列表,小队1阵容ID|小队2阵容ID|...
+ strongerLV = levelIpyData.GetNPCLV()
+ difficulty = levelIpyData.GetDifficulty()
+
+ return npcLineupIDList, strongerLV, difficulty
def OnTurnFightOver(curPlayer, turnFight, mapID, funcLineID, overMsg):
## 回合战斗结束
@@ -98,6 +118,28 @@
% (chapterID, levelNum, nextChapterID, nextLevelNum), playerID)
isAllPass = True
+ # 发放过关奖励
+ levelIpyData = IpyGameDataPY.GetIpyGameData("MainLevel", chapterID, levelNum)
+ itemList = levelIpyData.GetAwardItemList() if levelIpyData else []
+ GameWorld.DebugLog("过关奖励: chapterID=%s,levelNum=%s,itemList=%s" % (chapterID, levelNum, itemList), playerID)
+ overMsg.update({FBCommon.Over_itemInfo:FBCommon.GetJsonItemList(itemList)})
+
+ turnFight.awardData = [nextChapterID, nextLevelNum, isAllPass, itemList]
+ return
+
+def OnTurnFightAward(curPlayer, turnFight, mapID, funcLineID, awardData):
+ ## 回合战斗结算奖励
+ if not curPlayer:
+ return
+
+ if not awardData:
+ return
+
+ playerID = curPlayer.GetPlayerID()
+
+ nextChapterID, nextLevelNum, isAllPass, itemList = awardData
+ GameWorld.DebugLog("处理奖励数据: nextChapterID=%s,nextLevelNum=%s,isAllPass=%s,itemList=%s" % (nextChapterID, nextLevelNum, isAllPass, itemList))
+
updPassValue = PlayerControl.SetMainLevelPassInfo(curPlayer, nextChapterID, nextLevelNum, 0)
if isAllPass:
# 已通关的刷怪进度保持不变
@@ -105,17 +147,7 @@
GameWorld.DebugLog("已通关的刷怪进度保持不变: updNowValue=%s" % updNowValue, playerID)
else:
updNowValue = PlayerControl.SetMainLevelNowInfo(curPlayer, nextChapterID, nextLevelNum, 1)
- GameWorld.DebugLog("为通关的刷怪进度设置为下一关的第1波: updNowValue=%s" % updNowValue, playerID)
+ GameWorld.DebugLog("未通关的刷怪进度设置为下一关的第1波: updNowValue=%s" % updNowValue, playerID)
GameWorld.DebugLog("updPassValue=%s,updNowValue=%s" % (updPassValue, updNowValue), playerID)
-
- # 发放过关奖励
- levelIpyData = IpyGameDataPY.GetIpyGameData("MainLevel", chapterID, levelNum)
- if not levelIpyData:
- return
- itemList = levelIpyData.GetAwardItemList()
- GameWorld.DebugLog("过关奖励: chapterID=%s,levelNum=%s,itemList=%s" % (chapterID, levelNum, itemList), playerID)
-
ItemControler.GivePlayerItemOrMail(curPlayer, itemList, event=["MainLevelBoss", False, {}], isNotifyAward=False)
-
- overMsg.update({FBCommon.Over_itemInfo:FBCommon.GetJsonItemList(itemList)})
return
--
Gitblit v1.8.0