From fe8d37c9664125ebe503cc22e7d83d24ff8e5114 Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Wed, 17 Dec 2025 23:29:00 +0100 Subject: [PATCH] Maybe? Fix kits Signed-off-by: Chaoscaot --- CommonCore/SQL/src/de/steamwar/sql/PersonalKit.kt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/CommonCore/SQL/src/de/steamwar/sql/PersonalKit.kt b/CommonCore/SQL/src/de/steamwar/sql/PersonalKit.kt index cd774d3c..5daa1128 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/PersonalKit.kt +++ b/CommonCore/SQL/src/de/steamwar/sql/PersonalKit.kt @@ -48,14 +48,17 @@ class InternalKit(id: EntityID): CompositeEntity(id) { companion object: CompositeEntityClass(PersonalKitTable) { @JvmStatic fun get(userId: Int, gamemode: String) = useDb { - find { PersonalKitTable.userId eq userId and (PersonalKitTable.gamemode eq gamemode) and (PersonalKitTable.inUse eq true) } + find { PersonalKitTable.userId eq userId and (PersonalKitTable.gamemode eq gamemode) } .toList() } @JvmStatic fun get(userId: Int, gamemode: String, kitName: String) = useDb { - find { PersonalKitTable.userId eq userId and (PersonalKitTable.gamemode eq gamemode) and (PersonalKitTable.kitName eq kitName) and (PersonalKitTable.inUse eq true) } - .firstOrNull() + get(CompositeID { + it[PersonalKitTable.userId] = EntityID(userId, SteamwarUserTable) + it[PersonalKitTable.gamemode] = gamemode + it[PersonalKitTable.kitName] = kitName + }) } @JvmStatic