Clean default items, fix major id display
This commit is contained in:
parent
3198afcea1
commit
d7a2bf12ad
2 changed files with 24 additions and 31 deletions
49
display.js
49
display.js
|
@ -596,34 +596,31 @@ function displayExpandedItem(item, parent_id){
|
||||||
p_elem.textContent = "Set: " + item.get(id).toString();
|
p_elem.textContent = "Set: " + item.get(id).toString();
|
||||||
active_elem.appendChild(p_elem);
|
active_elem.appendChild(p_elem);
|
||||||
} else if (id === "majorIds") {
|
} else if (id === "majorIds") {
|
||||||
let p_elem = document.createElement("p");
|
for (let majorID of item.get(id)) {
|
||||||
p_elem.classList.add("itemp");
|
let p_elem = document.createElement("p");
|
||||||
let majorID = item.get(id).toString();
|
p_elem.classList.add("itemp");
|
||||||
|
|
||||||
let title_elem = document.createElement("b");
|
let title_elem = document.createElement("b");
|
||||||
let b_elem = document.createElement("b");
|
let b_elem = document.createElement("b");
|
||||||
if (majorID.includes(":")) {
|
if (majorID.includes(":")) {
|
||||||
let name = majorID.substring(0, majorID.indexOf(":")+1);
|
let name = majorID.substring(0, majorID.indexOf(":")+1);
|
||||||
let mid = majorID.substring(majorID.indexOf(":")+1);
|
let mid = majorID.substring(majorID.indexOf(":")+1);
|
||||||
if (name.charAt(0) !== "+") {name = "+" + name}
|
if (name.charAt(0) !== "+") {name = "+" + name}
|
||||||
title_elem.classList.add("Legendary");
|
title_elem.classList.add("Legendary");
|
||||||
title_elem.textContent = name;
|
title_elem.textContent = name;
|
||||||
b_elem.classList.add("Crafted");
|
b_elem.classList.add("Crafted");
|
||||||
b_elem.textContent = mid;
|
b_elem.textContent = mid;
|
||||||
p_elem.appendChild(title_elem);
|
p_elem.appendChild(title_elem);
|
||||||
p_elem.appendChild(b_elem);
|
p_elem.appendChild(b_elem);
|
||||||
} else {
|
} else {
|
||||||
let name = item.get(id).toString()
|
let name = item.get(id).toString()
|
||||||
if (name.charAt(0) !== "+") {name = "+" + name}
|
if (name.charAt(0) !== "+") {name = "+" + name}
|
||||||
b_elem.classList.add("Legendary");
|
b_elem.classList.add("Legendary");
|
||||||
b_elem.textContent = name;
|
b_elem.textContent = name;
|
||||||
p_elem.appendChild(b_elem);
|
p_elem.appendChild(b_elem);
|
||||||
|
}
|
||||||
|
active_elem.appendChild(p_elem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
active_elem.appendChild(p_elem);
|
|
||||||
} else if (id === "lvl" && item.get("tier") === "Crafted") {
|
} else if (id === "lvl" && item.get("tier") === "Crafted") {
|
||||||
let p_elem = document.createElement("p");
|
let p_elem = document.createElement("p");
|
||||||
p_elem.classList.add("itemp");
|
p_elem.classList.add("itemp");
|
||||||
|
|
6
load.js
6
load.js
|
@ -242,11 +242,7 @@ function init_maps() {
|
||||||
item.wDam = "0-0";
|
item.wDam = "0-0";
|
||||||
item.fDam = "0-0";
|
item.fDam = "0-0";
|
||||||
item.aDam = "0-0";
|
item.aDam = "0-0";
|
||||||
item.str = 0,
|
clean_item(item);
|
||||||
item.dex = 0,
|
|
||||||
item.int = 0,
|
|
||||||
item.def = 0,
|
|
||||||
item.agi = 0,
|
|
||||||
|
|
||||||
noneItems[i] = item;
|
noneItems[i] = item;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue