Skip to content

Commit 9a48d3e

Browse files
authored
2.0.4 (#235)
* handle edgecase minutes * fix logs * have log show exact update minutes * version bump * bump python too * bump some static files
1 parent 4995950 commit 9a48d3e

File tree

10 files changed

+188
-20
lines changed

10 files changed

+188
-20
lines changed

.github/workflows/electron-exe-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Build EXE & DMG for Electron App
22

33
env:
4-
AAA_VERSION: "2.0.3"
4+
AAA_VERSION: "2.0.4"
55

66
on:
77
workflow_dispatch:

.github/workflows/windows-exe-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Build Windows Executable
22

33
env:
4-
AAA_VERSION: "1.6.1"
4+
AAA_VERSION: "1.6.2"
55

66
on:
77
workflow_dispatch:

AzerothAuctionAssassin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import sys
66
from datetime import datetime
77

8-
AAA_VERSION = "1.6.1"
8+
AAA_VERSION = "1.6.2"
99

1010
windowsApp_Path = None
1111
try:

StaticData/ilvl_items.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,6 +1151,18 @@
11511151
"ilvl": 242,
11521152
"is_stackable": 0
11531153
},
1154+
"190731": {
1155+
"itemID": 190731,
1156+
"itemName": "Deceiver's Illusionary Signet",
1157+
"itemQuality": 3,
1158+
"required_level": 60,
1159+
"item_class": 4,
1160+
"item_subclass": 0,
1161+
"purchase_price": 2100778,
1162+
"sell_price": 420155,
1163+
"ilvl": 242,
1164+
"is_stackable": 0
1165+
},
11541166
"190732": {
11551167
"itemID": 190732,
11561168
"itemName": "Strand of Tainted Relics",
@@ -11746,5 +11758,41 @@
1174611758
"sell_price": 0,
1174711759
"ilvl": 400,
1174811760
"is_stackable": 0
11761+
},
11762+
"258931": {
11763+
"itemID": 258931,
11764+
"itemName": "Tarnished Dawnlit Sentinel's Cover",
11765+
"itemQuality": 2,
11766+
"required_level": 80,
11767+
"item_class": 4,
11768+
"item_subclass": 3,
11769+
"purchase_price": 240882,
11770+
"sell_price": 48176,
11771+
"ilvl": 226,
11772+
"is_stackable": 0
11773+
},
11774+
"258941": {
11775+
"itemID": 258941,
11776+
"itemName": "Tarnished Dawnlit Commander's Mantle",
11777+
"itemQuality": 2,
11778+
"required_level": 80,
11779+
"item_class": 4,
11780+
"item_subclass": 4,
11781+
"purchase_price": 232306,
11782+
"sell_price": 46461,
11783+
"ilvl": 226,
11784+
"is_stackable": 0
11785+
},
11786+
"258944": {
11787+
"itemID": 258944,
11788+
"itemName": "Tarnished Dawnlit Cleaver",
11789+
"itemQuality": 2,
11790+
"required_level": 80,
11791+
"item_class": 2,
11792+
"item_subclass": 0,
11793+
"purchase_price": 448228,
11794+
"sell_price": 89645,
11795+
"ilvl": 226,
11796+
"is_stackable": 0
1174911797
}
1175011798
}

