/*
 * 由SharpDevelop创建。
 * 用户： Administrator
 * 日期: 2019-03-21
 * 时间: 17:26
 * 
 * 要改变这种模板请点击 工具|选项|代码编写|编辑标准头文件
 */

using System;
using System.Collections.Generic;

namespace GameData {
    /// <summary>
    /// 朋友房解散信息包
    /// </summary>
    public class DisInfo {
        /// <summary>
        /// 1请求解散   2同意解散  3拒绝解散
        /// </summary>
        public int style;

        /// <summary>
        /// 谁
        /// </summary>
        public int userid;

        /// <summary>
        /// 玩家名称
        /// </summary>
        public string nickname;

        /// <summary>
        /// 自动解散剩余时间
        /// </summary>
        public int count;

        /// <summary>
        /// 是否在解散中的信息
        /// </summary>
        public bool isDising;

        /// <summary>
        /// 请求解散的次数
        /// </summary>
        public int requestCnt;
        
        /// <summary>
        /// 
        /// </summary>
        public DisInfo() { }
    }

    /// <summary>
    /// 朋友房详情信息
    /// </summary>
    public class BurInfo {
        /// <summary>
        /// 0是全部信息 1是跟新信息 收到全部信息直接替换, 收到更新信息发现本地没有则添加,有则替换响应的详情信息
        /// </summary>
        public int style;

        /// <summary>
        /// 
        /// </summary>
        public BurInfo() { }

        /// <summary>
        /// 详情信息
        /// </summary>
        public List<DeskInfo.Bureau> burs = new List<DeskInfo.Bureau>();
    }

    /// <summary>
    /// 朋友房玩家信息包 收到此包更新玩家数据
    /// </summary>
    public class FriendPlayersInfo {
        /// <summary>
        /// 0表示不提示 1表示有人离开 2表示有人加入 3座位跟换包->离开到本地拿玩家数据提示,加入拿本包数据信息提示
        /// </summary>
        public int style;

        /// <summary>
        /// 谁
        /// </summary>
        public int userid;

        /// <summary>
        /// 哪个玩家-提示用
        /// </summary>
        public string nickname;

        /// <summary>
        /// 玩家数据
        /// </summary>
        public DeskInfo.PlayerData[] players;

        /// <summary>
        /// 玩家的桌位信息
        /// </summary>
        public int[] seat;

        /// <summary>
        /// 请求解散投票数据
        /// </summary>
        public int[] plsDis;

        /// <summary>
        /// 是否立即开战
        /// </summary>
        public int[] onceFight;

        /// <summary>
        /// 
        /// </summary>
        public FriendPlayersInfo(){ }

        /// <summary>
        /// 获取玩家数据
        /// </summary>
        /// <param name="userid"></param>
        /// <returns></returns>
        public DeskInfo.PlayerData GetPlayer(int userid) {
            if (players == null)
                return null;
            int len = players.Length;
            for (int i = 0; i < len; i++) {
                if (players[i] != null && players[i].userid == userid)
                    return players[i];
            }
            return null;
        }
        

    }

    /// <summary>
    /// 战斗记录数据
    /// </summary>
    public class FightRecordData {
        /// <summary>
        /// 唯一码
        /// </summary>
        public string weiyima;

        /// <summary>
        /// 第几局
        /// </summary>
        public int index;

        /// <summary>
        /// 战斗数据 回放用
        /// </summary>
        public FightData data;

        /// <summary>
        /// 
        /// </summary>
        public FightRecordData() { }
    }

    public class FightRecordDataNew : FightRecordData {

        /// <summary>
        /// 游戏服务器id
        /// </summary>
        public int game_serid;

        /// <summary>
        /// zha
        /// </summary>
        public DateTime Time;

        public FightRecordDataNew() { }
    }

    /// <summary>
    /// 俱乐部回放数据
    /// </summary>
    public class ClubFriendFightdataReponse: FightRecordData
    { 
        /// <summary>
        /// 
        /// </summary>
        public ClubFriendFightdataReponse() { }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="data_"></param>
        public ClubFriendFightdataReponse(FightRecordData data_)
        {
            weiyima = data_.weiyima;
            index = data_.index;
            data = data_.data;
        }

        /// <summary>
        /// 
        /// </summary>
        public DeskInfo deskInfo;
    }

    public class ClubFriendFightdataReponseNew : FightRecordDataNew
    {
        /// <summary>
        /// 
        /// </summary>
        public ClubFriendFightdataReponseNew() { }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="data_"></param>
        public ClubFriendFightdataReponseNew(FightRecordDataNew data_)
        {
            weiyima = data_.weiyima;
            index = data_.index;
            data = data_.data;
            game_serid = data_.game_serid;
            Time = data_.Time;
        }

        /// <summary>
        /// 
        /// </summary>
        public DeskInfo deskInfo;
    }
}
