private void SetAbility(ref DataRow dr) { Abilities = new Dictionary <string, string>(); string[] ability_name = { "HP", "FireRate", "Evasion", "Accuracy", "AttackSpeed", "MoveSpeed", "Critical" }; for (int i = 0; i < ability_name.Length; ++i) { Abilities.Add(ability_name[i], (string)dr[ability_name[i]]); } Abilities.Add("Grow", (string)dr["Grow"]); if (ETC.IsDBNullOrBlank(dr, "Bullet") == true) { Abilities.Add("Bullet", "0"); } else { Abilities.Add("Bullet", (string)dr["Bullet"]); } if (ETC.IsDBNullOrBlank(dr, "Armor") == true) { Abilities.Add("Armor", "0"); } else { Abilities.Add("Armor", (string)dr["Armor"]); } AbilityGrade = ((string)dr["AbilityGrade"]).Split(';'); }
internal Fairy(DataRow dr, bool basic_info = false) { Name = (string)dr["Name"]; DicNumber = (int)dr["DicNumber"]; Type = (string)dr["Type"]; ProductTime = (int)dr["ProductTime"]; Note = ETC.IsDBNullOrBlank(dr, "Note") ? "" : (string)dr["Note"]; ProductDialog = ETC.IsDBNullOrBlank(dr, "ProductDialog") ? "" : (string)dr["ProductDialog"]; SkillName = (string)dr["SkillName"]; SkillExplain = (string)dr["SkillExplain"]; SkillEffect = ((string)dr["SkillEffect"]).Split(';'); SkillRate = ((string)dr["SkillRate"]).Split(';'); OrderConsume = (int)dr["OrderConsume"]; CoolDown = (int)dr["CoolDown"]; SetAbility(ref dr); }
internal Equip(DataRow dr, bool basic_info = false) { Name = (string)dr["Name"]; Id = (int)dr["Id"]; Grade = (int)dr["Grade"]; ProductTime = (int)dr["ProductTime"]; Category = (string)dr["Category"]; Icon = (string)dr["Icon"]; Note = ETC.IsDBNullOrBlank(dr, "Note") ? "" : (string)dr["Note"]; Type = (string)dr["Type"]; ProductDialog = ETC.IsDBNullOrBlank(dr, "ProductDialog") ? "" : (string)dr["ProductDialog"]; ImagePath = Path.Combine(ETC.cachePath, "Equip", "Normal", string.Format("{0}.gfdcache", Icon)); OnlyUse = ETC.IsDBNullOrBlank(dr, "OnlyUse") ? null : ((string)dr["OnlyUse"]).Split(';'); DollType = ETC.IsDBNullOrBlank(dr, "DollType") ? null : ((string)dr["DollType"]).Split(';'); SpecialDoll = ETC.IsDBNullOrBlank(dr, "SpecialDoll") ? null : ((string)dr["SpecialDoll"]).Split(';'); SetAbility(ref dr); }
internal Doll(DataRow dr, bool basic_info = false) { Name = (string)dr["Name"]; ProductDialog = ETC.IsDBNullOrBlank(dr, "ProductDialog") ? "" : (string)dr["ProductDialog"]; krName = (string)dr["Name"]; NickName = (string)dr["NickName"]; CodeName = (string)dr["CodeName"]; DicNumber = (int)dr["DicNumber"]; RealModel = (string)dr["Model"]; Country = SetCountry(ref dr); Grade = (int)dr["Grade"]; ProductTime = (int)dr["ProductTime"]; Type = (string)dr["Type"]; DropEvent = ((string)dr["DropEvent"]).Split(','); HasMod = (bool)dr["HasMod"]; HasVoice = (bool)dr["HasVoice"]; Illustrator = ETC.IsDBNullOrBlank(dr, "Illustrator") ? "" : (string)dr["Illustrator"]; HasCensored = (bool)dr["HasCensor"]; CensorType = HasCensored ? ((string)dr["CensorType"]).Split(';') : null; Costumes = ETC.IsDBNullOrBlank(dr, "Costume") == true ? null : ((string)dr["Costume"]).Split(';'); string[] BuffFormation_Data = ((string)dr["EffectFormation"]).Split(','); BuffFormation = new int[9]; for (int i = 0; i < BuffFormation_Data.Length; ++i) { BuffFormation[i] = int.Parse(BuffFormation_Data[i]); } BuffInfo = ((string)dr["Effect"]).Split(';'); BuffType = ((string)dr["EffectType"]).Split(','); SkillName = (string)dr["Skill"]; SkillExplain = (string)dr["SkillExplain"]; SkillEffect = ((string)dr["SkillEffect"]).Split(';'); SkillMag = ((string)dr["SkillMag"]).Split(','); if (HasMod == true) { ModGrade = (int)dr["ModGrade"]; string[] ModBuffFormation_Data = ((string)dr["ModEffectFormation"]).Split(','); ModBuffFormation = new int[9]; for (int i = 0; i < ModBuffFormation_Data.Length; ++i) { ModBuffFormation[i] = int.Parse(ModBuffFormation_Data[i]); } ModBuffInfo = ((string)dr["ModEffect"]).Split(';'); ModSkillName = (string)dr["ModSkill"]; ModSkillExplain = (string)dr["ModSkillExplain"]; ModSkillEffect = ((string)dr["ModSkillEffect"]).Split(';'); ModSkillMag = ((string)dr["ModSkillMag"]).Split(','); SkillMagAfterMod = ((string)dr["SkillMagAfterMod"]).Split(','); } if (basic_info == false) { if (HasVoice == true) { Voices = ((string)dr["Voices"]).Split(';'); VoiceActor = ETC.IsDBNullOrBlank(dr, "VoiceActor") ? "" : (string)dr["VoiceActor"]; if (ETC.IsDBNullOrBlank(dr, "CostumeVoices") == false) { string[] temp = ((string)dr["CostumeVoices"]).Split('/'); CostumeVoices = new string[temp.Length, 2]; for (int i = 0; i < temp.Length; ++i) { CostumeVoices[i, 0] = temp[i].Split(':')[0]; CostumeVoices[i, 1] = temp[i].Split(':')[1]; } } } else { Voices = null; CostumeVoices = null; } SetAbility(ref dr); } }