This commit is contained in:
Cay 2026-03-13 17:03:09 +00:00
parent 620b214671
commit 48e2e4e5cd

View File

@ -66,13 +66,17 @@ async function loadEquipment() {
const equipment = await res.json();
equipment.forEach((item) => {
const slot = document.querySelector(
'.equip-slot[data-slot="' + item.slot + '"]',
);
const slot = document.querySelector('.slot[data-slot="' + item.slot + '"]');
if (!slot) return;
const label = slot.querySelector(".slot-label");
slot.innerHTML = `<img src="${item.icon}">`;
if (label) {
slot.appendChild(label);
}
});
}
@ -178,8 +182,14 @@ function initDrop() {
'.inventory-slot[data-id="' + itemId + '"] img',
).src;
const label = slot.querySelector(".slot-label");
slot.innerHTML = `<img src="${icon}">`;
if (label) {
slot.appendChild(label);
}
saveEquipment(targetSlot, itemId, itemLevel);
});
});