From 4b1150a6269b60d6291836bdb6c9e8c789881cd9 Mon Sep 17 00:00:00 2001 From: cohenaj194 Date: Thu, 21 Nov 2024 23:56:13 -0500 Subject: [PATCH 01/10] adding max_ilvl --- mega_alerts.py | 4 ++++ utils/mega_data_setup.py | 2 ++ 2 files changed, 6 insertions(+) diff --git a/mega_alerts.py b/mega_alerts.py index fd0805f..72887c4 100644 --- a/mega_alerts.py +++ b/mega_alerts.py @@ -338,6 +338,10 @@ def check_tertiary_stats_generic( if ilvl < min_ilvl: return False + # skip if ilvl is too high + if ilvl > DESIRED_ILVL_ITEMS["max_ilvl"]: + return False + # skip if required_lvl is too low if required_lvl < DESIRED_ILVL_ITEMS["required_min_lvl"]: return False diff --git a/utils/mega_data_setup.py b/utils/mega_data_setup.py index 7bb900d..cf84e71 100644 --- a/utils/mega_data_setup.py +++ b/utils/mega_data_setup.py @@ -376,9 +376,11 @@ def __set_desired_ilvl( ilvl_info["item_ids"] = ilvl_info.get("item_ids", []) ilvl_info["required_min_lvl"] = ilvl_info.get("required_min_lvl", 1) ilvl_info["required_max_lvl"] = ilvl_info.get("required_max_lvl", 1000) + ilvl_info["max_ilvl"] = ilvl_info.get("max_ilvl", 10000) example = { "ilvl": 360, + "max_ilvl": 10000, "buyout": 50000, "sockets": False, "speed": True, From 10d545af433e020a3eadf4d8e717a0daaab0d940 Mon Sep 17 00:00:00 2001 From: cohenaj194 Date: Fri, 22 Nov 2024 00:19:10 -0500 Subject: [PATCH 02/10] updated aaa ilvl page --- AzerothAuctionAssassin.py | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/AzerothAuctionAssassin.py b/AzerothAuctionAssassin.py index 31dfe1b..4354422 100644 --- a/AzerothAuctionAssassin.py +++ b/AzerothAuctionAssassin.py @@ -687,8 +687,9 @@ def make_ilvl_page(self, ilvl_page): self.ilvl_page_layout.addWidget(self.ilvl_item_input_label, 0, 0, 1, 1) self.ilvl_page_layout.addWidget(self.ilvl_item_input, 1, 0, 1, 1) + # Item Level inputs group self.ilvl_input = QLineEdit(ilvl_page) - self.ilvl_input_label = QLabel("Item Level", ilvl_page) + self.ilvl_input_label = QLabel("Min Item Level", ilvl_page) self.ilvl_input_label.setToolTip( "Set the minimum item level (ilvl) you want to snipe. Ex: 400 ilvl." ) @@ -697,6 +698,16 @@ def make_ilvl_page(self, ilvl_page): self.ilvl_page_layout.addWidget(self.ilvl_input_label, 2, 0, 1, 1) self.ilvl_page_layout.addWidget(self.ilvl_input, 3, 0, 1, 1) + self.ilvl_max_input = QLineEdit(ilvl_page) + self.ilvl_max_input_label = QLabel("Max Item Level", ilvl_page) + self.ilvl_max_input_label.setToolTip( + "Set the maximum item level (ilvl) you want to snipe. Ex: 500 ilvl." + ) + self.ilvl_max_input_label.setFixedSize(120, 15) + self.ilvl_max_input.setFixedSize(120, 25) + self.ilvl_page_layout.addWidget(self.ilvl_max_input_label, 4, 0, 1, 1) + self.ilvl_page_layout.addWidget(self.ilvl_max_input, 5, 0, 1, 1) + self.ilvl_price_input = QLineEdit(ilvl_page) self.ilvl_price_input_label = QLabel("Buyout", ilvl_page) self.ilvl_price_input_label.setToolTip( @@ -704,24 +715,24 @@ def make_ilvl_page(self, ilvl_page): ) self.ilvl_price_input_label.setFixedSize(120, 15) self.ilvl_price_input.setFixedSize(120, 25) - self.ilvl_page_layout.addWidget(self.ilvl_price_input_label, 4, 0, 1, 1) - self.ilvl_page_layout.addWidget(self.ilvl_price_input, 5, 0, 1, 1) + self.ilvl_page_layout.addWidget(self.ilvl_price_input_label, 6, 0, 1, 1) + self.ilvl_page_layout.addWidget(self.ilvl_price_input, 7, 0, 1, 1) self.ilvl_sockets = QCheckBox("Sockets", ilvl_page) self.ilvl_sockets.setToolTip("Do you want the item to have Sockets?") - self.ilvl_page_layout.addWidget(self.ilvl_sockets, 6, 0, 1, 1) + self.ilvl_page_layout.addWidget(self.ilvl_sockets, 8, 0, 1, 1) self.ilvl_speed = QCheckBox("Speed", ilvl_page) self.ilvl_speed.setToolTip("Do you want the item to have Speed?") - self.ilvl_page_layout.addWidget(self.ilvl_speed, 7, 0, 1, 1) + self.ilvl_page_layout.addWidget(self.ilvl_speed, 9, 0, 1, 1) self.ilvl_leech = QCheckBox("Leech", ilvl_page) self.ilvl_leech.setToolTip("Do you want the item to have Leech?") - self.ilvl_page_layout.addWidget(self.ilvl_leech, 8, 0, 1, 1) + self.ilvl_page_layout.addWidget(self.ilvl_leech, 10, 0, 1, 1) self.ilvl_avoidance = QCheckBox("Avoidance", ilvl_page) self.ilvl_avoidance.setToolTip("Do you want the item to have Avoidance?") - self.ilvl_page_layout.addWidget(self.ilvl_avoidance, 9, 0, 1, 1) + self.ilvl_page_layout.addWidget(self.ilvl_avoidance, 11, 0, 1, 1) self.ilvl_min_required_lvl_input = QLineEdit(ilvl_page) self.ilvl_min_required_lvl_input_label = QLabel("Min Player Level", ilvl_page) @@ -732,9 +743,9 @@ def make_ilvl_page(self, ilvl_page): self.ilvl_min_required_lvl_input_label.setFixedSize(120, 15) self.ilvl_min_required_lvl_input.setFixedSize(120, 25) self.ilvl_page_layout.addWidget( - self.ilvl_min_required_lvl_input_label, 10, 0, 1, 1 + self.ilvl_min_required_lvl_input_label, 12, 0, 1, 1 ) - self.ilvl_page_layout.addWidget(self.ilvl_min_required_lvl_input, 11, 0, 1, 1) + self.ilvl_page_layout.addWidget(self.ilvl_min_required_lvl_input, 13, 0, 1, 1) self.ilvl_max_required_lvl_input = QLineEdit(ilvl_page) self.ilvl_max_required_lvl_input_label = QLabel("Max Player Level", ilvl_page) @@ -745,9 +756,9 @@ def make_ilvl_page(self, ilvl_page): self.ilvl_max_required_lvl_input_label.setFixedSize(120, 15) self.ilvl_max_required_lvl_input.setFixedSize(120, 25) self.ilvl_page_layout.addWidget( - self.ilvl_max_required_lvl_input_label, 12, 0, 1, 1 + self.ilvl_max_required_lvl_input_label, 14, 0, 1, 1 ) - self.ilvl_page_layout.addWidget(self.ilvl_max_required_lvl_input, 13, 0, 1, 1) + self.ilvl_page_layout.addWidget(self.ilvl_max_required_lvl_input, 15, 0, 1, 1) self.add_ilvl_button = QPushButton("Add/Update Item", ilvl_page) self.add_ilvl_button.setToolTip("Add/Update item to your snipe list.") From 8db50986a2faae9e1160caee97478a9b61e53e9d Mon Sep 17 00:00:00 2001 From: cohenaj194 Date: Fri, 22 Nov 2024 10:26:37 -0500 Subject: [PATCH 03/10] working max ilvl --- utils/mega_data_setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/mega_data_setup.py b/utils/mega_data_setup.py index cf84e71..3769ef5 100644 --- a/utils/mega_data_setup.py +++ b/utils/mega_data_setup.py @@ -398,7 +398,7 @@ def __set_desired_ilvl( snipe_info = {} bool_vars = ["sockets", "speed", "leech", "avoidance"] - int_vars = ["ilvl", "buyout", "required_min_lvl", "required_max_lvl"] + int_vars = ["ilvl", "max_ilvl", "buyout", "required_min_lvl", "required_max_lvl"] for key, value in ilvl_info.items(): if key in bool_vars: if isinstance(ilvl_info[key], bool): From e125d51018b8f827b4e644449278f9a919fb8913 Mon Sep 17 00:00:00 2001 From: cohenaj194 Date: Fri, 22 Nov 2024 10:29:59 -0500 Subject: [PATCH 04/10] add example with max ilvl --- AzerothAuctionAssassinData/example_desired_ilvl_list.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/AzerothAuctionAssassinData/example_desired_ilvl_list.json b/AzerothAuctionAssassinData/example_desired_ilvl_list.json index 8527f52..7f2728a 100644 --- a/AzerothAuctionAssassinData/example_desired_ilvl_list.json +++ b/AzerothAuctionAssassinData/example_desired_ilvl_list.json @@ -27,5 +27,6 @@ {"ilvl": 483, "buyout": 700001, "sockets": false, "speed": false, "leech": false, "avoidance": true,"item_ids": [208426, 208427]}, {"ilvl": 483, "buyout": 1200001, "sockets": false, "speed": false, "leech": true, "avoidance": false,"item_ids": [208426, 208427]}, {"ilvl": 483, "buyout": 10001, "sockets": false, "speed": false, "leech": true, "avoidance": false}, -{"ilvl": 400, "buyout": 100, "sockets": false, "speed": false, "leech": false, "avoidance": false, "item_ids": [224592], "required_min_lvl": 71, "required_max_lvl": 79} -] \ No newline at end of file +{"ilvl": 400, "buyout": 100, "sockets": false, "speed": false, "leech": false, "avoidance": false, "item_ids": [224592], "required_min_lvl": 71, "required_max_lvl": 79}, +{"ilvl": 500, "max_ilvl": 560, "buyout": 1000, "sockets": false, "speed": false, "leech": false, "avoidance": false, "item_ids": [224632, 224631, 224639, 224625], "required_min_lvl": 1, "required_max_lvl": 999} +] From 30ea2cd0f5923672616d540bbc188440e52a82de Mon Sep 17 00:00:00 2001 From: cohenaj194 Date: Fri, 22 Nov 2024 11:14:13 -0500 Subject: [PATCH 05/10] working max ilvl --- AzerothAuctionAssassin.py | 57 ++++++++++++++++++++++++++++++++------- utils/mega_data_setup.py | 8 +++++- 2 files changed, 54 insertions(+), 11 deletions(-) diff --git a/AzerothAuctionAssassin.py b/AzerothAuctionAssassin.py index 4354422..6ad053f 100644 --- a/AzerothAuctionAssassin.py +++ b/AzerothAuctionAssassin.py @@ -1301,13 +1301,15 @@ def check_for_settings(self): self.ilvl_list = json.load(file) # Process each item level data dictionary for ilvl_dict_data in self.ilvl_list: - # Add missing 'item_ids' key if not present + # Add missing keys if not present if "item_ids" not in ilvl_dict_data: ilvl_dict_data["item_ids"] = [] if "required_min_lvl" not in ilvl_dict_data: ilvl_dict_data["required_min_lvl"] = 1 if "required_max_lvl" not in ilvl_dict_data: ilvl_dict_data["required_max_lvl"] = 999 + if "max_ilvl" not in ilvl_dict_data: + ilvl_dict_data["max_ilvl"] = 10000 # Create a formatted string with the item data item_ids = ",".join(map(str, ilvl_dict_data["item_ids"])) display_string = ( @@ -1319,7 +1321,8 @@ def check_for_settings(self): f"Leech: {ilvl_dict_data['leech']}; " f"Avoidance: {ilvl_dict_data['avoidance']}; " f"MinLevel: {ilvl_dict_data['required_min_lvl']}; " - f"MaxLevel: {ilvl_dict_data['required_max_lvl']}" + f"MaxLevel: {ilvl_dict_data['required_max_lvl']}; " + f"Max ILvl: {ilvl_dict_data['max_ilvl']}" ) # Insert the string into the display list self.ilvl_list_display.insertItem( @@ -1337,7 +1340,8 @@ def ilvl_list_double_clicked(self, item): leech = item_split[6].split(";")[0] avoidance = item_split[7].split(";")[0] required_min_lvl = item_split[8].split(";")[0] - required_max_lvl = item_split[9] + required_max_lvl = item_split[9].split(";")[0] + ilvl_max = item_split[10].split(";")[0] self.ilvl_item_input.setText(item_id) self.ilvl_price_input.setText(buyout) @@ -1350,6 +1354,7 @@ def ilvl_list_double_clicked(self, item): self.ilvl_input.setText(ilvl) self.ilvl_min_required_lvl_input.setText(required_min_lvl) self.ilvl_max_required_lvl_input.setText(required_max_lvl) + self.ilvl_max_input.setText(ilvl_max) def realm_list_clicked(self, item): realm_split = item.text().split(":") @@ -1362,6 +1367,7 @@ def realm_list_clicked(self, item): def add_ilvl_to_list(self): ilvl = self.ilvl_input.text() + ilvl_max = self.ilvl_max_input.text() price = self.ilvl_price_input.text() if ilvl == "" or price == "": @@ -1374,10 +1380,13 @@ def add_ilvl_to_list(self): try: ilvl_int = int(ilvl) + ilvl_max_int = int(ilvl_max) price_int = int(price) except ValueError: QMessageBox.critical( - self, "Invalid Input", "Ilvl and price should be numbers." + self, + "Invalid Input", + "Min Ilvl, Max Ilvl, and price should be numbers.", ) return False @@ -1388,6 +1397,15 @@ def add_ilvl_to_list(self): ) return False + # Check if ilvl_max is between ilvl and 10000 + if not ilvl_int <= ilvl_max_int <= 10000: + QMessageBox.critical( + self, + "Incorrect Ilvl Max Value", + "Max Ilvl must be between Ilvl and a max of 10000.", + ) + return False + # Check if Price is between 1 and 10 million if not 1 <= price_int <= 10000000: QMessageBox.critical( @@ -1406,12 +1424,12 @@ def add_ilvl_to_list(self): map(int, item_ids_text.replace(" ", "").split(",")) ) - # Check if all items are between 100k and 500k + # Check all item ids are between 1 and 500000 if any(not 1 <= item_id <= 500000 for item_id in item_ids_list): QMessageBox.critical( self, "Invalid Item ID", - "All item IDs should be between 1 and 500k.", + "All item IDs should be between 1 and 500,000.", ) return False except ValueError: @@ -1467,7 +1485,7 @@ def add_ilvl_to_list(self): ) return False - # Create a dictionary with the data + # Create a dictionary with the data, including ilvl_max ilvl_dict_data = { "ilvl": ilvl_int, "buyout": price_int, @@ -1478,6 +1496,7 @@ def add_ilvl_to_list(self): "item_ids": item_ids_list, "required_min_lvl": int(required_min_lvl), "required_max_lvl": int(required_max_lvl), + "max_ilvl": ilvl_max_int, } # Only append and display if the dictionary is not already in the list @@ -1495,7 +1514,8 @@ def add_ilvl_to_list(self): f"Leech: {ilvl_dict_data['leech']}; " f"Avoidance: {ilvl_dict_data['avoidance']}; " f"MinLevel: {ilvl_dict_data['required_min_lvl']}; " - f"MaxLevel: {ilvl_dict_data['required_max_lvl']}" + f"MaxLevel: {ilvl_dict_data['required_max_lvl']}; " + f"Max ILvl: {ilvl_dict_data['max_ilvl']}" ) # Insert the formatted string into the display list @@ -1530,6 +1550,11 @@ def remove_ilvl_to_list(self): else: required_max_lvl = int(self.ilvl_max_required_lvl_input.text()) + if self.ilvl_max_input.text() == "": + ilvl_max = 10000 + else: + ilvl_max = int(self.ilvl_max_input.text()) + # Create a dictionary with the data ilvl_dict_data = { "ilvl": int(self.ilvl_input.text()), @@ -1541,6 +1566,7 @@ def remove_ilvl_to_list(self): "item_ids": item_ids_list, "required_min_lvl": required_min_lvl, "required_max_lvl": required_max_lvl, + "max_ilvl": ilvl_max, } # Check if the item data is already in the list @@ -1556,7 +1582,8 @@ def remove_ilvl_to_list(self): f"Leech: {ilvl_dict_data['leech']}; " f"Avoidance: {ilvl_dict_data['avoidance']}; " f"MinLevel: {ilvl_dict_data['required_min_lvl']}; " - f"MaxLevel: {ilvl_dict_data['required_max_lvl']}" + f"MaxLevel: {ilvl_dict_data['required_max_lvl']}; " + f"Max ILvl: {ilvl_dict_data['max_ilvl']}" ) # Print the formatted string @@ -1605,6 +1632,7 @@ def import_ilvl_data(self): avoidance = ilvl_dict_data["avoidance"] required_min_lvl = ilvl_dict_data.get("required_min_lvl", 1) required_max_lvl = ilvl_dict_data.get("required_max_lvl", 999) + ilvl_max = ilvl_dict_data.get("max_ilvl", 10000) # Check that all item IDs are valid integers, but allow list to be empty if not all( @@ -1625,6 +1653,14 @@ def import_ilvl_data(self): raise ValueError( f"Invalid ILvl {ilvl}.\nILvl must be an integer between 200-1000." ) + if not (200 <= ilvl_max <= 10000): + raise ValueError( + f"Invalid Max ILvl {ilvl_max}.\nMax ILvl must be an integer between 200-10000." + ) + if not ilvl_max >= ilvl: + raise ValueError( + f"Max ILvl {ilvl_max} must be greater than ILvl {ilvl}." + ) # Check that min and max levels are integers within range if not (1 <= required_min_lvl <= 999): @@ -1657,7 +1693,8 @@ def import_ilvl_data(self): f"Leech: {leech}; " f"Avoidance: {avoidance}; " f"MinLevel: {required_min_lvl}; " - f"MaxLevel: {required_max_lvl}" + f"MaxLevel: {required_max_lvl}; " + f"Max ILvl: {ilvl_max}" ) self.ilvl_list_display.insertItem( self.ilvl_list_display.count(), string_with_data diff --git a/utils/mega_data_setup.py b/utils/mega_data_setup.py index 3769ef5..6bc5e9e 100644 --- a/utils/mega_data_setup.py +++ b/utils/mega_data_setup.py @@ -398,7 +398,13 @@ def __set_desired_ilvl( snipe_info = {} bool_vars = ["sockets", "speed", "leech", "avoidance"] - int_vars = ["ilvl", "max_ilvl", "buyout", "required_min_lvl", "required_max_lvl"] + int_vars = [ + "ilvl", + "max_ilvl", + "buyout", + "required_min_lvl", + "required_max_lvl", + ] for key, value in ilvl_info.items(): if key in bool_vars: if isinstance(ilvl_info[key], bool): From 765a165cd763db04c50f016a64640f4091edc6e0 Mon Sep 17 00:00:00 2001 From: cohenaj194 Date: Fri, 22 Nov 2024 11:15:46 -0500 Subject: [PATCH 06/10] update example --- AzerothAuctionAssassinData/example_desired_ilvl_list.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AzerothAuctionAssassinData/example_desired_ilvl_list.json b/AzerothAuctionAssassinData/example_desired_ilvl_list.json index 7f2728a..2bc250f 100644 --- a/AzerothAuctionAssassinData/example_desired_ilvl_list.json +++ b/AzerothAuctionAssassinData/example_desired_ilvl_list.json @@ -28,5 +28,5 @@ {"ilvl": 483, "buyout": 1200001, "sockets": false, "speed": false, "leech": true, "avoidance": false,"item_ids": [208426, 208427]}, {"ilvl": 483, "buyout": 10001, "sockets": false, "speed": false, "leech": true, "avoidance": false}, {"ilvl": 400, "buyout": 100, "sockets": false, "speed": false, "leech": false, "avoidance": false, "item_ids": [224592], "required_min_lvl": 71, "required_max_lvl": 79}, -{"ilvl": 500, "max_ilvl": 560, "buyout": 1000, "sockets": false, "speed": false, "leech": false, "avoidance": false, "item_ids": [224632, 224631, 224639, 224625], "required_min_lvl": 1, "required_max_lvl": 999} +{"ilvl": 545, "max_ilvl": 545, "buyout": 1000, "sockets": false, "speed": false, "leech": false, "avoidance": false, "item_ids": [224632, 224631, 224639, 224625], "required_min_lvl": 1, "required_max_lvl": 70} ] From d6561b7a8ac83bcb56e178866afece3178896528 Mon Sep 17 00:00:00 2001 From: cohenaj194 Date: Fri, 22 Nov 2024 11:20:47 -0500 Subject: [PATCH 07/10] adjust examples --- AzerothAuctionAssassinData/example_desired_ilvl_list.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/AzerothAuctionAssassinData/example_desired_ilvl_list.json b/AzerothAuctionAssassinData/example_desired_ilvl_list.json index 2bc250f..45c5b3d 100644 --- a/AzerothAuctionAssassinData/example_desired_ilvl_list.json +++ b/AzerothAuctionAssassinData/example_desired_ilvl_list.json @@ -28,5 +28,6 @@ {"ilvl": 483, "buyout": 1200001, "sockets": false, "speed": false, "leech": true, "avoidance": false,"item_ids": [208426, 208427]}, {"ilvl": 483, "buyout": 10001, "sockets": false, "speed": false, "leech": true, "avoidance": false}, {"ilvl": 400, "buyout": 100, "sockets": false, "speed": false, "leech": false, "avoidance": false, "item_ids": [224592], "required_min_lvl": 71, "required_max_lvl": 79}, -{"ilvl": 545, "max_ilvl": 545, "buyout": 1000, "sockets": false, "speed": false, "leech": false, "avoidance": false, "item_ids": [224632, 224631, 224639, 224625], "required_min_lvl": 1, "required_max_lvl": 70} +{"ilvl": 545, "max_ilvl": 545, "buyout": 30000, "sockets": false, "speed": false, "leech": false, "avoidance": false, "item_ids": [224592], "required_min_lvl": 1, "required_max_lvl": 70}, +{"ilvl": 545, "max_ilvl": 545, "buyout": 30000, "sockets": false, "speed": false, "leech": false, "avoidance": false, "item_ids": [224632, 224631, 224639, 224625], "required_min_lvl": 1, "required_max_lvl": 70} ] From 8de8b77351ae5a9688ab749081cff119952ecf5b Mon Sep 17 00:00:00 2001 From: cohenaj194 Date: Fri, 22 Nov 2024 11:32:47 -0500 Subject: [PATCH 08/10] bump version --- .github/workflows/windows-exe-build.yml | 2 +- AzerothAuctionAssassin.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/windows-exe-build.yml b/.github/workflows/windows-exe-build.yml index 70ce0fc..6867ab1 100644 --- a/.github/workflows/windows-exe-build.yml +++ b/.github/workflows/windows-exe-build.yml @@ -1,7 +1,7 @@ name: Build Windows Executable env: - AAA_VERSION: "1.2.5.3" + AAA_VERSION: "1.2.6" on: workflow_dispatch: diff --git a/AzerothAuctionAssassin.py b/AzerothAuctionAssassin.py index 6ad053f..2bef577 100644 --- a/AzerothAuctionAssassin.py +++ b/AzerothAuctionAssassin.py @@ -5,7 +5,7 @@ import sys from datetime import datetime -AAA_VERSION = "1.2.5.2" +AAA_VERSION = "1.2.6" windowsApp_Path = None try: From 7baa0ee2d5259f0da35771aaa502cab0308c2774 Mon Sep 17 00:00:00 2001 From: cohenaj194 Date: Fri, 22 Nov 2024 14:15:41 -0500 Subject: [PATCH 09/10] patch min vs max ilvl --- AzerothAuctionAssassin.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/AzerothAuctionAssassin.py b/AzerothAuctionAssassin.py index 2bef577..8e81376 100644 --- a/AzerothAuctionAssassin.py +++ b/AzerothAuctionAssassin.py @@ -1367,7 +1367,7 @@ def realm_list_clicked(self, item): def add_ilvl_to_list(self): ilvl = self.ilvl_input.text() - ilvl_max = self.ilvl_max_input.text() + ilvl_max = self.ilvl_max_input.text() or "10000" # Default to 10000 if empty price = self.ilvl_price_input.text() if ilvl == "" or price == "": @@ -1472,11 +1472,11 @@ def add_ilvl_to_list(self): "Max level must be between 1 and 999.", ) return False - elif required_max_lvl <= required_min_lvl: + elif required_max_lvl < required_min_lvl: QMessageBox.critical( self, "Invalid Level Range", - "Max level must be greater than Min level.", + "Max level must be greater than or equal to Min level.", ) return False except ValueError: @@ -1673,7 +1673,7 @@ def import_ilvl_data(self): ) if required_max_lvl <= required_min_lvl: raise ValueError( - f"Max level {required_max_lvl} must be greater than Min level {required_min_lvl}." + f"Max level {required_max_lvl} must be greater than or equal to Min level {required_min_lvl}." ) # Check that sockets, speed, leech and avoidance are booleans From f2171aa8005066e81213222ccada8c61b3b04f6b Mon Sep 17 00:00:00 2001 From: cohenaj194 Date: Fri, 22 Nov 2024 14:56:37 -0500 Subject: [PATCH 10/10] fix placeholder --- AzerothAuctionAssassin.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/AzerothAuctionAssassin.py b/AzerothAuctionAssassin.py index 8e81376..b3c1bf7 100644 --- a/AzerothAuctionAssassin.py +++ b/AzerothAuctionAssassin.py @@ -700,6 +700,7 @@ def make_ilvl_page(self, ilvl_page): self.ilvl_max_input = QLineEdit(ilvl_page) self.ilvl_max_input_label = QLabel("Max Item Level", ilvl_page) + self.ilvl_max_input.setPlaceholderText("10000") self.ilvl_max_input_label.setToolTip( "Set the maximum item level (ilvl) you want to snipe. Ex: 500 ilvl." ) @@ -736,6 +737,7 @@ def make_ilvl_page(self, ilvl_page): self.ilvl_min_required_lvl_input = QLineEdit(ilvl_page) self.ilvl_min_required_lvl_input_label = QLabel("Min Player Level", ilvl_page) + self.ilvl_min_required_lvl_input.setPlaceholderText("1") self.ilvl_min_required_lvl_input_label.setToolTip( "Set the minimum required character level to use gear.\n" + "Ex: required level 80 for TWW items, 70 for DF items, etc." @@ -749,6 +751,7 @@ def make_ilvl_page(self, ilvl_page): self.ilvl_max_required_lvl_input = QLineEdit(ilvl_page) self.ilvl_max_required_lvl_input_label = QLabel("Max Player Level", ilvl_page) + self.ilvl_max_required_lvl_input.setPlaceholderText("1000") self.ilvl_max_required_lvl_input_label.setToolTip( "Set the maximum required character level to use gear.\n" + "Ex: required level 70 for TWW twink items, etc."