From 3af090fb0b9e707a1017513bae99a54b7457cdbf Mon Sep 17 00:00:00 2001 From: MaksSlyzar Date: Sat, 4 Apr 2026 19:05:03 +0300 Subject: [PATCH] Fixed getHostile. --- client/src/services/GameDataManager.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/client/src/services/GameDataManager.js b/client/src/services/GameDataManager.js index a7186c7..141d527 100644 --- a/client/src/services/GameDataManager.js +++ b/client/src/services/GameDataManager.js @@ -45,7 +45,6 @@ class GameDataManager { if (!key) return ""; const langData = this.translations[this.currentLang]; if (!langData) return key; - if (langData[key]) return langData[key]; if (key.includes(".")) { @@ -106,13 +105,12 @@ class GameDataManager { } getHostile(id) { - const cleanId = this._cleanId(id); - const hostile = this.hostiles.get(cleanId); + const hostile = this.hostiles.get(id); if (!hostile) { return { - id: cleanId, - displayName: `Unknown Entity (${cleanId})`, + id: id, + displayName: `Unknown Entity (${id})`, level: 1, stats: { hp: 100 }, }; @@ -136,7 +134,6 @@ class GameDataManager { meta: { rarity: "common" }, }; } - return { ...item, displayName: this.t(item.displayName),