From 667f585157b12e6840d779957a3134e5908f28de Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期五, 17 五月 2019 19:57:59 +0800
Subject: [PATCH] 6603 【后端】【2.0】增加新版的sp和被动技能 - 修复公式key使用不对的问题
---
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 68c9778..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 json
#---------------------------------------------------------------------
@@ -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 = json.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 = json.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 = json.loads(curCache.GetPropData())
+ cacheDict = PlayerViewCache.GetCachePropDataDict(curCache)
playerName = cacheDict['Name']
else:
playerName = tagPlayer.GetName()
--
Gitblit v1.8.0