From e612ef874bdecbd9c946ce0f0f2ff41d13193f28 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期五, 20 八月 2021 16:48:36 +0800 Subject: [PATCH] 8585 【BT3】【主干】竞技场(优化竞技场命令; 新增调整获得获得物品可配置广播) --- ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerSocial.py | 15 +++++++++------ 1 files changed, 9 insertions(+), 6 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerSocial.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerSocial.py index ac14101..770c385 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerSocial.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerSocial.py @@ -148,7 +148,10 @@ sendPack.Count = 1 sendPack.Player = [] socialManager = PyDataManager.GetPersonalSocialManager() - socialInfo = socialManager.GetSocialPlayer(tagID).GetPackStruct(ChPyNetSendPack.tagGCSocialPlayer()) + socialPlayer = socialManager.GetSocialPlayer(tagID) + if not socialPlayer: + return + socialInfo = socialPlayer.GetPackStruct(ChPyNetSendPack.tagGCSocialPlayer()) sendPack.Player.append(socialInfo) NetPackCommon.SendFakePack(curPlayer, sendPack) @@ -265,7 +268,7 @@ cnt += 1 savaData += friend.getBuffer() - GameWorld.Log("SaveFriendData cnt :%s"%cnt) + GameWorld.Log("SaveFriendData cnt :%s len=%s" % (cnt, len(savaData))) return CommFunc.WriteDWORD(cntData, cnt) + savaData # 从数据库载入好友数据 @@ -382,7 +385,7 @@ cnt += 1 savaData += socialPlayer.getBuffer() - GameWorld.Log("!!SaveEnemyData cnt :%s"%cnt) + GameWorld.Log("!!SaveEnemyData cnt :%s len=%s" % (cnt, len(savaData))) return CommFunc.WriteDWORD(cntData, cnt) + savaData # 从数据库载入 @@ -538,7 +541,7 @@ cnt += 1 savaData += socialPlayer.getBuffer() - GameWorld.Log("!!SaveContactsData cnt :%s"%cnt) + GameWorld.Log("!!SaveContactsData cnt :%s len=%s" % (cnt, len(savaData))) return CommFunc.WriteDWORD(cntData, cnt) + savaData # 从数据库载入 @@ -619,7 +622,7 @@ cnt += 1 savaData += socialPlayer.getBuffer() - GameWorld.Log("!!SaveBlacklistData cnt :%s"%cnt) + GameWorld.Log("!!SaveBlacklistData cnt :%s len=%s" % (cnt, len(savaData))) return CommFunc.WriteDWORD(cntData, cnt) + savaData # 从数据库载入 @@ -762,7 +765,7 @@ cnt += 1 savaData += socialPlayer.playerInfo.getBuffer() - GameWorld.Log("SaveSocialData cnt :%s"%cnt) + GameWorld.Log("SaveSocialData cnt :%s len=%s" % (cnt, len(savaData))) return CommFunc.WriteDWORD(cntData, cnt) + savaData -- Gitblit v1.8.0