namespace Friend { public static class FriendConfig { public static int GetFriendSelfCountMax() { if (FriendServerUtils.GetFriendServerData().m_friendConfig.friendSelfCountMax > 0) { return FriendServerUtils.GetFriendServerData().m_friendConfig.friendSelfCountMax; } return FriendStructDef.MaxFriendSelfCount; } /// /// 最大好友数量 /// /// public static int GetFriendListCountMax() { if(FriendServerUtils.GetFriendServerData().m_friendConfig.friendListCountMax > 0) { return FriendServerUtils.GetFriendServerData().m_friendConfig.friendListCountMax; } return FriendStructDef.MaxFriendCount; } /// /// 最大好友op数量 /// /// public static int GetFriendOpListCountMax() { if (FriendServerUtils.GetFriendServerData().m_friendConfig.friendOpListCountMax > 0) { return FriendServerUtils.GetFriendServerData().m_friendConfig.friendOpListCountMax; } return FriendStructDef.MaxOpListCount; } /// /// 最大聊天记录数量 /// /// public static int GetChatListCountMax() { if (FriendServerUtils.GetFriendServerData().m_friendConfig.friendChatListCountMax > 0) { return FriendServerUtils.GetFriendServerData().m_friendConfig.friendChatListCountMax; } return FriendStructDef.MaxChatListCount; } /// /// 最大陌生人数量 /// /// public static int GetFriendStrangerListCountMax() { if (FriendServerUtils.GetFriendServerData().m_friendConfig.friendStrangerListCountMax > 0) { return FriendServerUtils.GetFriendServerData().m_friendConfig.friendStrangerListCountMax; } return FriendStructDef.MaxStrangerListCount; } /// /// friendcache数据超时删除时间 /// /// public static int GetFriendCacheTimeout() { if (FriendServerUtils.GetFriendServerData().m_friendConfig.friendCacheTimeoutMinute > 0) { return FriendServerUtils.GetFriendServerData().m_friendConfig.friendCacheTimeoutMinute * 60; } return FriendStructDef.MaxCacheTimeout; } /// /// 最大黑名单数 /// /// public static int GetMaxBlacklistCount() { if (FriendServerUtils.GetFriendServerData().m_friendConfig.maxBlacklistCount > 0) { return FriendServerUtils.GetFriendServerData().m_friendConfig.maxBlacklistCount; } return FriendStructDef.MaxBlacklistCount; } } }