From 19576609e69aaf5ff7ece05bf007a5f9eb1eaf9a Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期六, 24 十一月 2018 22:15:16 +0800 Subject: [PATCH] 4762 【1.3】【后端】组队功能和助战积分优化;(初版,可测试基本流程) --- ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFriend.py | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFriend.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFriend.py index 62c7c82..d88e04a 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFriend.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFriend.py @@ -147,6 +147,13 @@ return PyDataManager.GetFriendManager().AddFriends(playerID) +def IsFriend(playerID, tagPlayerID): + ## 判断双方是否好友 + curFriends = PyDataManager.GetFriendManager().GetFriends(playerID) + if not curFriends: + return False + return curFriends.Find(tagPlayerID) != None + #--------------------------------------------------------------------- ##好友检查 # @param curPlayer 申请好友的玩家 -- Gitblit v1.8.0