forked from SteamWar/SteamWar
@@ -48,14 +48,17 @@ class InternalKit(id: EntityID<CompositeID>): CompositeEntity(id) {
|
|||||||
companion object: CompositeEntityClass<InternalKit>(PersonalKitTable) {
|
companion object: CompositeEntityClass<InternalKit>(PersonalKitTable) {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun get(userId: Int, gamemode: String) = useDb {
|
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()
|
.toList()
|
||||||
}
|
}
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun get(userId: Int, gamemode: String, kitName: String) = useDb {
|
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) }
|
get(CompositeID {
|
||||||
.firstOrNull()
|
it[PersonalKitTable.userId] = EntityID(userId, SteamwarUserTable)
|
||||||
|
it[PersonalKitTable.gamemode] = gamemode
|
||||||
|
it[PersonalKitTable.kitName] = kitName
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
|
|||||||
Reference in New Issue
Block a user