コード例 #1
0
ファイル: YgopotStruct.cs プロジェクト: 247321453/YgoServer
 public static void Parse(this GameConfig config, HostInfo info)
 {
     config.LfList = BanlistManager.GetIndex(info.LfList);
     config.BanList = BanlistManager.GetName(config.LfList);
     config.Rule = info.Rule;
     config.Mode = info.Mode;
     config.EnablePriority = info.EnablePriority==1;
     config.NoCheckDeck = info.NoCheckDeck==1;
     config.NoShuffleDeck = info.NoShuffleDeck == 1;
     config.StartLp = (int)info.StartLp;
     config.StartHand = info.StartHand;
     config.DrawCount = info.DrawCount;
     config.GameTimer = info.GameTimer;
 }
 public static void Parse(this GameConfig config, HostInfo info)
 {
     config.LfList         = BanlistManager.GetIndex(info.LfList);
     config.BanList        = BanlistManager.GetName(config.LfList);
     config.Rule           = info.Rule;
     config.Mode           = info.Mode;
     config.EnablePriority = info.EnablePriority == 1;
     config.NoCheckDeck    = info.NoCheckDeck == 1;
     config.NoShuffleDeck  = info.NoShuffleDeck == 1;
     config.StartLp        = (int)info.StartLp;
     config.StartHand      = info.StartHand;
     config.DrawCount      = info.DrawCount;
     config.GameTimer      = info.GameTimer;
 }
コード例 #3
0
ファイル: YgopotStruct.cs プロジェクト: 247321453/YgoServer
 public static HostInfo ToHostInfo(this GameConfig config)
 {
     HostInfo info = new HostInfo();
     if (config != null)
     {
         info.LfList = (uint)config.LfList;
         info.Rule = (byte)config.Rule;
         info.Mode = (byte)config.Mode;
         info.EnablePriority = (byte)(config.EnablePriority ? 1 : 0);
         info.NoCheckDeck = (byte)(config.NoCheckDeck ? 1 : 0);
         info.NoShuffleDeck = (byte)(config.NoShuffleDeck ? 1 : 0);
         info.StartLp = (uint)config.StartLp;
         info.StartHand = (byte)config.StartHand;
         info.DrawCount = (byte)config.DrawCount;
         info.GameTimer = (ushort)config.GameTimer;
     }
     return info;
 }
        public static HostInfo ToHostInfo(this GameConfig config)
        {
            HostInfo info = new HostInfo();

            if (config != null)
            {
                info.LfList         = (uint)config.LfList;
                info.Rule           = (byte)config.Rule;
                info.Mode           = (byte)config.Mode;
                info.EnablePriority = (byte)(config.EnablePriority ? 1 : 0);
                info.NoCheckDeck    = (byte)(config.NoCheckDeck ? 1 : 0);
                info.NoShuffleDeck  = (byte)(config.NoShuffleDeck ? 1 : 0);
                info.StartLp        = (uint)config.StartLp;
                info.StartHand      = (byte)config.StartHand;
                info.DrawCount      = (byte)config.DrawCount;
                info.GameTimer      = (ushort)config.GameTimer;
            }
            return(info);
        }