diff --git a/src/main/java/app/services/db/KillfeedService.java b/src/main/java/app/services/db/KillfeedService.java index 63fcdfb..1fa64fe 100644 --- a/src/main/java/app/services/db/KillfeedService.java +++ b/src/main/java/app/services/db/KillfeedService.java @@ -59,7 +59,7 @@ public class KillfeedService { } public Map getPopulateWeapons(SteamID steamID, String server_id, int offset, int limit) { - List result = entityManager.createNativeQuery("SELECT COUNT(u.`weapon_index`) as c, i.`name` FROM `user_killfeed` as u INNER JOIN `tf2idb`.`tf2idb_item` as i ON u.`weapon_index` = i.`id` WHERE u.`attacker_id` = ?1 AND `attacker_id` != `victim_id` AND u.server_id like ?2 GROUP BY u.`weapon_index` DESC ORDER BY `c` DESC LIMIT ?3 OFFSET ?4") + List result = entityManager.createNativeQuery("SELECT COUNT(u.`weapon_index`) as c, i.`name`, u.`server_id` FROM `user_killfeed` as u INNER JOIN `tf2idb`.`tf2idb_item` as i ON u.`weapon_index` = i.`id` WHERE u.`attacker_id` = ?1 AND `attacker_id` != `victim_id` AND u.server_id like ?2 GROUP BY u.`weapon_index` DESC ORDER BY `c` DESC LIMIT ?3 OFFSET ?4") .setParameter(1, steamID.account_id) .setParameter(2, server_id==null||server_id.isEmpty()?'%':server_id) .setParameter(3, limit) @@ -118,9 +118,11 @@ public class KillfeedService { class HypeWeapons { long count; String name; + String server_id; HypeWeapons(Object obj) { this.count = (long) ((Object[]) obj)[0]; this.name = (String) ((Object[]) obj)[1]; + this.server_id = (String) ((Object[]) obj)[2]; } }