From c6f8af298a5ad72345b31c6fab754d62dabc3030 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 26 一月 2021 16:07:35 +0800
Subject: [PATCH] 8710 【开发】【主干】【BT2】根据世界等级配置奖励(成长必买世界等级不同奖励配置改为放在充值表;补同步主干冲突);

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

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFriend.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFriend.py
index e65872c..96adcd2 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFriend.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFriend.py
@@ -28,7 +28,6 @@
 import copy
 import PlayerViewCache
 import PlayerTeam
-import cPickle
 
 #---------------------------------------------------------------------
 
@@ -77,13 +76,12 @@
             return
     
     if not tagPlayer:
-        curCache = PlayerViewCache.ViewCacheMgr.FindCache(curTagPlayerID)
+        curCache = PlayerViewCache.FindViewCache(curTagPlayerID)
         if not curCache:
             #玩家的数据没有缓存过
             PlayerControl.NotifyCode(curPlayer, 'Friend_OffLine')
             return
-        cacheDict = cPickle.loads(curCache.GetPropData())
-        tagLV = cacheDict["LV"]
+        tagLV = curCache.LV
     else:
         tagLV = tagPlayer.GetLV()
     
@@ -266,7 +264,7 @@
     srcPlayer = playerManager.FindPlayerByID(srcPlayerID)
     if srcPlayer == None:
         # 玩家已下线
-        curCache = PlayerViewCache.ViewCacheMgr.FindCache(srcPlayerID)
+        curCache = PlayerViewCache.FindViewCache(srcPlayerID)
         if not curCache:
             #玩家的数据没有缓存过
             #PlayerControl.NotifyCode(curPlayer, 'Friend_OffLine')
@@ -324,7 +322,7 @@
         PlayerControl.NotifyCode(srcPlayer, 'Friend_MakeFriend', [curPlayer.GetName()])
         #srcPlayer.MapServer_QueryPlayerResult(0, 0, 'AddFriendSucceed', "", 0)
     else:
-        cacheDict = cPickle.loads(curCache.GetPropData())
+        cacheDict = PlayerViewCache.GetCachePropDataDict(curCache)
         PlayerControl.NotifyCode(curPlayer, 'Friend_MakeFriend', [cacheDict['Name']])  
         # 记录等对方上线通知地图,任务等会用到触发逻辑,通用记录次数即可, MapServer_SyncFriendInfo为具体的好友数量,根据策划需求制作
         pass
@@ -393,10 +391,10 @@
     
     tagPlayer = GameWorld.GetPlayerManager().FindPlayerByID(tagID)
     if not tagPlayer:
-        curCache = PlayerViewCache.ViewCacheMgr.FindCache(tagID)
+        curCache = PlayerViewCache.FindViewCache(tagID)
         if not curCache:
             return
-        cacheDict = cPickle.loads(curCache.GetPropData())
+        cacheDict = PlayerViewCache.GetCachePropDataDict(curCache)
         playerName = cacheDict['Name']
     else:
         playerName = tagPlayer.GetName()

--
Gitblit v1.8.0