/*
* 作者:吴隆健
* 日期: 2019-04-12
* 时间: 17:43
*
*/
using System;
using System.Collections.Generic;
namespace GameData.Club
{
///
/// 竞技比赛常量数据
///
public class ConstData
{
///
/// 名称
///
public const string CLUB_NAME = "公会";
///
/// 竞技比赛名称最小字符数
///
public const int minClubNameLength = 3;
///
/// 竞技比赛名称最大字符数
///
public const int maxClubNameLength = 8;
///
/// 竞技比赛最大成员数量
///
public const int maxMemNum = 1000;
///
/// 竞技比赛最大玩法数量
///
public const int maxplaywayNum = 100;
///
/// 一场游戏的最大人数
///
public const int maxGamePlayerCount = 8;
///
/// 最大竞技比赛数量
///
public const int maxClubNumCnt = 10;
///
/// 我的竞技比赛最大数量
///
public const int maxMyClubNumCnt = 5;
///
/// 我加入的竞技比赛最大数量
///
public const int maxJoinClubNumCnt = 5;
///
/// 一个玩家所能获得的最大记录数量
///
public const int maxPlayerFightRecordCount = 50;
///
/// 创建竞技比赛所需的房卡数量
///
public const int minRoomCardForCreateClub = 200;
///
/// 创建竞技比赛所需的道具数量
///
public const int minPropForCreateClub = 1;
///
/// 最多显示消息数量
///
public const int maxMessageCnt = 20;
///
/// 最多显示记录的数量
///
public const int maxrecordCnt = 20;
///
/// 如果是重置比赛积分的比赛设置,重置比赛时候的AwardId标记
///
public const int AwardId_CloseMatchWithResetScore = 101;
///
/// 颁奖的时候,无需要颁奖汇总显示的标记
///
public const int AwardId_AwardNoInHistory = 100;
///
/// ID 小于 100 认为是要在历史汇总中显示的
/// 当前默认的需要汇总的ID
///
public const int AwardId_Default = 99;
///
/// 需要显示在历史中的汇总记录
///
public const int AwardId_InHistoryCloseMatchWithResetScore = 98;
///
///
///
public ConstData()
{
}
}
///
/// 俱乐部设置
///
public static class ClubSettingConst
{
public static int JoinDeskMode_JoinDesk = 0;
public static int JoinDeskMode_CreateDesk = 1;
}
public static class ClubPlayerPositionType
{
public const int President = 0; // 会长
public const int PlaceHolder = 1; // 占位
public const int Manager = 2; // 管理员
public const int Partner = 3; // 合伙人
///
/// 可以管理俱乐部部分功能
///
public static bool IsManageClub(int position)
{
return position == President
|| position == Manager
|| position == Partner;
}
}
public static class ClubReadyTimeOutConfig
{
public static int DefaultReadyTimeOutSeconds = 30;
public enum KickOption
{
SystemDefault, // 系统默认
NeverKick, // 不踢出
Sec10, // 10s
Sec20, // 20s
Sec30, // 30s
Min1, // 1分钟
Min2, // 2分钟
Min3, // 3分钟
Min5 // 5分钟
}
public class KickConfig
{
public KickOption Option { get; set; }
public string Label { get; set; } // 界面显示的文字
public int TimeoutSeconds { get; set; } // 倒计时秒数(统一单位)
public KickConfig(KickOption option, string label, int timeoutSeconds)
{
Option = option;
Label = label;
TimeoutSeconds = timeoutSeconds;
}
}
// 核心映射字典
public static readonly List KickSettings = new()
{
{ new KickConfig(KickOption.SystemDefault, "系统默认", 30) },
// { KickOption.NeverKick, new KickConfig("不踢出", false, false, -1) },
{ new KickConfig(KickOption.Sec10, "10s", 10) },
{ new KickConfig(KickOption.Sec20, "20s", 20) },
{ new KickConfig(KickOption.Sec30, "30s", 30) },
{ new KickConfig(KickOption.Min1, "1分钟", 60) },
{ new KickConfig(KickOption.Min2, "2分钟", 120) },
{ new KickConfig(KickOption.Min3, "3分钟", 180) },
{ new KickConfig(KickOption.Min5, "5分钟", 300) }
};
}
///
/// 服务器客户端公用方法
///
public static class ClubSCFunc
{
public static string GetPositionName(int position)
{
switch (position)
{
case 0:
return "会长";
case 1:
case 2:
return "管理员";
case 3:
return "合伙人";
default:
return "会员";
}
}
}
}