From: Mikko Rasa Date: Wed, 29 Aug 2018 18:10:10 +0000 (+0300) Subject: Add support for map tier condition X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=5fcd94eb19afc9291a2f99b4b6fe1ec4ee4661d1;p=poefilter.git Add support for map tier condition --- diff --git a/source/category.cpp b/source/category.cpp index 0f6eb3f..e697aee 100644 --- a/source/category.cpp +++ b/source/category.cpp @@ -74,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"); diff --git a/source/rangecondition.h b/source/rangecondition.h index 811a1aa..7d85125 100644 --- a/source/rangecondition.h +++ b/source/rangecondition.h @@ -72,6 +72,17 @@ struct DropLevelTraits typedef RangeCondition DropLevelCondition; +struct MapTierTraits +{ + typedef unsigned Type; + static unsigned get_min() { return 1; } + static unsigned get_max() { return 17; } + static const char *get_keyword() { return "MapTier"; } +}; + +typedef RangeCondition MapTierCondition; + + struct WidthTraits { typedef unsigned Type;