From 01e46bb91dbc5023379dd2e10f2cb3532ca57ad0 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 02 九月 2024 10:35:33 +0800
Subject: [PATCH] 10256 【越南】【砍树】排行榜名次加入积分限制(修复特殊排名规则跨服榜单报错bug;)

---
 ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerLove.py |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerLove.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerLove.py
index 8cec51f..6105118 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerLove.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerLove.py
@@ -159,12 +159,18 @@
         syncCoupleInfo = {}
         if syncPlayerIDList == None:
             syncPlayerIDList = self.coupleIDDict.keys()
+        # 分批同步,子服长度不能超过 65535,每批暂定最大同步1000个
         for playerID in syncPlayerIDList:
             couple = self.GetCouple(playerID)
             if not couple:
                 syncCoupleInfo[playerID] = []
             else:
                 syncCoupleInfo[playerID] = couple.GetSendMapServerCoupleInfo(playerID)
+            if len(syncCoupleInfo) >= 1000:
+                GameWorld.SendMapServerMsgEx(ShareDefine.Def_Notify_WorldKey_CoupleInfo, syncCoupleInfo)
+                syncCoupleInfo = {}
+        if not syncCoupleInfo:
+            return
         GameWorld.SendMapServerMsgEx(ShareDefine.Def_Notify_WorldKey_CoupleInfo, syncCoupleInfo)
         return
     

--
Gitblit v1.8.0