using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; using System.Text; using GameMessage; namespace GameData.Club { /// /// 创建比赛请求参数 /// public class CreateClubMatchPack { #region 客户端赋值 /// /// 所属竞技比赛 /// public int ClubId; /// /// 比赛开始时间--只取客户端小时和分钟部分 /// public DateTime MatchStartTime; /// /// 比赛名称 可以为空。 /// public string ClubMatchName; /// /// 比赛结束时间 /// public DateTime MatchEndTime; /// /// 比赛频率 天为单位 /// public int MatchRate; /// /// 比赛淘汰分值 /// public int DieOutNum; /// /// 是否自动开启下一场比赛 /// public bool AutoOpen; /// /// --前多少名正数玩家自动进入下一轮比赛 /// 该值表示是否是联赛,小于0是联赛,该值存储了联赛的ClubId /// public int HowTopUser; /// /// 比赛关联的玩法 数据库这个字段用string存储 MatchPlayWayId,用逗号分隔。 /// public List MatchPlayWays; /// /// 普通成员显示的桌子数量 /// public int VisibleDesk; /// /// 是否只显示自己俱乐部的桌子--只有联赛才会能体现出这个设置 /// 1不是 0是显示自己俱乐部的桌子 /// public byte isOnlyVisibleMyClub; /// /// 是否显示淘汰分 1显示 0不显示(默认) /// public byte isVisibleScoreBak; /// /// 每轮比赛开始积分是否清零 1请零 0不清零(默认) /// public byte isScoreReset; #endregion /// /// 服务器返回消息,空是成功,其他是失败 /// public string msg; /// /// 联赛账号,只用于展示和进入联赛时用。其他获取比赛数据不能使用 /// public int LeagueUserNameNumber; /// /// /// public CreateClubMatchPack() { } /// /// 校验请求 /// /// public bool CheckData() { if (ClubId <= 0 || MatchStartTime == default(DateTime) || MatchRate <= 0 || MatchPlayWays == null || MatchPlayWays.Count < 1) { return false; } foreach (var item in MatchPlayWays) { if (!item.CheckData()) { return false; } } return true; } } /// /// 比赛玩法 /// public class MatchPlayWayPack { #region 客户端赋值 /// /// 玩法的唯一码 /// public string weiyima; /// /// 最低分数限制 /// public int MinScore; /// /// 桌费数值,每人消耗 AA /// public int DeskCost; /// /// 消耗方式 1AA 2大赢家 /// public int TypeMode; /// /// 最低分值免收桌费,大赢家低于免消耗 AA /// public int MinFreeDeskCostNum; /// /// 是否第一局结束前解散不计房费 true是不计 false 否计算 /// public bool IsFirstCalcDeskCost; /// /// 小局低于多少分解散桌子 /// public int BuresMinScore; /// /// 是否开启小局低于多少分解散房间 /// public bool IsBuresMin; /// /// 是否开启 解散房间按实际局数计算比赛消耗 /// public bool IsRealCalcScore; /// /// 大赢家消耗规则 /// public List MaxWinnerScoreRanges; /// /// 每次比赛联赛活跃积分,联赛使用 联盟长可以设置,群主只能看,成员不可见 /// public decimal LeagueDeskScore; #endregion /// /// /// public MatchPlayWayPack() { } /// /// 校验数据 /// /// public bool CheckData() { if (string.IsNullOrEmpty(weiyima) || TypeMode <= 0) { return false; } return true; } } /// /// 大赢家规则 /// public class MaxWinnerScoreRange { /// /// 主键 /// [JsonIgnore] public int MaxWinnerScoreRangeId; /// /// 玩法ID /// [JsonIgnore] public int MatchPlayWayId; #region 客户端赋值 /// /// 大赢家积分低于多少积分,0是大赢家积分在其他区间时 /// public int MaxWinnerMinScore; /// /// 消耗多少积分 /// public int DeskScore; #endregion /// /// /// public MaxWinnerScoreRange() { } } /// /// 获取俱乐部比赛玩家积分 /// public class GetClubMatchUserScoresRequest { #region 客户端赋值 /// /// 比赛Id /// public int ClubId; /// /// 比赛ID 0当前比赛 /// public int ClubMatchId; /// /// 获取第几页的内容0表示首页 -1表示尾页 0表示第一页 1表示第二页 /// public int PageIndex; /// /// 一页展示多少人,客户端赋值 /// public int PageSize; #endregion /// /// 最大多少页 /// public int MaxPage; /// /// 玩家总数 /// public int TotalCount; /// /// 玩家的分数 /// public List Users; /// /// /// public GetClubMatchUserScoresRequest() { } } /// /// /// public class ClubMatchUserScoreResponse : UserInfoUIBase { /// /// 比赛分 /// public double Score; /// /// 玩家提供的桌费 竞技赛活跃积分 房费/人数 /// 退赛列表界面该字段无效 /// public double DeskScore; /// /// 比赛分备注 /// public int ScoreMemo; /// /// /// public ClubMatchUserScoreResponse() { } } /// /// 玩家基本信息 /// public class UserInfoUIBase { /// /// 玩家Id /// public int UserId; /// /// 名字 /// public string NickName; /// /// 备注 /// public string Remark; /// /// 性别 /// public int Sex; /// /// /// public UserInfoUIBase() { } } /// /// 个人日志,群主和玩家都要查询 /// public class GetClubMatchScoreNotesByUserPack { #region 客户端赋值 /// /// 比赛Id /// public int ClubId; /// /// 比赛ID /// public int ClubMatchId; /// /// 看谁的日志 /// public int UserId; #endregion /// /// 日志记录 /// public List Logs; /// /// /// public GetClubMatchScoreNotesByUserPack() { } } /// /// /// public class UserScoreLog { /// /// /// public UserScoreLog() { } /// /// 创建时间 /// public DateTime CreateTime; /// /// 类型 1游戏结算 2群主调整比赛积分 3比赛重置 4比赛结束 /// public int TypeId; /// /// 输赢分 /// public double Score; /// /// 这把玩家扣除的桌费--这个字段只有群主自己展示 /// public double DeskScore; /// /// 积分状态 /// public double ScoreUI; /// /// 获取类型字符串 /// /// public string GetTypeMsg() { switch (TypeId) { case 1: return "游戏结算"; case 2: return "调整比赛积分"; case 3: return "比赛重置"; case 4: return "比赛结束"; case 5: return "调整淘汰分"; } return ""; } } /// /// 获取比赛日志 /// public class ClubMatchNotesPack { /// /// /// public ClubMatchNotesPack() { } #region 客户端赋值 /// /// 俱乐部ID /// public int ClubId; /// /// 比赛ID /// public int ClubMatchId; #endregion /// /// 日志 /// public List Logs; } /// /// 获取比赛日志 /// public class ClubMatchNotesByTypePack : ClubMatchNotesPack { /// /// 日志类型 /// public MatchNotesEnum TypeId; } /// /// /// public class ClubMatchNotesLog { /// /// /// public ClubMatchNotesLog() { } /// /// 日志类型 /// public MatchNotesEnum TypeId; /// /// 产生时间 /// public DateTime CreateTime; /// /// 内容 /// public string Content; } /// /// 设置玩家比赛的分数 只有会长才有权利 /// public class SetClubMatchUserScorePack { #region 客户端赋值 /// /// 俱乐部Id 不用比赛Id,设置只能设置当前的比赛 /// public int ClubId; /// /// 要修改的玩家,单个就一个值。多个就赋值多个 /// public List userScores; #endregion /// /// 空是成功,有值就是失败 /// public string Msg; /// /// /// public SetClubMatchUserScorePack() { } } #if Server /// /// 获取自己的比赛信息 /// public class GetMyMatchScorePack { /// /// /// public GetMyMatchScorePack() { } #region 客户端赋值 /// /// 玩家Id /// public int UserId; /// /// 俱乐部Id /// public int ClubId; #endregion /// /// 是否在比赛 true在比赛,,false未比赛 /// public bool IsOpenMatch; /// /// 比赛积分。开始了才有值 /// public double Score; /// /// 淘汰分 /// public double ScoreBak; /// /// 0是联赛,有值是联赛的俱乐部Id /// public int LeagueClubId; /// /// 比赛结束时间 /// public DateTime MatchEndTime; /// /// 是否显示淘汰分 1显示 0不显示(默认) /// public byte isVisibleScoreBak; } #endif /// /// 申请退赛 /// public class ExitMatchPack { #region 客户端赋值 /// /// 玩家Id /// public int UserId; /// /// 俱乐部Id /// public int ClubId; #endregion /// /// /// public ExitMatchPack() { } } /// /// 获取退赛列表 --群主才有权利 /// public class GetExitMatchUserListPack { #region 客户端赋值 /// /// 俱乐部Id /// public int ClubId; #endregion /// /// 玩家的分数 /// public List Users; } /// /// 处理退赛 /// public class DealWithExitMatchPack : SetClubMatchUserScorePack { #region 客户端赋值 注意继承关系 /// /// 是否同意退赛,True同意并要把分数设置。false取消不用设置分数 /// public bool IsAgree; /// /// 是否清空淘汰分 /// public bool IsResetScoreBak; #endregion /// /// /// public DealWithExitMatchPack() { } } /// /// 关闭比赛 /// public class CloseClubMatchPack { /// /// /// public CloseClubMatchPack() { } #region 客户端赋值 /// /// 俱乐部Id --只关闭当前正在比赛的比赛,不需要比赛Id /// public int ClubId; #endregion /// /// 空是成功,有值就是失败 /// public string Msg; } #if Server /// /// 获取比赛列表 /// public class GetClubMathcListPack { #region 客户端赋值 /// /// 俱乐部Id /// public int ClubId; #endregion /// /// 比赛列表,只有近3天的数据 /// public List ClubMatchInfos; } /// /// /// public class ClubMatchInfo { /// /// /// public ClubMatchInfo() { } /// /// 比赛Id,关于比赛的参数用这个跟服务器交互 /// public int ClubMatchId; /// /// 俱乐部Id /// public int ClubId; /// /// 比赛名字 /// public string ClubMatchName; /// /// 比赛开始时间- /// public DateTime MatchStartTime; /// /// 比赛结束时间 /// public DateTime MatchEndTime; /// /// 比赛状态1进行中 2比赛结束 /// public int StatusFlag; } #endif /// /// 修改比赛中的玩法设置 /// public class EditClubMatchPlayWayPack:MatchPlayWayPack { #region 客户端赋值 /// /// 所属竞技比赛 组合索引I_MatchPlayWay_ClubIdClubMatchId 1 /// public int ClubId; #endregion /// /// 空成功 其他失败 /// public string Msg; /// /// /// public EditClubMatchPlayWayPack() { } } /// /// 群主记录类型 /// public enum MatchNotesEnum { /// /// 基础设置变更 /// BasicSetting = 1, /// /// 重赛审核 /// CompetitionReview = 2, /// /// 比赛卷发放 /// MatchScoreEdit = 3, /// /// 操作桌子 /// EditDesk = 4, /// /// 玩法修改 /// EditPlayWay = 5, /// /// 生成任务 /// LiveTask = 6 } }