X-Git-Url: http://git.tdb.fi/?p=poefilter.git;a=blobdiff_plain;f=source%2Fcategory.cpp;h=fb12fec0ddfd25fa0dc14996b80e780af62507ae;hp=bb2484dca021cbe11e52953ccf3f1c10ef65dbe7;hb=62b3368537301dd6bb6033d87000099c7adfff80;hpb=2cfafa2ad7ec8069247138b81982a10dea4b812a diff --git a/source/category.cpp b/source/category.cpp index bb2484d..fb12fec 100644 --- a/source/category.cpp +++ b/source/category.cpp @@ -59,6 +59,7 @@ Category::Loader::Loader(Category &c, const PoeFilter &p, CompoundCondition *n): { add("and", &Loader::and_); add("base_type", &Loader::condition); + add("category", &Loader::category); add("class", &Loader::condition); add_range("drop_level"); add_range("height"); @@ -106,6 +107,12 @@ void Category::Loader::and_() add_condition(cond.release()); } +void Category::Loader::category(const string &name) +{ + const Category &categ = poe.get_category(name); + add_condition(categ.condition->clone()); +} + template void Category::Loader::condition(typename T::Type value) {