GetParserType() public static method

public static GetParserType ( UInt32 TypeId, UInt32 subTypeId ) : ParserType
TypeId System.UInt32
subTypeId System.UInt32
return ParserType
Exemplo n.º 1
0
        public static void ParseData(UInt32 typeId, Int32 subTypeIdFlags, UInt32 entry)
        {
            List <String> content;
            List <int>    ids = Def.ExtractFlags(typeId, subTypeIdFlags);

            try
            {
                content = (usePreCached ? ReadFile(Def.GenerateWowheadFileName(typeId, entry)) : ReadPage(Def.GenerateWowheadUrl(typeId, entry)));
            }
            catch (Exception e)
            {
                datad += Def.GetValidFlags(typeId, subTypeIdFlags);
                Console.WriteLine("{0}% - Error while parsing Entry {1} ({2})", Math.Round(datad / (float)commandList.Count * 100, 2), entry, e.Message);
                return;
            }

            foreach (uint subTypeId in ids)
            {
                Ripp(Def.GetParserType(typeId, subTypeId), entry, typeId, subTypeId, content);
            }
            return;
        }