X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcategory.cpp;h=fb12fec0ddfd25fa0dc14996b80e780af62507ae;hb=715006802a65fa5f541f2f4bcccbdd62d1a2bf09;hp=bb2484dca021cbe11e52953ccf3f1c10ef65dbe7;hpb=affc72bbd6ef9bcf2c5f94553a53582d42d40cc2;p=poefilter.git 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) {