]> git.tdb.fi Git - poefilter.git/blobdiff - source/rangecondition.h
Change the minimum value of itemlevel and droplevel to 1
[poefilter.git] / source / rangecondition.h
index 8355135fc2341c7f580e91f4b29ce3fbf422c4ea..d4d11fa852605bb4f93b13be0e97c14ea5dc8c5c 100644 (file)
@@ -22,6 +22,7 @@ public:
        virtual RangeCondition<T> *clone() const;
        virtual bool can_merge(const Condition &, const CompoundCondition &) const;
        virtual RangeCondition<T> *merge(const std::vector<Condition *> &, const CompoundCondition &) const;
+       virtual bool is_viable() const { return min<=max; }
        virtual void add_lines(std::list<FilterStatement> &) const;
 };
 
@@ -51,7 +52,7 @@ typedef RangeCondition<QualityTraits> QualityCondition;
 struct ItemLevelTraits
 {
        typedef unsigned Type;
-       static unsigned get_min() { return 0; }
+       static unsigned get_min() { return 1; }
        static unsigned get_max() { return 100; }
        static const char *get_keyword() { return "ItemLevel"; }
 };
@@ -62,7 +63,7 @@ typedef RangeCondition<ItemLevelTraits> ItemLevelCondition;
 struct DropLevelTraits
 {
        typedef unsigned Type;
-       static unsigned get_min() { return 0; }
+       static unsigned get_min() { return 1; }
        static unsigned get_max() { return 100; }
        static const char *get_keyword() { return "DropLevel"; }
 };