From 4ff284edf33cbbfcb123e2ba01dead78793e9dc8 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 11 十二月 2023 16:47:01 +0800
Subject: [PATCH] 10019 【砍树】回合战斗(每回合攻击顺序改为按攻击速度倒序;每个阵营支持多个战斗实例)
---
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerLove.py | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerLove.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerLove.py
index fb555df..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
@@ -778,6 +784,10 @@
tagPlayerID = dataMsg[0]
playerID = curPlayer.GetPlayerID()
+ if not PlayerControl.GetDBPlayerAccIDByID(tagPlayerID):
+ PlayerControl.NotifyCode(curPlayer, "NoInDBPlayer")
+ return
+
# 黑名单检查
if PyDataManager.GetBlacklistManager().CheckBlacklistBoth(playerID, tagPlayerID, curPlayer):
return
@@ -857,6 +867,10 @@
playerID = curPlayer.GetPlayerID()
+ if not PlayerControl.GetDBPlayerAccIDByID(tagPlayerID):
+ PlayerControl.NotifyCode(curPlayer, "NoInDBPlayer")
+ return
+
# 黑名单检查
if PyDataManager.GetBlacklistManager().CheckBlacklistBoth(playerID, tagPlayerID, curPlayer):
return
--
Gitblit v1.8.0