diff --git a/builder/doc.html b/builder/doc.html index 3be47b0..7354388 100644 --- a/builder/doc.html +++ b/builder/doc.html @@ -1407,7 +1407,7 @@ savelink - + diff --git a/builder/index.html b/builder/index.html index fd299e5..1da9902 100644 --- a/builder/index.html +++ b/builder/index.html @@ -1,1406 +1,2 @@ - - - - - - - - - - - WynnBuilder - - - - - - - - - - - - - - - - - - - - - -
- -
-
Join the discord today to suggest new features, submit bug reports, and hangout/talk to devs!
-
-
-
-
-
-
-
-
-
- -
-
-
-
- 0 -
-
- 0 -
-
-
-
-
-
- -
-
- -
-
-
-
-
-
-
-
- -
-
-
-
- 0 -
-
- 0 -
-
-
-
-
-
- -
-
- -
-
-
-
-
-
-
-
- -
-
-
-
- 0 -
-
- 0 -
-
-
-
-
-
- -
-
- -
-
-
-
-
-
-
-
- -
-
-
-
- 0 -
-
- 0 -
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
- -
-
-
-
- 0 -
-
- 0 -
-
-
-
-
-
- -
-
- -
-
-
-
-
-
-
-
- -
-
-
-
- 0 -
-
- 0 -
-
-
-
-
-
- -
-
- -
-
-
-
-
-
-
-
- -
-
-
-
- 0 -
-
- 0 -
-
-
-
-
-
- -
-
- -
-
-
-
-
-
-
-
- -
-
-
-
- 0 -
-
- 0 -
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
- -
-
-
-
- 0 -
-
- 0 -
-
-
-
-
-
- -
-
- -
-
-
-
-
-
-
-
-
-
- Level: -
-
- -
-
- -
-
-
-
-
- -
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
- - -
- Assign: 0 -
-
- Original: 0 -
-
-
-
-
-
-
- - -
- Assign: 0 -
-
- Original: 0 -
-
-
-
-
-
-
- - -
- Assign: 0 -
-
- Original: 0 -
-
-
-
-
-
-
- - -
- Assign: 0 -
-
- Original: 0 -
-
-
-
-
-
-
- - -
- Assign: 0 -
-
- Original: 0 -
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
- -
-
- -
-
- -
-
-
- - - -
-
-
-
-
- Active boosts -
-
-
-
- -
-
- -
-
- -
-
- -
-
- -
-
-
-
-
-
-
-
-
-
- Earth -
-
- Thunder -
-
- Water -
-
- Fire -
-
- Air -
-
-
- - -
-
-
- Curse (Active) -
-
-
-
- -
-
- -
-
- -
-
- -
-
- -
-
-
-
- Concentration (Passive) -
-
-
- - -
-
-
-
-
-
-
-
-
-
-
- Offense -
-
- Defense -
-
- Overall -
-
-
- - -
-
-
-
-
-
-
melee
- -
-
-
poison
-
-
-
-
Input a weapon to see abilities!
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
- -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + WynnBuilder
Join the discord today to suggest new features, submit bug reports, and hangout/talk to devs!
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
Level:
Assign: 0
Original: 0
Assign: 0
Original: 0
Assign: 0
Original: 0
Assign: 0
Original: 0
Assign: 0
Original: 0
Active boosts
Earth
Thunder
Water
Fire
Air
Curse (Active)
Concentration (Passive)
Offense
Defense
Overall
melee
poison
Input a weapon to see abilities!
diff --git a/builder/index_full.html b/builder/index_full.html new file mode 100644 index 0000000..d84f48d --- /dev/null +++ b/builder/index_full.html @@ -0,0 +1,1399 @@ + + + + + + + + + + + WynnBuilder + + + + + + + + + + + + + + + + + + + + + +
+ +
+
Join the discord today to suggest new features, submit bug reports, and hangout/talk to devs!
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+ 0 +
+
+ 0 +
+
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+ 0 +
+
+ 0 +
+
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+ 0 +
+
+ 0 +
+
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+ 0 +
+
+ 0 +
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+ 0 +
+
+ 0 +
+
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+ 0 +
+
+ 0 +
+
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+ 0 +
+
+ 0 +
+
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+ 0 +
+
+ 0 +
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+ 0 +
+
+ 0 +
+
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+
+
+
+
+ Level: +
+
+ +
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + +
+ Assign: 0 +
+
+ Original: 0 +
+
+
+
+
+
+
+ + +
+ Assign: 0 +
+
+ Original: 0 +
+
+
+
+
+
+
+ + +
+ Assign: 0 +
+
+ Original: 0 +
+
+
+
+
+
+
+ + +
+ Assign: 0 +
+
+ Original: 0 +
+
+
+
+
+
+
+ + +
+ Assign: 0 +
+
+ Original: 0 +
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ + + +
+
+
+
+
+ Active boosts +
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+
+
+
+
+
+
+ Earth +
+
+ Thunder +
+
+ Water +
+
+ Fire +
+
+ Air +
+
+
+ + +
+
+
+ Curse (Active) +
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+ Concentration (Passive) +
+
+
+ + +
+
+
+
+
+
+
+
+
+
+
+ Offense +
+
+ Defense +
+
+ Overall +
+
+
+ + +
+
+
+
+
+
+
melee
+ +
+
+
poison
+
+
+
+
Input a weapon to see abilities!
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dps_vis.html b/dps_vis.html index 8df124b..b6ba16e 100644 --- a/dps_vis.html +++ b/dps_vis.html @@ -67,6 +67,6 @@ - + diff --git a/js/build_constants.js b/js/build_constants.js index eb23793..be29888 100644 --- a/js/build_constants.js +++ b/js/build_constants.js @@ -7,8 +7,6 @@ const url_tag = location.hash.slice(1); const BUILD_VERSION = "7.0.19"; -let player_build; - // THIS IS SUPER DANGEROUS, WE SHOULD NOT BE KEEPING THIS IN SO MANY PLACES let editable_item_fields = [ "sdPct", "sdRaw", "mdPct", "mdRaw", "poison", diff --git a/js/build_encode_decode.js b/js/build_encode_decode.js index 686b3fd..f3c278a 100644 --- a/js/build_encode_decode.js +++ b/js/build_encode_decode.js @@ -1,3 +1,9 @@ +let player_build; +let build_powders; + +function getItemNameFromID(id) { return idMap.get(id); } +function getTomeNameFromID(id) { return tomeIDMap.get(id); } + function parsePowdering(powder_info) { // TODO: Make this run in linear instead of quadratic time... ew let powdering = []; diff --git a/js/builder.js b/js/builder.js index 15bfe1a..215ef22 100644 --- a/js/builder.js +++ b/js/builder.js @@ -1,18 +1,3 @@ -let build_powders; - -function getItemNameFromID(id) { - if (redirectMap.has(id)) { - return getItemNameFromID(redirectMap.get(id)); - } - return idMap.get(id); -} - -function getTomeNameFromID(id) { - if (tomeRedirectMap.has(id)) { - return getTomeNameFromID(tomeRedirectMap.get(id)); - } - return tomeIDMap.get(id); -} function populateBuildList() { const buildList = document.getElementById("build-choice"); @@ -148,7 +133,6 @@ function toggle_tab(tab) { } } - function toggle_boost_tab(tab) { for (const i of skp_order) { document.querySelector("#"+i+"-boost").style.display = "none"; @@ -156,13 +140,10 @@ function toggle_boost_tab(tab) { } document.querySelector("#"+tab+"-boost").style.display = ""; document.getElementById(tab + "-boost-tab").classList.add("selected-btn"); - } let tabs = ['overall-stats', 'offensive-stats', 'defensive-stats']; function show_tab(tab) { - //console.log(itemFilters) - //hide all tabs, then show the tab of the div clicked and highlight the correct button for (const i in tabs) { document.querySelector("#" + tabs[i]).style.display = "none"; @@ -319,51 +300,6 @@ function init_autocomplete() { })); } - let filter_loc = ["filter1", "filter2", "filter3", "filter4"]; - for (const i of filter_loc) { - dropdowns.set(i+"-choice", new autoComplete({ - data: { - src: sq2ItemFilters, - }, - selector: "#"+i+"-choice", - wrapper: false, - resultsList: { - tabSelect: true, - noResults: true, - class: "search-box dark-7 rounded-bottom px-2 fw-bold dark-shadow-sm", - element: (list, data) => { - // dynamic result loc - console.log(i); - list.style.zIndex = "100"; - let position = document.getElementById(i+"-dropdown").getBoundingClientRect(); - window_pos = document.getElementById("search-container").getBoundingClientRect(); - list.style.top = position.bottom - window_pos.top + 5 +"px"; - list.style.left = position.x - window_pos.x +"px"; - list.style.width = position.width+"px"; - - if (!data.results.length) { - message = document.createElement('li'); - message.classList.add('scaled-font'); - message.textContent = "No filters found!"; - list.prepend(message); - } - }, - }, - resultItem: { - class: "scaled-font search-item", - selected: "dark-5", - }, - events: { - input: { - selection: (event) => { - if (event.detail.selection.value) { - event.target.value = event.detail.selection.value; - } - }, - }, - } - })); - } } function collapse_element(elmnt) { @@ -393,6 +329,7 @@ function init() { for (const eq of equipment_keys) { document.querySelector("#"+eq+"-tooltip").addEventListener("click", () => collapse_element('#'+eq+'-tooltip')); } + // Armor Specials for (let i = 0; i < 5; ++i) { const powder_special = powderSpecialStats[i]; const elem_name = damageClasses[i+1]; // skip neutral @@ -436,6 +373,15 @@ function init() { }); decodeBuild(url_tag); builder_graph_init(); + for (const item_node of item_nodes) { + if (item_node.get_value() === null) { + // likely DB load failure... + if (confirm('One or more items failed to load correctly. This could be due to a corrupted build link, or (more likely) a database load failure. Would you like to reload?')) { + hardReload(); + } + break; + } + } } window.onerror = function(message, source, lineno, colno, error) { diff --git a/js/builder_graph.js b/js/builder_graph.js index 96e8dc4..cca8e6a 100644 --- a/js/builder_graph.js +++ b/js/builder_graph.js @@ -192,7 +192,13 @@ class ItemInputNode extends InputNode { for (const [i, x] of zip2(equipment_inputs, replace_items)) { setValue(i, x); } - for (const node of item_nodes) { calcSchedule(node, 10); } + for (const node of item_nodes) { + if (node !== this) { + // save a tiny bit of compute + calcSchedule(node, 10); + } + } + // Needed to push the weapon node's updates forward return this.compute_func(input_map); } return null; diff --git a/js/dps_vis.js b/js/debug/dps_vis.js similarity index 100% rename from js/dps_vis.js rename to js/debug/dps_vis.js diff --git a/js/render_compute_graph.js b/js/debug/render_compute_graph.js similarity index 100% rename from js/render_compute_graph.js rename to js/debug/render_compute_graph.js diff --git a/js/utils.js b/js/utils.js index 9a42bc3..f43fbe9 100644 --- a/js/utils.js +++ b/js/utils.js @@ -619,8 +619,15 @@ function addClasses(elem, classes) { */ async function hardReload() { //https://gist.github.com/rmehner/b9a41d9f659c9b1c3340 - const dbs = await window.indexedDB.databases(); - await dbs.forEach(db => { window.indexedDB.deleteDatabase(db.name) }); + try { + const dbs = await window.indexedDB.databases(); + await dbs.forEach(db => { window.indexedDB.deleteDatabase(db.name) }); + } catch (error) { + // Hacky patch for firefox... + console.log(error); + const db_names = ['item_db', 'ing_db', 'map_db', 'tome_db']; + await db_names.forEach(db => { window.indexedDB.deleteDatabase(db) }); + } location.reload(true); }