using Newtonsoft.Json; using Server.DB.Redis; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using MrWu.Debug; using StackExchange.Redis; namespace Server { /// /// 竞技比赛同桌判断 /// public static class ClubSeatmate { /* * 这个脚本应该是静态的,所有的数据都是从redis获取进行运算。 * * 按静态的修改好了 * */ #region 常量 public const int dbIdx = 7; /// /// 限制组数量 /// public const int ClubBankCount=50; /// /// 竞技比赛禁止同桌的的Reids Key /// public const string NoPlayerGroupKey = "NoPlayerGroup:{0}"; /// /// 该竞技比赛的禁止同桌列表Redis Key /// public const string ClubNoPlayerGroupKey = "NoPlayerGroup_Club:{0}"; /// /// 获取该玩家的禁止同桌列表Redis Key /// public const string UserNoPlayerKey = "NoPlayGroup_Player:{0}:{1}"; /// /// 获取该用户的禁止同桌列表Redis Key /// public const string UserNoPlayerClubKey = "NoPlayGroup_Player:{0}"; public static IDatabaseProxy db { get { return redisManager.Getdb(dbIdx); } } #endregion /// /// Redis 设置过期时间半年 /// public static TimeSpan TimeOut = new TimeSpan(180, 0, 0, 0, 0); /// /// 检测是否可以同桌 /// public static bool CheckSeatmate(List limitList, int[] deskUsers) { return true; } } }