From cfa5c39c20be02e0bedfa27cded62a07556df557 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 22 六月 2021 11:29:01 +0800
Subject: [PATCH] 1111 【中心】增加请求审核时间
---
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossBoss.py | 25 ++++++++++++++++++++++---
1 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossBoss.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossBoss.py
index 4b6387a..20be5af 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossBoss.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossBoss.py
@@ -20,7 +20,7 @@
import IpyGameDataPY
import ChPyNetSendPack
import CrossRealmPlayer
-import DataRecordPack
+#import DataRecordPack
import PlayerControl
import NetPackCommon
import CrossRealmMsg
@@ -357,6 +357,7 @@
def OnPlayerLogin(curPlayer):
Sync_CrossBossInfo(curPlayer)
+ __LoginNotifyKillCrossBoss(curPlayer)
return
def CrossServerMsg_CrossBossInfo(bossInfoDict):
@@ -392,8 +393,10 @@
for playerID in killerIDList:
killer = GameWorld.GetPlayerManager().FindPlayerByID(playerID)
if not killer:
- GameWorld.ErrLog("击杀跨服boss时主服玩家不在线, playerID=%s,mapID=%s,bossID=%s" % (playerID, mapID, bossID))
- DataRecordPack.SendEventPack("CrossBoss_Error", {"PlayerID":playerID, "Error":"MainServerOffline"})
+ #GameWorld.ErrLog("击杀跨服boss时主服玩家不在线, playerID=%s,mapID=%s,bossID=%s" % (playerID, mapID, bossID))
+ #DataRecordPack.SendEventPack("CrossBoss_Error", {"PlayerID":playerID, "Error":"MainServerOffline"})
+ killTime = int(time.time())
+ PyGameData.g_unNotifyKillCrossBossDict[playerID] = [killTime, mapID, bossID]
continue
msgInfo = str([mapID, bossID])
killer.MapServer_QueryPlayerResult(0, 0, "CrossKillBoss", msgInfo, len(msgInfo))
@@ -401,6 +404,22 @@
Sync_CrossBossInfo(None, syncBOSSIDList)
return
+def __LoginNotifyKillCrossBoss(curPlayer):
+ ## 登录时通知未通知到的击杀跨服boss
+ playerID = curPlayer.GetPlayerID()
+ if playerID not in PyGameData.g_unNotifyKillCrossBossDict:
+ return
+ killTime, mapID, bossID = PyGameData.g_unNotifyKillCrossBossDict.pop(playerID)
+ curTime = int(time.time())
+ passSeconds = curTime - killTime
+ if passSeconds >= 120:
+ GameWorld.DebugLog("超过120秒上线不处理,主要为了防刷上线捡物品!", playerID)
+ return
+ msgInfo = str([mapID, bossID])
+ curPlayer.MapServer_QueryPlayerResult(0, 0, "CrossKillBoss", msgInfo, len(msgInfo))
+ GameWorld.Log("上线补通知击杀跨服boss: passSeconds=%s, mapID=%s, bossID=%s" % (passSeconds, mapID, bossID), playerID)
+ return
+
def CrossServerMsg_CrossBossState(msgInfo):
## 收到跨服服务器同步的跨服boss状态
--
Gitblit v1.8.0