diff --git a/public/js/buildings/wohnhaus.js b/public/js/buildings/wohnhaus.js
index d29f06a..f99d9d6 100644
--- a/public/js/buildings/wohnhaus.js
+++ b/public/js/buildings/wohnhaus.js
@@ -13,7 +13,7 @@ export async function loadWohnhaus() {
@@ -32,7 +32,8 @@ export async function loadWohnhaus() {
-
+
+
@@ -46,7 +47,7 @@ export async function loadWohnhaus() {
@@ -238,6 +239,18 @@ function initSlotDrag() {
});
}
+/* ================================
+ SLOT KOMPATIBILITÄT PRÜFEN
+ Ring-Items (equip_slot="ring") passen in ring1 und ring2
+================================ */
+
+function isSlotCompatible(itemSlot, targetSlot) {
+ if (itemSlot === targetSlot) return true;
+ if (itemSlot === "ring" && (targetSlot === "ring1" || targetSlot === "ring2"))
+ return true;
+ return false;
+}
+
/* ================================
SLOT DROP
================================ */
@@ -255,7 +268,7 @@ function initDrop() {
const source = e.dataTransfer.getData("source");
const targetSlot = slot.dataset.slot;
- if (!itemSlot || itemSlot !== targetSlot) return;
+ if (!itemSlot || !isSlotCompatible(itemSlot, targetSlot)) return;
let icon;
@@ -321,10 +334,14 @@ function initInventoryDrop() {
const img = slot.querySelector("img");
if (!img) return;
+ // Ring-Slots normalisiert als "ring" im Inventar speichern
+ const normalizedSlot =
+ slotName === "ring1" || slotName === "ring2" ? "ring" : slotName;
+
inventoryItems.push({
id: itemId,
level: itemLevel,
- equip_slot: slotName,
+ equip_slot: normalizedSlot,
icon: img.src,
});
diff --git a/public/js/map-ui.js b/public/js/map-ui.js
index 9cd98b7..6779e71 100644
--- a/public/js/map-ui.js
+++ b/public/js/map-ui.js
@@ -1,6 +1,7 @@
import { loadWohnhaus } from "./buildings/wohnhaus.js";
import { loadSchwarzmarkt } from "./buildings/schwarzmarkt.js";
import { loadMine } from "./buildings/mine.js";
+import { loadArena } from "./buildings/arena.js";
const popup = document.getElementById("building-popup");
const title = document.getElementById("popup-title");
const tooltip = document.getElementById("map-tooltip");
@@ -11,6 +12,7 @@ const buildingModules = {
11: loadWohnhaus, // Tabs ausblenden, eigenes UI
12: loadSchwarzmarkt, // Tabs ausblenden, eigenes UI
10: loadMine, // Tabs bleiben sichtbar, nur Aktionen-Tab befüllen
+ 1: loadArena, //Tab für die PVP Arena
};
// Gebäude die ihre eigenen Tabs behalten sollen