mirror of
https://github.com/Zrips/Jobs.git
synced 2025-01-02 14:29:07 +01:00
inclusion of exp for gtop calculation
This commit is contained in:
parent
1f691f448c
commit
b35bdd5087
@ -1749,8 +1749,8 @@ public abstract class JobsDAO {
|
|||||||
try {
|
try {
|
||||||
|
|
||||||
prest = conn.prepareStatement("SELECT " + JobsTableFields.userid.getCollumn()
|
prest = conn.prepareStatement("SELECT " + JobsTableFields.userid.getCollumn()
|
||||||
+ ", COUNT(*) AS amount, sum(" + JobsTableFields.level.getCollumn() + ") AS totallvl FROM `" + getJobsTableName()
|
+ ", COUNT(*) AS amount, sum(" + JobsTableFields.level.getCollumn() + ") AS totallvl, sum(" + JobsTableFields.experience.getCollumn() + ") AS totalexp FROM `" + getJobsTableName()
|
||||||
+ "` GROUP BY userid ORDER BY totallvl DESC LIMIT " + start + "," + jobsTopAmount + ";");
|
+ "` GROUP BY userid ORDER BY totallvl DESC, totalexp DESC LIMIT " + start + "," + jobsTopAmount + ";");
|
||||||
res = prest.executeQuery();
|
res = prest.executeQuery();
|
||||||
|
|
||||||
while (res.next()) {
|
while (res.next()) {
|
||||||
@ -1758,7 +1758,7 @@ public abstract class JobsDAO {
|
|||||||
if (info == null)
|
if (info == null)
|
||||||
continue;
|
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)
|
if (names.size() >= jobsTopAmount)
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user