From 021437fc736fafdb8608933ebe095b93cfb9b8ed Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 11 七月 2024 19:31:05 +0800
Subject: [PATCH] 10192 【越南】【主干】【港台】【砍树】上线增加膜拜主动推送(修改为可膜拜自己;)

---
 ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossBoss.py |   27 +++++++++++++++++++++++----
 1 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossBoss.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossBoss.py
index 4b6387a..ddaceb7 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,13 +393,31 @@
         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))
             
     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):
@@ -422,7 +441,7 @@
 def Sync_CrossBossInfo(curPlayer=None, syncBOSSIDList=[]):
     ## 同步boss相关信息
     
-    curTime = int(time.time())
+    curTime = GameWorld.ChangeTimeStrToNum(GameWorld.GetCrossServerTimeStr())
     
     recTypeListData = GameWorld.GetUniversalRecMgr().GetTypeList(ShareDefine.Def_UniversalGameRecType_CrossBossInfo)
     

--
Gitblit v1.8.0