private void ParseProperties(ref Item item, ref string input) { var blocks = SeparatorPattern.Split(input); item.Properties.Armor = patterns.GetInt(patterns.Armor, blocks[1]); item.Properties.EnergyShield = patterns.GetInt(patterns.EnergyShield, blocks[1]); item.Properties.Evasion = patterns.GetInt(patterns.Evasion, blocks[1]); item.Properties.ChanceToBlock = patterns.GetInt(patterns.ChanceToBlock, blocks[1]); item.Properties.Quality = patterns.GetInt(patterns.Quality, blocks[1]); item.Properties.MapTier = patterns.GetInt(patterns.MapTier, blocks[1]); item.Properties.ItemQuantity = patterns.GetInt(patterns.ItemQuantity, blocks[1]); item.Properties.ItemRarity = patterns.GetInt(patterns.ItemRarity, blocks[1]); item.Properties.MonsterPackSize = patterns.GetInt(patterns.MonsterPackSize, blocks[1]); item.Properties.AttacksPerSecond = patterns.GetDouble(patterns.AttacksPerSecond, blocks[1]); item.Properties.CriticalStrikeChance = patterns.GetDouble(patterns.CriticalStrikeChance, blocks[1]); item.Properties.ElementalDps = patterns.GetDps(patterns.ElementalDamage, blocks[1], item.Properties.AttacksPerSecond); item.Properties.PhysicalDps = patterns.GetDps(patterns.PhysicalDamage, blocks[1], item.Properties.AttacksPerSecond); item.Properties.DamagePerSecond = item.Properties.ElementalDps + item.Properties.PhysicalDps; item.Properties.Blighted = patterns.Blighted.IsMatch(blocks[0]); if (item.Rarity == Rarity.Gem) { item.Properties.GemLevel = patterns.GetInt(patterns.Level, blocks[1]); } }
private void ParseEquipmentProperties(Item item, ParsingItem parsingItem) { var propertySection = parsingItem.WholeSections[1]; item.ItemLevel = patterns.GetInt(patterns.ItemLevel, item.Text); item.Identified = !ParseFromEnd(patterns.Unidentified, parsingItem); item.Properties.Armor = patterns.GetInt(patterns.Armor, propertySection); item.Properties.EnergyShield = patterns.GetInt(patterns.EnergyShield, propertySection); item.Properties.Evasion = patterns.GetInt(patterns.Evasion, propertySection); item.Properties.ChanceToBlock = patterns.GetInt(patterns.ChanceToBlock, propertySection); item.Properties.Quality = patterns.GetInt(patterns.Quality, propertySection); item.Properties.AttacksPerSecond = patterns.GetDouble(patterns.AttacksPerSecond, propertySection); item.Properties.CriticalStrikeChance = patterns.GetDouble(patterns.CriticalStrikeChance, propertySection); item.Properties.ElementalDps = patterns.GetDps(patterns.ElementalDamage, propertySection, item.Properties.AttacksPerSecond); item.Properties.PhysicalDps = patterns.GetDps(patterns.PhysicalDamage, propertySection, item.Properties.AttacksPerSecond); item.Properties.DamagePerSecond = item.Properties.ElementalDps + item.Properties.PhysicalDps; item.Corrupted = ParseFromEnd(patterns.Corrupted, parsingItem); }