pop41
This commit is contained in:
parent
c7d4a5c4a3
commit
bfd5c02d82
@ -77,17 +77,19 @@ async function loadEquipment() {
|
|||||||
const equipment = await res.json();
|
const equipment = await res.json();
|
||||||
|
|
||||||
equipment.forEach((item) => {
|
equipment.forEach((item) => {
|
||||||
|
if (!item.item_id) return; // ← WICHTIG
|
||||||
|
|
||||||
const slot = document.querySelector('.slot[data-slot="' + item.slot + '"]');
|
const slot = document.querySelector('.slot[data-slot="' + item.slot + '"]');
|
||||||
if (!slot) return;
|
if (!slot) return;
|
||||||
|
|
||||||
const label = slot.querySelector(".slot-label");
|
const label = slot.querySelector(".slot-label");
|
||||||
|
|
||||||
slot.innerHTML = `
|
slot.innerHTML = `
|
||||||
<img src="${item.icon}"
|
<img src="${item.icon}"
|
||||||
draggable="true"
|
draggable="true"
|
||||||
data-id="${item.item_id}"
|
data-id="${item.item_id}"
|
||||||
data-level="${item.item_level_id}">
|
data-level="${item.item_level_id}">
|
||||||
`;
|
`;
|
||||||
|
|
||||||
if (label) slot.appendChild(label);
|
if (label) slot.appendChild(label);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user