From f90d0b143afb75b6476f79fc1dafb178237a1895 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 05 八月 2024 17:02:45 +0800
Subject: [PATCH] 10235 【主干】【越南】【香港】【砍树】情侣副本支持X级后扫荡
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_Love.py | 21 +++++++++++++++++++++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py | 10 ++++++++++
2 files changed, 31 insertions(+), 0 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py
index 5430b64..4fe7b1f 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py
@@ -1575,6 +1575,16 @@
curPlayer.Sync_TimeTick(msgType, msgID, nextWheelRemainTick, True)
return nextWheelRemainTick
+def GetTDCfgNPCCntInfo(fileNum, sign=0):
+ npcCountDict = {}
+ refreshNPCDict = ReadChConfig.GetEvalChConfig("TD_%s_NPCID" % fileNum)
+ refreshNPCList = refreshNPCDict.get(sign,[])
+ for wheelNPCList in refreshNPCList:
+ for smallWhellNPCInfo in wheelNPCList:
+ for npcID, npcCount in smallWhellNPCInfo:
+ npcCountDict[npcID] = npcCountDict.get(npcID, 0) + npcCount
+ return npcCountDict
+
## ---------------------------------- TD ---------------------------------------
def GetEnterFBMaxCnt(curPlayer, mapID):
## 获取副本最大可进入次数: 基本次数 + 时间已恢复次数 + VIP额外次数 + 购买次数 + 找回次数 + 使用道具增加次数
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_Love.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_Love.py
index 1148db7..368e8b0 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_Love.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_Love.py
@@ -356,4 +356,25 @@
GameWorld.Log("结算: coupleID=%s,coupleEnterState=%s,overDict=%s" % (coupleID, coupleEnterState, overDict), playerID)
return
+## 可否扫荡
+def OnPlayerFBSweepAsk(curPlayer, mapID, lineID, sweepCnt, isFinish, dataEx):
+ return True
+
+## 扫荡结果
+def OnPlayerFBSweepResult(curPlayer, mapID, lineID, sweepCnt, isFinish, dataEx):
+
+ npcCountDict = FBCommon.GetTDCfgNPCCntInfo(TDRefreshNPCFileNum)
+ if sweepCnt > 1:
+ for npcID, npcCount in npcCountDict.items():
+ npcCountDict[npcID] = npcCount * sweepCnt
+
+ jsonItemList, totalExp, totalMoney = NPCCommon.GiveKillNPCDropPrize(curPlayer, mapID, npcCountDict)
+
+ isPass = 1
+ overDict = {FBCommon.Over_itemInfo:jsonItemList, FBCommon.Over_isSweep:1}
+ FBCommon.NotifyFBOver(curPlayer, mapID, lineID, isPass, overDict)
+ GameWorld.DebugLog("扫荡奖励: 次数=%s,jsonItemList=%s,totalExp=%s,totalMoney=%s,npcCountDict=%s"
+ % (sweepCnt, jsonItemList, totalExp, totalMoney, npcCountDict))
+ return True
+
--
Gitblit v1.8.0