Ejemplo n.º 1
0
        public static Actor FromDataRow(DataRow row)
        {
            if (row == null) { throw new ArgumentNullException("row"); }
            Actor actor = new Actor()
            {
                ID = (int)row["ID"],
                BaseModel = (int)row["6"],
                Hair = (int)row["8"],
                HairIdx = (int)row["9"],
                HairVariation = (int)row["10"],
                Face = (int)row["11"],
                FaceIdx = (int)row["12"],
                FaceVariation = (int)row["13"],
                C7 = (int)row["7"],
                C14 = (int)row["14"],
                C15 = (int)row["15"],
                C16 = (int)row["16"],
                C17 = (int)row["17"],
                C18 = (int)row["18"],
                C19 = (int)row["19"],
                C20 = (int)row["20"],
                C21 = (int)row["21"],
                C22 = (int)row["22"],
                C23 = (int)row["23"],
                C24 = (int)row["24"],
                Weapon1 = (int)row["25"],
                Weapon2 = (int)row["26"],
                Weapon3 = (int)row["27"],
                C28 = (int)row["28"],
                Weapon4 = (int)row["29"],
                Weapon5 = (int)row["30"],
                C31 = (int)row["31"],
                HelmModel = (int)row["32"],
                TopModel = (int)row["33"],
                BottomModel = (int)row["34"],
                GloveModel = (int)row["35"],
                ShoeModel = (int)row["36"],
                BeltModel = (int)row["37"],
                C38 = (int)row["38"]
            };

            actor.CalculateVarEquipIds();
            return actor;
        }
Ejemplo n.º 2
0
        private static void InsertRow(Actor row)
        {
            insert.Parameters["@ActorclassId"].Value = row.ID;
            insert.Parameters["@Name"].Value = row.Name;
            insert.Parameters["@BaseModel"].Value = row.BaseModel;
            insert.Parameters["@HelmModel"].Value = row.HelmModel;
            insert.Parameters["@HelmVarEquipId"].Value = row.HelmVarEquipId;
            insert.Parameters["@TopModel"].Value = row.TopModel;
            insert.Parameters["@TopVarEquipId"].Value = row.TopVarEquipId;
            insert.Parameters["@BottomModel"].Value = row.BottomModel;
            insert.Parameters["@BottomVarEquipId"].Value = row.BottomVarEquipId;
            insert.Parameters["@GloveModel"].Value = row.GloveModel;
            insert.Parameters["@GloveVarEquipId"].Value = row.GloveVarEquipId;
            insert.Parameters["@ShoeModel"].Value = row.ShoeModel;
            insert.Parameters["@ShoeVarEquipId"].Value = row.ShoeVarEquipId;
            insert.Parameters["@BeltModel"].Value = row.BeltModel;
            insert.Parameters["@Weapon1"].Value = row.Weapon1;
            insert.Parameters["@Weapon2"].Value = row.Weapon2;
            insert.Parameters["@Weapon3"].Value = row.Weapon3;
            insert.Parameters["@Weapon4"].Value = row.Weapon4;
            insert.Parameters["@Weapon5"].Value = row.Weapon5;
            insert.Parameters["@Hair"].Value = row.Hair;
            insert.Parameters["@HairIdx"].Value = row.HairIdx;
            insert.Parameters["@HairVariation"].Value = row.HairVariation;
            insert.Parameters["@HairVarEquipId"].Value = row.HairVarEquipId;
            insert.Parameters["@Face"].Value = row.Face;
            insert.Parameters["@FaceIdx"].Value = row.FaceIdx;
            insert.Parameters["@FaceVariation"].Value = row.FaceVariation;
            insert.Parameters["@FaceVarEquipId"].Value = row.FaceVarEquipId;
            insert.Parameters["@C7"].Value = row.C7;
            insert.Parameters["@C14"].Value = row.C14;
            insert.Parameters["@C15"].Value = row.C15;
            insert.Parameters["@C16"].Value = row.C16;
            insert.Parameters["@C17"].Value = row.C17;
            insert.Parameters["@C18"].Value = row.C18;
            insert.Parameters["@C19"].Value = row.C19;
            insert.Parameters["@C20"].Value = row.C20;
            insert.Parameters["@C21"].Value = row.C21;
            insert.Parameters["@C22"].Value = row.C22;
            insert.Parameters["@C23"].Value = row.C23;
            insert.Parameters["@C24"].Value = row.C24;
            insert.Parameters["@C28"].Value = row.C28;
            insert.Parameters["@C31"].Value = row.C31;
            insert.Parameters["@C38"].Value = row.C38;

            insert.ExecuteNonQuery();
        }
Ejemplo n.º 3
0
        public static Actor FromDataReader(SQLiteDataReader reader)
        {
            if (reader == null) { throw new ArgumentNullException("reader"); }
            Actor actor = new Actor()
            {
                ID = (int)reader["ActorclassID"],
                Name = (string)reader["Name"],
                Name_fr = (string)reader["Name_fr"],
                Name_de = (string)reader["Name_de"],
                Name_ja = (string)reader["Name_ja"],
                BaseModel = (int)reader["BaseModel"],
                Hair = (int)reader["Hair"],
                HairIdx = (int)reader["HairIdx"],
                HairVariation = (int)reader["HairVariation"],
                HairVarEquipId = (int)reader["HairVarEquipId"],
                Face = (int)reader["Face"],
                FaceIdx = (int)reader["FaceIdx"],
                FaceVariation = (int)reader["FaceVariation"],
                FaceVarEquipId = (int)reader["FaceVarEquipId"],
                C7 = (int)reader["C7"],
                C14 = (int)reader["C14"],
                C15 = (int)reader["C15"],
                C16 = (int)reader["C16"],
                C17 = (int)reader["C17"],
                C18 = (int)reader["C18"],
                C19 = (int)reader["C19"],
                C20 = (int)reader["C20"],
                C21 = (int)reader["C21"],
                C22 = (int)reader["C22"],
                C23 = (int)reader["C23"],
                C24 = (int)reader["C24"],
                Weapon1 = (int)reader["Weapon1"],
                Weapon2 = (int)reader["Weapon2"],
                Weapon3 = (int)reader["Weapon3"],
                C28 = (int)reader["C28"],
                Weapon4 = (int)reader["Weapon4"],
                Weapon5 = (int)reader["Weapon5"],
                C31 = (int)reader["C31"],
                HelmModel = (int)reader["HelmModel"],
                HelmVarEquipId = (int)reader["HelmVarEquipId"],
                TopModel = (int)reader["TopModel"],
                TopVarEquipId = (int)reader["TopVarEquipId"],
                BottomModel = (int)reader["BottomModel"],
                BottomVarEquipId = (int)reader["BottomVarEquipId"],
                GloveModel = (int)reader["GloveModel"],
                GloveVarEquipId = (int)reader["GloveVarEquipId"],
                ShoeModel = (int)reader["ShoeModel"],
                ShoeVarEquipId = (int)reader["ShoeVarEquipId"],
                BeltModel = (int)reader["BeltModel"],
                C38 = (int)reader["C38"]
            };

            return actor;
        }