From ca4de46e0beb47d7ec1dfa3817f59e2ba885bf76 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 16 十一月 2020 19:52:47 +0800
Subject: [PATCH] 4862 【主干】【长尾】【BT】宝箱支持部分拍品、非拍品配置
---
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerSocial.py | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerSocial.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerSocial.py
index e5612fa..bb54b83 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerSocial.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerSocial.py
@@ -26,7 +26,6 @@
import IpyGameDataPY
import PlayerViewCache
import PyGameData
-import json
#--------------------社交圈基本结构-------------------
# 社交圈
class SocialPlayers(object):
@@ -149,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)
@@ -711,7 +713,7 @@
# 增加社交对象信息,针对不在社交圈记录并且不在线玩家的情况
def AddPlayerInfoByViewCache(self, playerID):
- curCache = PlayerViewCache.ViewCacheMgr.FindCache(playerID)
+ curCache = PlayerViewCache.FindViewCache(playerID)
playerSocial = PyGameDataStruct.tagPersonalSocial()
if not curCache:
# 实在找不到设置为初始化数据
@@ -723,7 +725,7 @@
playerSocial.RealmLV = 1
playerSocial.OnlineType = ChConfig.Def_Offline
else:
- cacheDict = json.loads(curCache.GetPropData())
+ cacheDict = PlayerViewCache.GetCachePropDataDict(curCache)
playerSocial.clear()
playerSocial.PlayerID = playerID
--
Gitblit v1.8.0