From 9104a1dc358cefe2561a8a55390197d8be87d682 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期五, 29 三月 2019 15:44:26 +0800
Subject: [PATCH] 860312 跨服接口二进制流传输,需指定数据长度
---
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossRealmMsg.py | 6 +++---
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerCompensation.py | 4 +++-
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossRealmMsg.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossRealmMsg.py
index 2440c9b..47cad59 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossRealmMsg.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossRealmMsg.py
@@ -170,13 +170,13 @@
return
GameWorld.Log("SendMsgToClientServer => serverGroupIDList=%s, srcMsg=%s" % (serverGroupIDList, srcMsg))
if not serverGroupIDList:
- GameWorld.GetGameWorld().SendBroadcastMergeClient(sendMsg)
+ GameWorld.GetGameWorld().SendBroadcastMergeClient(sendMsg, len(sendMsg))
else:
serverGroupIDList = list(set(serverGroupIDList)) # 去重
#for serverGroupID in serverGroupIDList:
- # GameWorld.GetGameWorld().SendMergeMsgToClientByGroupID(serverGroupID, sendMsg)
+ # GameWorld.GetGameWorld().SendMergeMsgToClientByGroupID(serverGroupID, sendMsg, len(sendMsg))
jsonGroupIDInfo = cPickle.dumps(serverGroupIDList, 2)
- GameWorld.GetGameWorld().SendMergeMsgToClientByGroupList(jsonGroupIDInfo, sendMsg)
+ GameWorld.GetGameWorld().SendMergeMsgToClientByGroupList(jsonGroupIDInfo, len(jsonGroupIDInfo), sendMsg, len(sendMsg))
return
def OnClientServerReceiveMsg(index, tick):
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerCompensation.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerCompensation.py
index b456a80..e52e73f 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerCompensation.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerCompensation.py
@@ -868,7 +868,9 @@
limitTime = datetime.datetime.strptime(curMail.CreateTime, ChConfig.TYPE_Time_Format) + datetime.timedelta(days = 30)
if limitTime < curTime:
needClearGUIDList.append([curMail.PlayerID, curMail.GUID])
-
+
+ GameWorld.Log("ClearUpPersonalCompensation count=%s"%len(needClearGUIDList))
+
#删除过期补偿信息, 没有主动通知在线玩家
for playerID, GUID in needClearGUIDList:
ClearPersonalCompensation(playerID, GUID)
--
Gitblit v1.8.0