internal SerializableCCPCharacter CreateCharacter() { var serial = new SerializableCCPCharacter() { ID = 9999999, Name = tbCharacterName.Text, Birthday = DateTime.UtcNow, Race = m_race.ToString(), BloodLine = m_bloodline.ToString().Replace("_", "-"), Ancestry = m_ancestry.ToString().Replace("_", " "), Gender = m_gender.ToString(), CorporationName = "Blank Character's Corp", CorporationID = 9999999, CloneName = "Clone Grade Alpha", CloneSkillPoints = 900000, Balance = 0, Attributes = new SerializableCharacterAttributes() { Intelligence = EveConstants.CharacterBaseAttributePoints + 3, Memory = EveConstants.CharacterBaseAttributePoints + 3, Perception = EveConstants.CharacterBaseAttributePoints + 3, Willpower = EveConstants.CharacterBaseAttributePoints + 3, Charisma = EveConstants.CharacterBaseAttributePoints + 2 }, ImplantSets = new SerializableImplantSetCollection() { API = new SerializableSettingsImplantSet() { Name = "Implants from API" }, OldAPI = new SerializableSettingsImplantSet() { Name = "Previous implants from the API" }, }, Skills = GetSkillsForRace(), Certificates = new List <SerializableCharacterCertificate>(), }; return(serial); }
/// <summary> /// Updates the ancestry controls. /// </summary> private void UpdateAncestryControl() { int index = 0; switch (BlankCharacterUIHelper.Bloodline) { case Bloodline.Unknown: case Bloodline.Amarr: break; case Bloodline.Ni_Kunni: index = 3; break; case Bloodline.Khanid: index = 6; break; case Bloodline.Deteis: index = 9; break; case Bloodline.Civire: index = 12; break; case Bloodline.Achura: index = 15; break; case Bloodline.Gallente: index = 18; break; case Bloodline.Intaki: index = 21; break; case Bloodline.Jin_Mei: index = 24; break; case Bloodline.Sebiestor: index = 27; break; case Bloodline.Brutor: index = 30; break; case Bloodline.Vherokior: index = 33; break; default: throw new NotImplementedException(); } // Calculate bloodlines based on image position (they used to match up in code, // but the codes were remapped to match the SDE) Ancestry ancestry1 = ANCESTRIES_BY_INDEX[index], ancestry2 = ANCESTRIES_BY_INDEX[ index + 1], ancestry3 = ANCESTRIES_BY_INDEX[index + 2]; pbAncestry1.Image = ilAncestry.Images[index]; pbAncestry2.Image = ilAncestry.Images[index + 1]; pbAncestry3.Image = ilAncestry.Images[index + 2]; lblAncestry1.Text = ancestry1.ToString().ToUpper(CultureConstants.DefaultCulture). UnderscoresToSpaces(); lblAncestry2.Text = ancestry2.ToString().ToUpper(CultureConstants.DefaultCulture). UnderscoresToSpaces(); lblAncestry3.Text = ancestry3.ToString().ToUpper(CultureConstants.DefaultCulture). UnderscoresToSpaces(); lblAncestry1.Tag = ancestry1; lblAncestry2.Tag = ancestry2; lblAncestry3.Tag = ancestry3; if (rbAncestry1.Checked) { BlankCharacterUIHelper.Ancestry = ancestry1; } if (rbAncestry2.Checked) { BlankCharacterUIHelper.Ancestry = ancestry2; } if (rbAncestry3.Checked) { BlankCharacterUIHelper.Ancestry = ancestry3; } }