6 major server modules (PdkFriendServer/GlobalSever/ServerCore/GameModule/GameNetModule) + game logic (GameFix/GameDAL/ServerData) + network layer (NetWorkMessage) + data layer (ObjectModel) + utilities (MrWu/Core/Config/CloudAPI/dll) + adapters (zyxAdapter/base) .NET 8.0 C# solution, 16 projects, 958 source files
73 lines
2.0 KiB
C#
73 lines
2.0 KiB
C#
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
|
||
{
|
||
/// <summary>
|
||
/// 竞技比赛同桌判断
|
||
/// </summary>
|
||
public static class ClubSeatmate
|
||
{
|
||
/*
|
||
* 这个脚本应该是静态的,所有的数据都是从redis获取进行运算。
|
||
*
|
||
* 按静态的修改好了
|
||
* */
|
||
#region 常量
|
||
public const int dbIdx = 7;
|
||
|
||
/// <summary>
|
||
/// 限制组数量
|
||
/// </summary>
|
||
public const int ClubBankCount=50;
|
||
|
||
/// <summary>
|
||
/// 竞技比赛禁止同桌的的Reids Key
|
||
/// </summary>
|
||
public const string NoPlayerGroupKey = "NoPlayerGroup:{0}";
|
||
/// <summary>
|
||
/// 该竞技比赛的禁止同桌列表Redis Key
|
||
/// </summary>
|
||
public const string ClubNoPlayerGroupKey = "NoPlayerGroup_Club:{0}";
|
||
|
||
/// <summary>
|
||
/// 获取该玩家的禁止同桌列表Redis Key
|
||
/// </summary>
|
||
public const string UserNoPlayerKey = "NoPlayGroup_Player:{0}:{1}";
|
||
/// <summary>
|
||
/// 获取该用户的禁止同桌列表Redis Key
|
||
/// </summary>
|
||
public const string UserNoPlayerClubKey = "NoPlayGroup_Player:{0}";
|
||
|
||
public static IDatabaseProxy db
|
||
{
|
||
get
|
||
{
|
||
return redisManager.Getdb(dbIdx);
|
||
}
|
||
}
|
||
|
||
#endregion
|
||
|
||
/// <summary>
|
||
/// Redis 设置过期时间半年
|
||
/// </summary>
|
||
public static TimeSpan TimeOut = new TimeSpan(180, 0, 0, 0, 0);
|
||
|
||
/// <summary>
|
||
/// 检测是否可以同桌
|
||
/// </summary>
|
||
public static bool CheckSeatmate(List<int> limitList, int[] deskUsers)
|
||
{
|
||
return true;
|
||
}
|
||
|
||
}
|
||
}
|