X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcategory.cpp;h=e697aeefac209d456bb2ac30d6f8bb1474d75e55;hb=a63386ae627f093296944e1426e698cf520c1644;hp=fb12fec0ddfd25fa0dc14996b80e780af62507ae;hpb=62b3368537301dd6bb6033d87000099c7adfff80;p=poefilter.git diff --git a/source/category.cpp b/source/category.cpp index fb12fec..e697aee 100644 --- a/source/category.cpp +++ b/source/category.cpp @@ -47,7 +47,15 @@ void Category::create_statements(list &st) const st.push_back(FilterStatement()); if(condition) - condition->add_lines(st); + { + Condition *flat = condition->flatten(); + if(flat) + { + flat->add_lines(st); + delete flat; + } + // TODO handle the case of the entire condition being non-viable + } } @@ -66,6 +74,7 @@ Category::Loader::Loader(Category &c, const PoeFilter &p, CompoundCondition *n): add_range("item_level"); add("linked_colors", &Loader::linked_colors); add_range("linked_sockets"); + add_range("map_tier"); add_range("sockets"); add("or", &Loader::or_); add_range("quality");