You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

99 lines
3.1 KiB

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;
}
/// <summary>
/// 最大好友数量
/// </summary>
/// <returns></returns>
public static int GetFriendListCountMax()
{
if(FriendServerUtils.GetFriendServerData().m_friendConfig.friendListCountMax > 0)
{
return FriendServerUtils.GetFriendServerData().m_friendConfig.friendListCountMax;
}
return FriendStructDef.MaxFriendCount;
}
/// <summary>
/// 最大好友op数量
/// </summary>
/// <returns></returns>
public static int GetFriendOpListCountMax()
{
if (FriendServerUtils.GetFriendServerData().m_friendConfig.friendOpListCountMax > 0)
{
return FriendServerUtils.GetFriendServerData().m_friendConfig.friendOpListCountMax;
}
return FriendStructDef.MaxOpListCount;
}
/// <summary>
/// 最大聊天记录数量
/// </summary>
/// <returns></returns>
public static int GetChatListCountMax()
{
if (FriendServerUtils.GetFriendServerData().m_friendConfig.friendChatListCountMax > 0)
{
return FriendServerUtils.GetFriendServerData().m_friendConfig.friendChatListCountMax;
}
return FriendStructDef.MaxChatListCount;
}
/// <summary>
/// 最大陌生人数量
/// </summary>
/// <returns></returns>
public static int GetFriendStrangerListCountMax()
{
if (FriendServerUtils.GetFriendServerData().m_friendConfig.friendStrangerListCountMax > 0)
{
return FriendServerUtils.GetFriendServerData().m_friendConfig.friendStrangerListCountMax;
}
return FriendStructDef.MaxStrangerListCount;
}
/// <summary>
/// friendcache数据超时删除时间
/// </summary>
/// <returns></returns>
public static int GetFriendCacheTimeout()
{
if (FriendServerUtils.GetFriendServerData().m_friendConfig.friendCacheTimeoutMinute > 0)
{
return FriendServerUtils.GetFriendServerData().m_friendConfig.friendCacheTimeoutMinute * 60;
}
return FriendStructDef.MaxCacheTimeout;
}
/// <summary>
/// 最大黑名单数
/// </summary>
/// <returns></returns>
public static int GetMaxBlacklistCount()
{
if (FriendServerUtils.GetFriendServerData().m_friendConfig.maxBlacklistCount > 0)
{
return FriendServerUtils.GetFriendServerData().m_friendConfig.maxBlacklistCount;
}
return FriendStructDef.MaxBlacklistCount;
}
}
}