StaticData/item_names.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24740,6 +24740,7 @@
2474024740
"190726": "Extract of Prodigious Sands",
2474124741
"190729": "Vigorous Sentinel's Seal",
2474224742
"190730": "Matriarch's Shell Band",
24743+
"190731": "Deceiver's Illusionary Signet",
2474324744
"190732": "Strand of Tainted Relics",
2474424745
"190733": "Circle of Akkaris",
2474524746
"190735": "Varruth's Guillotine",
@@ -29628,6 +29629,7 @@
2962829629
"236857": "Potion of Mysterious Frostbound",
2962929630
"236870": "Potion of Mysterious Tremorshards",
2963029631
"236949": "Mote of Light",
29632+
"236952": "Mote of Pure Void",
2963129633
"236957": "Hollowbane Portal Key",
2963229634
"236959": "Empty Mysterious Potion",
2963329635
"236967": "Grubber Lure",
@@ -29645,6 +29647,7 @@
2964529647
"237359": "Refulgent Copper Ore",
2964629648
"237362": "Umbral Tin Ore",
2964729649
"237364": "Brilliant Silver Ore",
29650+
"237366": "Dazzling Thorium",
2964829651
"237435": "Nightfall Darkcaster's Cloak",
2964929652
"237436": "Nightfall Darkcaster's Vestment",
2965029653
"237437": "Nightfall Darkcaster's Sandals",
@@ -29714,6 +29717,12 @@
2971429717
"238212": "Desolate Talus",
2971529718
"238213": "Desolate Talus",
2971629719
"238254": "Nuts and Bolts",
29720+
"238367": "Root Crab",
29721+
"238377": "Blood Hunter",
29722+
"238482": "A Whole Lot of Nothing",
29723+
"238487": "Kickin' Can",
29724+
"238489": "Definitely Not a Rock",
29725+
"238494": "Another's Treasure",
2971729726
"238799": "Harrowed Ichor",
2971829727
"238800": "Soggy Bone Splinters",
2971929728
"238801": "Mite-Kissed Silver Tooth",
@@ -29964,6 +29973,8 @@
2996429973
"245672": "Blade of the Void Swamp",
2996529974
"245746": "Energy Barrel",
2996629975
"245747": "Energy Urn",
29976+
"245830": "Ace of Hunt",
29977+
"245831": "Two of Hunt",
2996729978
"245884": "Energy Pyramid",
2996829979
"245950": "Dark Iron Portable Forge",
2996929980
"245955": "Dark Iron's Ceremonial Mace",
@@ -29995,6 +30006,7 @@
2999530006
"246784": "Dark Iron's Ancient Crusher",
2999630007
"246801": "Dark Iron's Mighty Crossbow",
2999730008
"246809": "Inspired Writer's Quill",
30009+
"246838": "Kafa Press",
2999830010
"247220": "Mushan Dumpling Stack",
2999930011
"247222": "Drake Kebab Platter",
3000030012
"247224": "Valdrakken Blossomfruit Platter",
@@ -30189,6 +30201,9 @@
3018930201
"258560": "Drust Enchanter's Rod",
3019030202
"258561": "Kyrian Aspirant's Rolled Cushion",
3019130203
"258838": "Gold Dye",
30204+
"258931": "Tarnished Dawnlit Sentinel's Cover",
30205+
"258941": "Tarnished Dawnlit Commander's Mantle",
30206+
"258944": "Tarnished Dawnlit Cleaver",
3019230207
"259053": "Warm Teak Dye",
3019330208
"259078": "Basic Birch Dye",
3019430209
"259096": "Mesquite Brown Dye",
@@ -30257,8 +30272,10 @@
3025730272
"260588": "Jendry's Donut",
3025830273
"260589": "Flame-Blessed Beach Towel",
3025930274
"260615": "Void Dust Residue",
30275+
"260636": "Algae Covered Stone",
3026030276
"260638": "Fine Void Residue",
3026130277
"260659": "Stellar Vortex Residue",
30278+
"260661": "Glowing Shrub",
3026230279
"260665": "Sizable Tusk",
3026330280
"260699": "Maldraxxian Runic Tablet",
3026430281
"260947": "White Dye Pigment",

mega_alerts.py

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -718,6 +718,33 @@ def check_pet_ilvl_stats(item, desired_pet_list):
718718
}
719719

720720
#### MAIN ####
721+
def is_in_scan_window(
722+
current_min, last_upload_min, scan_time_min, scan_time_max
723+
):
724+
"""
725+
Check if current_min is within the scan window, handling minute wraparound (0-59).
726+
727+
Args:
728+
current_min: Current minute (0-59)
729+
last_upload_min: Last upload minute (0-59)
730+
scan_time_min: Minutes before upload to start scanning (can be negative)
731+
scan_time_max: Minutes after upload to stop scanning
732+
733+
Returns:
734+
bool: True if current_min is within the scan window
735+
"""
736+
# Calculate the start and end of the scan window, wrapping around 0-59
737+
start_min = (last_upload_min + scan_time_min) % 60
738+
end_min = (last_upload_min + scan_time_max) % 60
739+
740+
# Handle wraparound: if start > end, the range crosses the hour boundary
741+
if start_min <= end_min:
742+
# Normal range (no wraparound): e.g., 5 to 10
743+
return start_min <= current_min <= end_min
744+
else:
745+
# Wraparound range: e.g., 59 to 2 means [59, 0, 1, 2]
746+
return current_min >= start_min or current_min <= end_min
747+
721748
def main():
722749
while self.running:
723750
current_min = int(datetime.now().minute)
@@ -731,9 +758,12 @@ def main():
731758
matching_realms = [
732759
realm["dataSetID"]
733760
for realm in mega_data.get_upload_time_list()
734-
if realm["lastUploadMinute"] + mega_data.SCAN_TIME_MIN
735-
<= current_min
736-
<= realm["lastUploadMinute"] + mega_data.SCAN_TIME_MAX
761+
if is_in_scan_window(
762+
current_min,
763+
realm["lastUploadMinute"],
764+
mega_data.SCAN_TIME_MIN,
765+
mega_data.SCAN_TIME_MAX,
766+
)
737767
]
738768
# mega wants extra alerts
739769
if mega_data.EXTRA_ALERTS:

node-ui/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<header class="topbar">
3434
<div>
3535
<div class="eyebrow">Azeroth Auction Assassin</div>
36-
<div class="title">Version: 2.0.3</div>
36+
<div class="title">Version: 2.0.4</div>
3737
</div>
3838
<div class="actions">
3939
<div class="nav-controls">

node-ui/mega-alerts.js

