HOTFIX: Handle case when atree decode fails (extremely ungracefully)
Also fix a bunch of bugs with warrior and archer trees
This commit is contained in:
parent
2561feb621
commit
ca43faacf1
5 changed files with 17 additions and 13 deletions
File diff suppressed because one or more lines are too long
|
@ -1182,7 +1182,7 @@ const atrees = {
|
|||
"desc": "Enemies near you will be slowed down.",
|
||||
"parents": [
|
||||
"Geyser Stomp",
|
||||
"More Focus II"
|
||||
"Cheaper Arrow Bomb II"
|
||||
],
|
||||
"dependencies": [],
|
||||
"blockers": [],
|
||||
|
@ -2333,7 +2333,7 @@ const atrees = {
|
|||
"archetype_req": 0,
|
||||
"base_abil": "Focus",
|
||||
"parents": [
|
||||
"More Focus II",
|
||||
"Cheaper Arrow Bomb II",
|
||||
"Grape Bomb"
|
||||
],
|
||||
"dependencies": [
|
||||
|
@ -3837,7 +3837,7 @@ const atrees = {
|
|||
"desc": "For every 100 Health Bonus you have from item IDs, gain +2% Fire Damage (Max 100%)",
|
||||
"archetype": "Paladin",
|
||||
"archetype_req": 0,
|
||||
"parents": ["Ambidextrous", "Stronger Bash"],
|
||||
"parents": ["Precise Strikes", "Stronger Bash"],
|
||||
"dependencies": [],
|
||||
"blockers": [],
|
||||
"cost": 1,
|
||||
|
@ -3953,7 +3953,7 @@ const atrees = {
|
|||
"archetype": "Battle Monk",
|
||||
"archetype_req": 4,
|
||||
"base_abil": "Charge",
|
||||
"parents": ["Ambidextrous", "Burning Heart"],
|
||||
"parents": ["Precise Strikes", "Burning Heart"],
|
||||
"dependencies": ["Flying Kick"],
|
||||
"blockers": [],
|
||||
"cost": 2,
|
||||
|
@ -4071,7 +4071,7 @@ const atrees = {
|
|||
"archetype": "Battle Monk",
|
||||
"archetype_req": 5,
|
||||
"base_abil": "Uppercut",
|
||||
"parents": ["Ambidextrous", "Radiant Devotee"],
|
||||
"parents": ["Precise Strikes", "Radiant Devotee"],
|
||||
"dependencies": ["Uppercut"],
|
||||
"blockers": [],
|
||||
"cost": 2,
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -293,13 +293,13 @@ function get_full_url() {
|
|||
}
|
||||
|
||||
function copyBuild() {
|
||||
copyTextToClipboard();
|
||||
copyTextToClipboard(get_full_url());
|
||||
document.getElementById("copy-button").textContent = "Copied!";
|
||||
}
|
||||
|
||||
function shareBuild(build) {
|
||||
if (build) {
|
||||
let text = url_base+'?v='+wynn_version_id.toString()+location.hash+"\n"+
|
||||
let text = get_full_url()+"\n"+
|
||||
"WynnBuilder build:\n"+
|
||||
"> "+build.items[0].statMap.get("displayName")+"\n"+
|
||||
"> "+build.items[1].statMap.get("displayName")+"\n"+
|
||||
|
|
|
@ -1175,11 +1175,15 @@ function builder_graph_init() {
|
|||
if (atree_data !== null && atree_node.value !== null) { // janky check if atree is valid
|
||||
const atree_state = atree_state_node.value;
|
||||
if (atree_data.length > 0) {
|
||||
const active_nodes = decode_atree(atree_node.value, atree_data);
|
||||
for (const node of active_nodes) {
|
||||
atree_set_state(atree_state.get(node.ability.id), true);
|
||||
try {
|
||||
const active_nodes = decode_atree(atree_node.value, atree_data);
|
||||
for (const node of active_nodes) {
|
||||
atree_set_state(atree_state.get(node.ability.id), true);
|
||||
}
|
||||
atree_state_node.mark_dirty().update();
|
||||
} catch (e) {
|
||||
console.log("Failed to decode atree. This can happen when updating versions. Give up!")
|
||||
}
|
||||
atree_state_node.mark_dirty().update();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue