using System;
using System.Data;

namespace TXT
{
    public class TableCreator
    {
        public static Table CreateDefaultNPCTable()
        {
            Table NewTable = new Table();
            NewTable.ColumnTypeRow = "#ColumnType\tBYTE\tString[33]\tString[33]\tString[33]\tString[33]\tString[33]\tString[33]";
            NewTable.Source = new DataTable();
            NewTable.Source.TableName = "Tab00";

            NewTable.Source.Columns.Add(new DataColumn() { ColumnName = "Rec" });

            for (Int32 Counter = 0; Counter < 6; Counter++) { NewTable.Source.Columns.Add(new DataColumn() { ColumnName = String.Concat("Column0", Counter) }); }

            return NewTable;
        }

        public static Table CreateDefaultMobRegenGroup()
        {
            Table NewTable = new Table();
            NewTable.ColumnTypeRow = "#ColumnType\tINDEX\tString[1]\tDWRD\tDWRD\tDWRD\tDWRD\tDWRD";
            NewTable.Source = new DataTable();
            NewTable.Source.TableName = "MobRegenGroup";

            NewTable.Source.Columns.Add(new DataColumn() { ColumnName = "GroupIndex" });
            NewTable.Source.Columns.Add(new DataColumn() { ColumnName = "IsFamily" });
            NewTable.Source.Columns.Add(new DataColumn() { ColumnName = "CenterX" });
            NewTable.Source.Columns.Add(new DataColumn() { ColumnName = "CenterY" });
            NewTable.Source.Columns.Add(new DataColumn() { ColumnName = "Width" });
            NewTable.Source.Columns.Add(new DataColumn() { ColumnName = "Height" });
            NewTable.Source.Columns.Add(new DataColumn() { ColumnName = "RangeDegree" });

            return NewTable;
        }

        public static Table CreateMobRegen()
        {
            Table NewTable = new Table();
            NewTable.ColumnTypeRow = "#ColumnType\tINDEX\tString[33]\tBYTE\tBYTE\tDWRD\tDWRD\tDWRD\tDWRD\tDWRD\tDWRD\tDWRD\tDWRD\tDWRD\tDWRD\tDWRD\tDWRD";
            NewTable.Source = new DataTable();
            NewTable.Source.TableName = "MobRegen";

            NewTable.Source.Columns.Add(new DataColumn() { ColumnName = "RegenIndex" });
            NewTable.Source.Columns.Add(new DataColumn() { ColumnName = "MobIndex" });
            NewTable.Source.Columns.Add(new DataColumn() { ColumnName = "MobNum" });
            NewTable.Source.Columns.Add(new DataColumn() { ColumnName = "KillNum" });
            NewTable.Source.Columns.Add(new DataColumn() { ColumnName = "RegStandard" });
            NewTable.Source.Columns.Add(new DataColumn() { ColumnName = "RegMin" });
            NewTable.Source.Columns.Add(new DataColumn() { ColumnName = "RegMax" });
            NewTable.Source.Columns.Add(new DataColumn() { ColumnName = "RegDelta0" });
            NewTable.Source.Columns.Add(new DataColumn() { ColumnName = "RegSec0" });
            NewTable.Source.Columns.Add(new DataColumn() { ColumnName = "RegDelta1" });
            NewTable.Source.Columns.Add(new DataColumn() { ColumnName = "RegSec1" });
            NewTable.Source.Columns.Add(new DataColumn() { ColumnName = "RegDelta2" });
            NewTable.Source.Columns.Add(new DataColumn() { ColumnName = "RegSec2" });
            NewTable.Source.Columns.Add(new DataColumn() { ColumnName = "RegDelta3" });
            NewTable.Source.Columns.Add(new DataColumn() { ColumnName = "RegSec3" });
            NewTable.Source.Columns.Add(new DataColumn() { ColumnName = "RegDelta4" });

            return NewTable;
        }
    }
}
