public ItemModifiers Parse(ParsingItem parsingItem) { var mods = new ItemModifiers(); ParseModifiers(mods.Explicit, ExplicitPatterns, parsingItem); ParseModifiers(mods.Enchant, EnchantPatterns, parsingItem); ParseModifiers(mods.Implicit, ImplicitPatterns, parsingItem); ParseModifiers(mods.Crafted, CraftedPatterns, parsingItem); ParseModifiers(mods.Fractured, FracturedPatterns, parsingItem); // ParseModifiers(mods.Veiled, VeiledPatterns, parsingItem); mods.Pseudo = pseudoModifierProvider.Parse(mods); return(mods); }
public ItemModifiers Parse(ParsingItem parsingItem) { var text = NewLinePattern.Replace(parsingItem.Text, "\n"); var mods = new ItemModifiers(); // Make sure the text ends with an empty line for our regexes to work correctly if (!text.EndsWith("\n")) { text += "\n"; } ParseMods(mods.Explicit, ExplicitPatterns, text); ParseMods(mods.Implicit, ImplicitPatterns, text); ParseMods(mods.Enchant, EnchantPatterns, text); ParseMods(mods.Crafted, CraftedPatterns, text); //FillMods(mods.Veiled, VeiledPatterns, text); ParseMods(mods.Fractured, FracturedPatterns, text); mods.Pseudo = pseudoModifierProvider.Parse(mods); return(mods); }