1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-12-30 21:07:48 +01:00

inclusion of exp for gtop calculation

This commit is contained in:
Zrips 2022-03-09 15:23:23 +02:00
parent 1f691f448c
commit b35bdd5087

View File

@ -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;