hch
2019-03-08 b861524d105d9c36b11da974bca768d11642999d
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFriend.py
@@ -27,6 +27,8 @@
import PlayerSocial
import copy
import PlayerViewCache
import PlayerTeam
import cPickle
#---------------------------------------------------------------------
@@ -80,7 +82,7 @@
            #玩家的数据没有缓存过
            PlayerControl.NotifyCode(curPlayer, 'Friend_OffLine')
            return
        cacheDict = eval(curCache.GetPropData())
        cacheDict = cPickle.loads(curCache.GetPropData())
        tagLV = cacheDict["LV"]
    else:
        tagLV = tagPlayer.GetLV()
@@ -223,6 +225,7 @@
    tagPlayer = GameWorld.GetPlayerManager().FindPlayerByID(friendID)
    if tagPlayer != None:
        PlayerControl.NotifyCode(tagPlayer, 'Friend_DeleteFriend2', [curPlayer.GetName()])
    PlayerTeam.OnTeamMemFriendChange(curPlayer, friendID, False)
    return
@@ -321,10 +324,11 @@
        PlayerControl.NotifyCode(srcPlayer, 'Friend_MakeFriend', [curPlayer.GetName()])
        #srcPlayer.MapServer_QueryPlayerResult(0, 0, 'AddFriendSucceed', "", 0)
    else:
        cacheDict = eval(curCache.GetPropData())
        cacheDict = cPickle.loads(curCache.GetPropData())
        PlayerControl.NotifyCode(curPlayer, 'Friend_MakeFriend', [cacheDict['Name']])  
        # 记录等对方上线通知地图,任务等会用到触发逻辑,通用记录次数即可, MapServer_SyncFriendInfo为具体的好友数量,根据策划需求制作
        pass
    PlayerTeam.OnTeamMemFriendChange(curPlayer, srcPlayerID, True)
    return
@@ -392,7 +396,7 @@
        curCache = PlayerViewCache.ViewCacheMgr.FindCache(tagID)
        if not curCache:
            return
        cacheDict = eval(curCache.GetPropData())
        cacheDict = cPickle.loads(curCache.GetPropData())
        playerName = cacheDict['Name']
    else:
        playerName = tagPlayer.GetName()