From fbc7b73be513ac507ad43f1586c8f6f865049d0d Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 03 十二月 2025 11:18:00 +0800
Subject: [PATCH] 358 【内政】红颜系统-服务端(游历裂纹改为指定物品奖励必定出现;)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MainLevelBoss.py | 45 +++++++++++++++++++++++++++++++--------------
1 files changed, 31 insertions(+), 14 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 9f205d3..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,14 +19,15 @@
import IpyGameDataPY
import PlayerControl
import ItemControler
-
+import PlayerTask
import FBCommon
+import ChConfig
def OnTurnFightRequest(curPlayer, mapID, funcLineID, tagType, tagID, valueList):
## 回合战斗请求
playerID = curPlayer.GetPlayerID()
chapterID, levelNum, wave = PlayerControl.GetMainLevelPassInfo(curPlayer)
- #levelID = chapterID * 100 + levelNum
+ levelID = chapterID * 100 + levelNum
#if funcLineID != levelID:
# return
GameWorld.DebugLog("请求挑战关卡Boss! passInfo: chapterID=%s,levelNum=%s,wave=%s" % (chapterID, levelNum, wave), playerID)
@@ -59,7 +60,11 @@
GameWorld.DebugLog("最后一波未通过,无法挑战本关boss! passWave=%s < %s" % (wave, waveMax))
return
- return True
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ChallengeLVID, levelID)
+
+ PlayerTask.UpdTaskValue(curPlayer, ChConfig.TaskType_MainLevelChallenge)
+
+ return True, levelID
def GetFBNPCLineupInfo(curPlayer, mapID, funcLineID):
## 获取NPC阵容相关
@@ -113,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:
# 已通关的刷怪进度保持不变
@@ -120,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