]> git.tdb.fi Git - poefilter.git/commitdiff
Add support for map tier condition
authorMikko Rasa <tdb@tdb.fi>
Wed, 29 Aug 2018 18:10:10 +0000 (21:10 +0300)
committerMikko Rasa <tdb@tdb.fi>
Wed, 29 Aug 2018 18:10:10 +0000 (21:10 +0300)
source/category.cpp
source/rangecondition.h

index 0f6eb3f57e962ab0021b7b238aabff1a2470b571..e697aeefac209d456bb2ac30d6f8bb1474d75e55 100644 (file)
@@ -74,6 +74,7 @@ Category::Loader::Loader(Category &c, const PoeFilter &p, CompoundCondition *n):
        add_range<ItemLevelCondition>("item_level");
        add("linked_colors", &Loader::linked_colors);
        add_range<LinkedSocketsCondition>("linked_sockets");
+       add_range<MapTierCondition>("map_tier");
        add_range<SocketsCondition>("sockets");
        add("or", &Loader::or_);
        add_range<QualityCondition>("quality");
index 811a1aa48ffba85371d04249ef0ce0eef0f4cb36..7d85125b6dae6392be187bf4932bf14b54f57867 100644 (file)
@@ -72,6 +72,17 @@ struct DropLevelTraits
 typedef RangeCondition<DropLevelTraits> 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<MapTierTraits> MapTierCondition;
+
+
 struct WidthTraits
 {
        typedef unsigned Type;