public Dictionary <int, Bloodline> GetBloodlineInformation() { Dictionary <int, Bloodline> result = new Dictionary <int, Bloodline>(); MySqlConnection connection = null; MySqlDataReader reader = Database.Query( ref connection, "SELECT " + " bloodlineTypes.bloodlineID, typeID, bloodlineName, raceID, description, maleDescription, " + " femaleDescription, shipTypeID, corporationID, perception, willpower, charisma, memory, " + " intelligence, graphicID, shortDescription, shortMaleDescription, shortFemaleDescription " + " FROM bloodlineTypes, chrBloodlines " + " WHERE chrBloodlines.bloodlineID = bloodlineTypes.bloodlineID" ); using (connection) using (reader) { while (reader.Read() == true) { Bloodline bloodline = new Bloodline( reader.GetInt32(0), this.TypeManager[reader.GetInt32(1)], reader.GetString(2), reader.GetInt32(3), reader.GetString(4), reader.GetString(5), reader.GetString(6), this.TypeManager[reader.GetInt32(7)], reader.GetInt32(8), reader.GetInt32(9), reader.GetInt32(10), reader.GetInt32(11), reader.GetInt32(12), reader.GetInt32(13), reader.GetInt32OrDefault(14), reader.GetString(15), reader.GetString(16), reader.GetString(17) ); result[bloodline.ID] = bloodline; } } return(result); }
public Dictionary <int, Ancestry> GetAncestryInformation(Dictionary <int, Bloodline> bloodlines) { Dictionary <int, Ancestry> result = new Dictionary <int, Ancestry>(); MySqlConnection connection = null; MySqlDataReader reader = Database.Query( ref connection, "SELECT " + " ancestryID, ancestryName, bloodlineID, description, perception, willpower, charisma," + " memory, intelligence, graphicID, shortDescription " + " FROM chrAncestries " ); using (connection) using (reader) { while (reader.Read() == true) { Ancestry ancestry = new Ancestry( reader.GetInt32(0), reader.GetString(1), bloodlines [reader.GetInt32(2)], reader.GetString(3), reader.GetInt32(4), reader.GetInt32(5), reader.GetInt32(6), reader.GetInt32(7), reader.GetInt32(8), reader.GetInt32OrDefault(9), reader.GetString(10) ); result[ancestry.ID] = ancestry; } } return(result); }