Skip to content

Commit 90e5a01

Browse files
authored
2.0.1 (#232)
* fix pbs lists * fix snipe list names * fix empty realms * bump version
1 parent e066628 commit 90e5a01

File tree

5 files changed

+36
-24
lines changed

5 files changed

+36
-24
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.0"
4+
AAA_VERSION: "2.0.1"
55

66
on:
77
workflow_dispatch:

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.0</div>
36+
<div class="title">Version: 2.0.1</div>
3737
</div>
3838
<div class="actions">
3939
<div class="nav-controls">

node-ui/renderer.js

Lines changed: 31 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -724,16 +724,12 @@ async function handlePastePBSItems(btn) {
724724
async function handleCopyPBSItems(btn) {
725725
await fetchItemNames()
726726
const entries = []
727-
let first = true
728727
for (const [id, price] of Object.entries(state.desiredItems)) {
729728
const name = getItemName(id)
730-
const prefix = first ? "Snipe?" : ""
731-
entries.push(
732-
`${prefix}"${name}";;0;0;0;0;0;0;0;${Math.trunc(Number(price))};;#;;`
733-
)
734-
first = false
729+
entries.push(`"${name}";;0;0;0;0;0;0;0;${Math.trunc(Number(price))};;#;;`)
735730
}
736-
const out = entries.join("")
731+
const timestamp = Date.now()
732+
const out = `AAA PBS List ${timestamp}^${entries.join("^")}`
737733
await navigator.clipboard.writeText(out)
738734
appendLog("Copied PBS items string to clipboard\n")
739735
flashButton(btn, "Copied!")
@@ -803,23 +799,21 @@ async function handlePastePBSIlvl(btn) {
803799
async function handleCopyPBSIlvl(btn) {
804800
await fetchItemNames()
805801
const entries = []
806-
let first = true
807802
for (const rule of state.ilvlList) {
808803
const ids = rule.item_ids && rule.item_ids.length ? rule.item_ids : [0]
809804
for (const id of ids) {
810805
const name = getItemName(id)
811-
const prefix = first ? "Snipe?" : ""
812806
entries.push(
813-
`${prefix}"${name}";;${rule.ilvl};${rule.max_ilvl};${
807+
`"${name}";;${rule.ilvl};${rule.max_ilvl};${
814808
rule.required_min_lvl || 0
815809
};${rule.required_max_lvl || 0};0;0;0;${Math.trunc(
816810
Number(rule.buyout) || 0
817811
)};;#;;`
818812
)
819-
first = false
820813
}
821814
}
822-
const out = entries.join("")
815+
const timestamp = Date.now()
816+
const out = `AAA PBS Ilvl List ${timestamp}^${entries.join("^")}`
823817
await navigator.clipboard.writeText(out)
824818
appendLog("Copied PBS ilvl string to clipboard\n")
825819
flashButton(btn, "Copied!")
@@ -867,17 +861,14 @@ async function handlePastePBSPetIlvl(btn) {
867861
async function handleCopyPBSPetIlvl(btn) {
868862
await fetchPetNames()
869863
const entries = []
870-
for (let i = 0; i < state.petIlvlList.length; i++) {
871-
const rule = state.petIlvlList[i]
864+
for (const rule of state.petIlvlList) {
872865
const name = getPetName(rule.petID)
873-
const prefix = i === 0 ? "Snipe^" : ""
874866
entries.push(
875-
`${prefix}"${name}";;0;0;0;0;0;0;0;${Math.trunc(
876-
Number(rule.price) || 0
877-
)};;#;;`
867+
`"${name}";;0;0;0;0;0;0;0;${Math.trunc(Number(rule.price) || 0)};;#;;`
878868
)
879869
}
880-
const out = entries.join("")
870+
const timestamp = Date.now()
871+
const out = `AAA PBS Pet Ilvl List ${timestamp}^${entries.join("^")}`
881872
await navigator.clipboard.writeText(out)
882873
appendLog("Copied PBS pet string to clipboard\n")
883874
flashButton(btn, "Copied!")
@@ -2514,6 +2505,27 @@ startBtn.addEventListener("click", async () => {
25142505
return // Validation failed, don't start
25152506
}
25162507

2508+
// Check if realm list is empty and reset it if needed
2509+
const region = state.megaData?.WOW_REGION || "EU"
2510+
const realms = state.realmLists[region] || {}
2511+
const realmCount = Object.keys(realms).length
2512+
2513+
if (realmCount === 0) {
2514+
// Realm list is empty, reset it to default before starting
2515+
if (!window.REALM_DATA) {
2516+
console.error("Realm data not loaded")
2517+
return
2518+
}
2519+
const defaultList = window.REALM_DATA.getRealmListByRegion(region)
2520+
if (!defaultList) {
2521+
console.error(`No default list for region: ${region}`)
2522+
return
2523+
}
2524+
state.realmLists[region] = { ...defaultList }
2525+
await saveRealmList(region)
2526+
renderRealmList()
2527+
}
2528+
25172529
await window.aaa.runMega()
25182530
setRunning(true)
25192531
})

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.0",
3+
"version": "2.0.1",
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)