From 5422e17a7eb223df25b7646a37bb42f4a0b2156e Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 29 一月 2021 14:53:33 +0800
Subject: [PATCH] 4923 【主干】竞技场未开启,收到了每日保底奖励邮件(没有对战记录不发奖励);
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_BZZD.py | 54 ++++++++++++++++++++++++++++++++++++++++++------------
1 files changed, 42 insertions(+), 12 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_BZZD.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_BZZD.py
index 1bb852e..f693c7b 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_BZZD.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_BZZD.py
@@ -56,6 +56,8 @@
) = range(5)
BZZD_TotalNPCCount = 'BZZD_TotalNPCCount' # 总需击杀NPC数量
+BZZD_LastNPCID = 'BZZD_LastNPCID' # 最后一只怪NPCID,指定怪物刷完后,后续补刷的怪直接刷该NPCID,防止异常导致怪物不够杀无法结算
+BZZD_IsKillAll = 'BZZD_IsKillAll' # 是否已经击杀到指定怪物数量
FBPlayerDict_KillCnt = 'FBPlayerDict_KillCnt' # 击杀数
FBPlayerDict_EnterLV = 'FBPlayerDict_EnterLV' # 进入副本时的等级
@@ -291,9 +293,11 @@
if lineID not in PyGameData.g_bzzdRefreshNPCListDict:
return
refreshNPCList = PyGameData.g_bzzdRefreshNPCListDict[lineID]
- if not refreshNPCList:
- return
+ #if not refreshNPCList:
+ # return
+ isRefresh = False
+ gameFB = GameWorld.GetGameFB()
gameNPC = GameWorld.GetNPCManager()
customNPCRefreshCount = gameNPC.GetCustomNPCRefreshCount()
for i in xrange(customNPCRefreshCount):
@@ -301,14 +305,21 @@
if npcRefresh.GetCount():
continue
rMark = npcRefresh.GetRefreshMark()
- npcID = refreshNPCList.pop(0) # 直接按顺序取NPCID
- NPCCustomRefresh.SetNPCRefresh(rMark, [npcID])
-
- if not refreshNPCList:
- GameWorld.DebugLog("怪全部刷完了,没怪了!")
+ if refreshNPCList:
+ npcID = refreshNPCList.pop(0) # 直接按顺序取NPCID
+ gameFB.SetGameFBDict(BZZD_LastNPCID, npcID)
+ else:
+ npcID = gameFB.GetGameFBDictByKey(BZZD_LastNPCID)
+ GameWorld.DebugLog("怪全部刷完了,使用最后一次刷怪的NPCID=%s" % npcID)
+
+ if not npcID:
break
- NPCCustomRefresh.ProcessAllNPCRefresh(tick) # 立即出发一次标识点刷新
+ isRefresh = True
+ NPCCustomRefresh.SetNPCRefresh(rMark, [npcID])
+
+ if isRefresh:
+ NPCCustomRefresh.ProcessAllNPCRefresh(tick) # 立即触发一次标识点刷新
return
## 副本进行中
@@ -345,6 +356,11 @@
gameFB = GameWorld.GetGameFB()
if gameFB.GetFBStep() != FB_Step_Fighting:
return False
+
+ if gameFB.GetGameFBDictByKey(BZZD_IsKillAll):
+ #GameWorld.DebugLog("击杀怪物数已达到最大,无法再攻击!")
+ return False
+
return True
@@ -353,9 +369,14 @@
if not curPlayer:
return 0
+ gameFB = GameWorld.GetGameFB()
+ isKillAll = gameFB.GetGameFBDictByKey(BZZD_IsKillAll)
+ if isKillAll:
+ GameWorld.DebugLog("已经杀到指定怪物数了,无法再获得经验! isKillAll=%s" % isKillAll)
+ return 0
+
npcID = curNPC.GetNPCID()
playerID = curPlayer.GetPlayerID()
- gameFB = GameWorld.GetGameFB()
reExp = PlayerControl.GetPlayerReExp(curPlayer)
baseExp = curNPC.GetExp()
expMulti = IpyGameDataPY.GetFuncCfg("XjmjMonsterExp", 2)
@@ -368,6 +389,12 @@
killNPCCnt = gameFB.GetPlayerGameFBDictByKey(playerID, FBPlayerDict_KillCnt) + 1
gameFB.SetPlayerGameFBDict(playerID, FBPlayerDict_KillCnt, killNPCCnt)
DoFBHelp(curPlayer, GameWorld.GetGameWorld().GetTick())
+
+ totalNPCCount = gameFB.GetGameFBDictByKey(BZZD_TotalNPCCount)
+ if killNPCCnt >= totalNPCCount:
+ gameFB.SetGameFBDict(BZZD_IsKillAll, killNPCCnt)
+ GameWorld.DebugLog("怪物已击杀到指定数量: killNPCCnt=%s,totalNPCCount=%s" % (killNPCCnt, totalNPCCount))
+
return addExp
## 获得经验
@@ -378,6 +405,11 @@
playerID = curPlayer.GetID()
gameFB = GameWorld.GetGameFB()
+
+ if gameFB.GetFBStep() != FB_Step_Fighting:
+ #GameWorld.DebugLog("非战斗阶段,不处理! addExp=%s" % addExp)
+ return
+
exp = gameFB.GetPlayerGameFBDictByKey(playerID, FBPlayerDict_TotalExp)
expPoint = gameFB.GetPlayerGameFBDictByKey(playerID, FBPlayerDict_TotalExpPoint)
totalExp = expPoint * ChConfig.Def_PerPointValue + exp
@@ -389,9 +421,7 @@
#GameWorld.DebugLog("OnGetExp() totalExp=%s,addExp=%s,updTotalExp=%s" % (totalExp, addExp, updTotalExp), playerID)
- killNPCCnt = gameFB.GetPlayerGameFBDictByKey(playerID, FBPlayerDict_KillCnt)
- totalNPCCount = gameFB.GetGameFBDictByKey(BZZD_TotalNPCCount)
- if killNPCCnt >= totalNPCCount:
+ if gameFB.GetGameFBDictByKey(BZZD_IsKillAll):
GameWorld.DebugLog("怪物已全部杀完,结算副本!")
__DoBZZDOver()
return
--
Gitblit v1.8.0