Lines changed: 83 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2233,12 +2233,77 @@ async function runAlerts(state, progress, runOnce = false) {
22332233
// Scan starts at lastUploadMinute + SCAN_TIME_MIN
22342234
// Scan ends at lastUploadMinute + SCAN_TIME_MAX
22352235
// Commodities are included automatically if they're in upload_timers and match the time window
2236+
2237+
/**
2238+
* Check if current_min is within the scan window, handling minute wraparound (0-59).
2239+
* @param {number} current_min - Current minute (0-59)
2240+
* @param {number} last_upload_min - Last upload minute (0-59)
2241+
* @param {number} scan_time_min - Minutes before upload to start scanning (can be negative)
2242+
* @param {number} scan_time_max - Minutes after upload to stop scanning
2243+
* @returns {boolean} True if current_min is within the scan window
2244+
*/
2245+
const isInScanWindow = (
2246+
current_min,
2247+
last_upload_min,
2248+
scan_time_min,
2249+
scan_time_max
2250+
) => {
2251+
// Calculate the start and end of the scan window, wrapping around 0-59
2252+
// JavaScript's modulo operator handles negative numbers differently than Python,
2253+
// so we need to ensure positive values first
2254+
const start_min = (((last_upload_min + scan_time_min) % 60) + 60) % 60
2255+
const end_min = (((last_upload_min + scan_time_max) % 60) + 60) % 60
2256+
2257+
// Handle wraparound: if start > end, the range crosses the hour boundary
2258+
if (start_min <= end_min) {
2259+
// Normal range (no wraparound): e.g., 5 to 10
2260+
return start_min <= current_min && current_min <= end_min
2261+
} else {
2262+
// Wraparound range: e.g., 59 to 2 means [59, 0, 1, 2]
2263+
return current_min >= start_min || current_min <= end_min
2264+
}
2265+
}
2266+
2267+
/**
2268+
* Get all scan trigger minutes based on upload times and scan window settings.
2269+
* @returns {Set<number>} Set of all minutes when scans will trigger
2270+
*/
2271+
const getScanTriggerMinutes = () => {
2272+
const scanMinutes = new Set()
2273+
const uploadMinutes = state.get_upload_time_minutes()
2274+
2275+
for (const uploadMin of uploadMinutes) {
2276+
const start_min = (((uploadMin + state.SCAN_TIME_MIN) % 60) + 60) % 60
2277+
const end_min = (((uploadMin + state.SCAN_TIME_MAX) % 60) + 60) % 60
2278+
2279+
if (start_min <= end_min) {
2280+
// Normal range (no wraparound)
2281+
for (let min = start_min; min <= end_min; min++) {
2282+
scanMinutes.add(min)
2283+
}
2284+
} else {
2285+
// Wraparound range: e.g., 59 to 2 means [59, 0, 1, 2]
2286+
for (let min = start_min; min < 60; min++) {
2287+
scanMinutes.add(min)
2288+
}
2289+
for (let min = 0; min <= end_min; min++) {
2290+
scanMinutes.add(min)
2291+
}
2292+
}
2293+
}
2294+
2295+
return scanMinutes
2296+
}
2297+
22362298
let matching_realms = state
22372299
.get_upload_time_list()
2238-
.filter(
2239-
(realm) =>
2240-
realm.lastUploadMinute + state.SCAN_TIME_MIN <= current_min &&
2241-
current_min <= realm.lastUploadMinute + state.SCAN_TIME_MAX
2300+
.filter((realm) =>
2301+
isInScanWindow(
2302+
current_min,
2303+
realm.lastUploadMinute,
2304+
state.SCAN_TIME_MIN,
2305+
state.SCAN_TIME_MAX
2306+
)
22422307
)
22432308
.map((r) => r.dataSetID)
22442309

@@ -2269,15 +2334,23 @@ async function runAlerts(state, progress, runOnce = false) {
22692334
state.THREADS
22702335
)
22712336
} else {
2337+
const uploadMinutes = Array.from(state.get_upload_time_minutes()).sort(
2338+
(a, b) => a - b
2339+
)
2340+
const scanTriggerMinutes = Array.from(getScanTriggerMinutes()).sort(
2341+
(a, b) => a - b
2342+
)
22722343
progress(
2273-
`The updates will come\non min ${Array.from(
2274-
state.get_upload_time_minutes()
2275-
).join(",")}\nof each hour.`
2344+
`The updates will come on min ${uploadMinutes.join(
2345+
","
2346+
)} of each hour. Scans trigger on min ${scanTriggerMinutes.join(",")}.`
22762347
)
22772348
log(
2278-
`Blizzard API data only updates 1 time per hour. The updates will come on minute ${Array.from(
2279-
state.get_upload_time_minutes()
2280-
)} of each hour. ${new Date().toISOString()} is not the update time.`
2349+
`Blizzard API data only updates 1 time per hour. The updates will come on minute ${uploadMinutes.join(
2350+
", "
2351+
)} of each hour. Scans will trigger on minutes ${scanTriggerMinutes.join(
2352+
", "
2353+
)}. ${new Date().toISOString()} is not the update time.`
22812354
)
22822355
await delay(20000) // Wait 20 seconds before checking again
22832356
}

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aaa-node-ui",
3-
"version": "2.0.3",
3+
"version": "2.0.4",
44
"description": "Node-based GUI to manage Azeroth Auction Assassin configs and run WoW AH Price Scans!",
55
"license": "MIT",
66
"main": "node-ui/main.js",

0 commit comments

Comments
 (0)