protected override Helper Build(Iterable <string> serverData, string version) { int.TryParse(serverData.Next().Without("H"), out int helperId); int.TryParse(serverData.Next(), out int order); Enum.TryParse(serverData.Next(), out HelperType type); double.TryParse(serverData.Next(), out double baseCost); int.TryParse(serverData.Next(), out int isInGame); var skills = HelperSkills.GetAll().Result.Where(h => h.HelperId == helperId).ToList(); return(new Helper(helperId, order, type, baseCost, skills, isInGame > 0, version, GetImage)); }
protected override Skill Build(Iterable <string> serverData, string version) { Enum.TryParse(serverData.Next(), out SkillId id); var note = serverData.Next(); Enum.TryParse(serverData.Next(), out SkillId req); int.TryParse(serverData.Next(), out var stageReq); var levels = new List <(int, double)>(); //for (int i = 0; i < 20; i++) //{ // var hasCost = int.TryParse(serverData[4 + i], out var cost); // var hasBonus = double.TryParse(serverData[26 + i], out var bonus); // if (hasBonus) // levels.Add((cost, bonus)); // else // break; //} return(new Skill(id, note, req, CachedObjects, stageReq, levels, version, GetImage)); }
protected override Pet Build(Iterable <string> serverData, string version) { var incrementRange = new Dictionary <int, double> { }; int.TryParse(serverData.Next().Without("Pet"), out int id); double.TryParse(serverData.Next(), out double damageBase); double.TryParse(serverData.Next(), out double inc1to40); double.TryParse(serverData.Next(), out double inc41to80); double.TryParse(serverData.Next(), out double inc80on); Enum.TryParse(serverData.Next(), out BonusType bonusType); double.TryParse(serverData.Next(), out double bonusBase); double.TryParse(serverData.Next(), out double bonusIncrement); incrementRange.Add(1, inc1to40); incrementRange.Add(41, inc41to80); incrementRange.Add(81, inc80on); return(new Pet(id, damageBase, incrementRange, bonusType, bonusBase, bonusIncrement, version, GetImage)); }
protected override HelperSkill Build(Iterable <string> serverData, string version) { int.TryParse(serverData.Next(), out int skillId); int.TryParse(serverData.Next().Without("H"), out int helperId); var name = serverData.Next(); Enum.TryParse(serverData.Next(), out BonusType type); double.TryParse(serverData.Next(), out double magnitude); int.TryParse(serverData.Next(), out int requirement); Names.Add(skillId, name); return(new HelperSkill(skillId, helperId, type, magnitude, requirement, version)); }
protected override Artifact Build(Iterable <string> serverData, string version) { int.TryParse(serverData.Next().Without("Artifact"), out int id); int.TryParse(serverData.Next(), out int maxLevel); //string tt1 = serverData.Next(); var bonustext = serverData.Next(); Enum.TryParse(bonustext, out BonusType bonusType); double.TryParse(serverData.Next(), out double effectPerLevel); double.TryParse(serverData.Next(), out double growthMax); double.TryParse(serverData.Next(), out double growthRate); double.TryParse(serverData.Next(), out double growthExpo); double.TryParse(serverData.Next(), out double damageBonus); double.TryParse(serverData.Next(), out double costCoef); double.TryParse(serverData.Next(), out double costExpo); string note = serverData.Next(); string name = serverData.Next(); return(new Artifact(id, maxLevel == 0 ? (int?)null : maxLevel, //tt1, bonusType, effectPerLevel, growthMax, growthRate, growthExpo, damageBonus, costCoef, costExpo, note, version, GetImage)); }
protected override Equipment Build(Iterable <string> serverData, string version) { Enum.TryParse(serverData.Next(), out EquipmentId id); Enum.TryParse(serverData.Next(), out EquipmentClass eClass); Enum.TryParse(serverData.Next(), out BonusType bonusType); Enum.TryParse(serverData.Next(), out EquipmentRarity rarity); double.TryParse(serverData.Next(), out double attributeBase); double.TryParse(serverData.Next(), out double attributeBaseInc); double.TryParse(serverData.Next(), out double attributeExp1); double.TryParse(serverData.Next(), out double attributeExp2); double.TryParse(serverData.Next(), out double attributeExpBase); Enum.TryParse(serverData.Next(), out EquipmentSource source); double.TryParse(serverData.Next(), out double _1163_1); double.TryParse(serverData.Next(), out double _1163_2); double.TryParse(serverData.Next(), out double _2095_1); double.TryParse(serverData.Next(), out double _2095_2); double.TryParse(serverData.Next(), out double _4450_1); double.TryParse(serverData.Next(), out double _4450_2); return(new Equipment(id, eClass, bonusType, rarity, attributeBase, attributeBaseInc, attributeExp1, attributeExp2, attributeExpBase, source, new[] { _1163_1, _1163_2 }, new[] { _2095_1, _2095_2 }, new[] { _4450_1, _4450_2 }, version, GetImage)); }