From b35bdd5087f13d65a2dfc9fa787e41511f370c51 Mon Sep 17 00:00:00 2001 From: Zrips Date: Wed, 9 Mar 2022 15:23:23 +0200 Subject: [PATCH] inclusion of exp for gtop calculation --- src/main/java/com/gamingmesh/jobs/dao/JobsDAO.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/gamingmesh/jobs/dao/JobsDAO.java b/src/main/java/com/gamingmesh/jobs/dao/JobsDAO.java index 32a8ddcc..3fd33945 100644 --- a/src/main/java/com/gamingmesh/jobs/dao/JobsDAO.java +++ b/src/main/java/com/gamingmesh/jobs/dao/JobsDAO.java @@ -1749,8 +1749,8 @@ public abstract class JobsDAO { try { prest = conn.prepareStatement("SELECT " + JobsTableFields.userid.getCollumn() - + ", COUNT(*) AS amount, sum(" + JobsTableFields.level.getCollumn() + ") AS totallvl FROM `" + getJobsTableName() - + "` GROUP BY userid ORDER BY totallvl DESC LIMIT " + start + "," + jobsTopAmount + ";"); + + ", COUNT(*) AS amount, sum(" + JobsTableFields.level.getCollumn() + ") AS totallvl, sum(" + JobsTableFields.experience.getCollumn() + ") AS totalexp FROM `" + getJobsTableName() + + "` GROUP BY userid ORDER BY totallvl DESC, totalexp DESC LIMIT " + start + "," + jobsTopAmount + ";"); res = prest.executeQuery(); while (res.next()) { @@ -1758,7 +1758,7 @@ public abstract class JobsDAO { if (info == null) continue; - names.add(new TopList(info, res.getInt("totallvl"), 0)); + names.add(new TopList(info, res.getInt("totallvl"), res.getInt("totalexp"))); if (names.size() >= jobsTopAmount) break;