using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Sog; using ProtoCSStruct; namespace Friend { #if false public static class FriendDataOp { public static ref DBFriendOneStruct UpdateFriendInfoToInFriendList(ref DBFriendListStruct list, ref DBFriendSelf self) { for(int i =0;i= FriendConfig.GetFriendListCountMax(); } public static bool CanAddNewToFriendList(long playerUid, long friendUid) { if(FriendOp.ISAlreadyBeenFriend(playerUid, friendUid) == 1) { return false; } ref FriendCacheInfoStruct info = ref FriendOp.GetFriendInfoByUid(playerUid); if (info.IsNull()) { //满了 if (IsFriendListFull(ref info)) { TraceLog.Debug("FriendDataOp.CanAddNewToFriendList friend list full! uid {0}", playerUid); return false; } } return true; } /// /// 陌生人列表是否已经满了 /// /// /// public static bool IsStrangerListFull(ref FriendCacheInfoStruct info) { return info.FriendOpData.StrangerCount >= FriendConfig.GetFriendStrangerListCountMax(); } } #endif }