From 5fcd94eb19afc9291a2f99b4b6fe1ec4ee4661d1 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Wed, 29 Aug 2018 21:10:10 +0300 Subject: [PATCH] Add support for map tier condition --- source/category.cpp | 1 + source/rangecondition.h | 11 +++++++++++ 2 files changed, 12 insertions(+) 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; -- 2.45.2