MapleSolaxiaV2 Revision 1
Minor changes about how ranking moves are reflected in-game.
This commit is contained in:
@@ -52,7 +52,7 @@ Testei o script do chscroll crafter.
|
|||||||
|
|
||||||
10 --- 11 Agosto 2015,
|
10 --- 11 Agosto 2015,
|
||||||
NPC crafters, Accessories e chscroll funcionam OK.
|
NPC crafters, Accessories e chscroll funcionam OK.
|
||||||
cORRIGIDO BUG DE CRAFTER Q TIRAVA ITEM SE INCOMPLETO!
|
CORRIGIDO BUG DE CRAFTER Q TIRAVA ITEM SE INCOMPLETO!
|
||||||
Inclui constante USE_PERFECT_SCROLLING.
|
Inclui constante USE_PERFECT_SCROLLING.
|
||||||
|
|
||||||
12 --- 14 Agosto 2015,
|
12 --- 14 Agosto 2015,
|
||||||
@@ -70,4 +70,7 @@ Resolvi alguns problemas com scripts do aviao e do metro.
|
|||||||
25 --- 26 Agosto 2015,
|
25 --- 26 Agosto 2015,
|
||||||
Mecanismos de evitar queda de HP por mapa (red bean, air bubble, soft white bun) funcionam.
|
Mecanismos de evitar queda de HP por mapa (red bean, air bubble, soft white bun) funcionam.
|
||||||
Correcao de bug que nao contabilizava queda de hp qdo um char loga em um mapa.
|
Correcao de bug que nao contabilizava queda de hp qdo um char loga em um mapa.
|
||||||
Correcao de bug que nao retirava corretamente recursos de projeteis.
|
Correcao de bug que nao retirava corretamente recursos de projeteis.
|
||||||
|
|
||||||
|
6 Novembro 2015,
|
||||||
|
Movimentacao no ranking agora eh contabilizado corretamente.
|
||||||
@@ -32,10 +32,12 @@ public class ServerConstants {
|
|||||||
public static final boolean USE_PARTY_SEARCH = false;
|
public static final boolean USE_PARTY_SEARCH = false;
|
||||||
public static final boolean USE_AUTOBAN = false; //commands the server to detect infractors automatically.
|
public static final boolean USE_AUTOBAN = false; //commands the server to detect infractors automatically.
|
||||||
public static final boolean USE_ANOTHER_AUTOASSIGN = true; //based on distributing AP accordingly with higher secondary stat on equipments.
|
public static final boolean USE_ANOTHER_AUTOASSIGN = true; //based on distributing AP accordingly with higher secondary stat on equipments.
|
||||||
|
public static final boolean USE_REFRESH_RANK_MOVE = true;
|
||||||
|
|
||||||
public static final int MAX_AP = 999;
|
public static final int MAX_AP = 999;
|
||||||
public static final long BLOCK_DUEY_RACE_COND = (long)(0.5 * 1000);
|
public static final long BLOCK_DUEY_RACE_COND = (long)(0.5 * 1000);
|
||||||
public static final long PET_LOOT_UPON_ATTACK = (long)(0.8 * 1000); //time the pet must wait before trying to pick items up.
|
public static final long PET_LOOT_UPON_ATTACK = (long)(0.7 * 1000); //time the pet must wait before trying to pick items up.
|
||||||
|
|
||||||
//Some Gameplay Enhancing Configurations
|
//Some Gameplay Enhancing Configurations
|
||||||
public static final boolean USE_PERFECT_SCROLLING = true; //scrolls doesn't use slots upon failure.
|
public static final boolean USE_PERFECT_SCROLLING = true; //scrolls doesn't use slots upon failure.
|
||||||
public static final boolean USE_ENHANCED_CHSCROLL = true; //equips even more powerful with chaos upgrade
|
public static final boolean USE_ENHANCED_CHSCROLL = true; //equips even more powerful with chaos upgrade
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ import java.sql.ResultSet;
|
|||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import client.MapleJob;
|
import client.MapleJob;
|
||||||
import tools.DatabaseConnection;
|
import tools.DatabaseConnection;
|
||||||
|
import constants.ServerConstants;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Matze
|
* @author Matze
|
||||||
@@ -35,11 +36,17 @@ import tools.DatabaseConnection;
|
|||||||
public class RankingWorker implements Runnable {
|
public class RankingWorker implements Runnable {
|
||||||
private Connection con;
|
private Connection con;
|
||||||
private long lastUpdate = System.currentTimeMillis();
|
private long lastUpdate = System.currentTimeMillis();
|
||||||
|
|
||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
con = DatabaseConnection.getConnection();
|
con = DatabaseConnection.getConnection();
|
||||||
con.setAutoCommit(false);
|
con.setAutoCommit(false);
|
||||||
|
|
||||||
|
if(ServerConstants.USE_REFRESH_RANK_MOVE == true) {
|
||||||
|
resetMoveRank(true);
|
||||||
|
resetMoveRank(false);
|
||||||
|
}
|
||||||
|
|
||||||
updateRanking(null);
|
updateRanking(null);
|
||||||
for (int i = 0; i < 3; i += 2) {
|
for (int i = 0; i < 3; i += 2) {
|
||||||
for (int j = 1; j < 6; j++) {
|
for (int j = 1; j < 6; j++) {
|
||||||
@@ -50,13 +57,22 @@ public class RankingWorker implements Runnable {
|
|||||||
con.setAutoCommit(true);
|
con.setAutoCommit(true);
|
||||||
lastUpdate = System.currentTimeMillis();
|
lastUpdate = System.currentTimeMillis();
|
||||||
} catch (SQLException ex) {
|
} catch (SQLException ex) {
|
||||||
|
ex.printStackTrace();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
con.rollback();
|
con.rollback();
|
||||||
con.setAutoCommit(true);
|
con.setAutoCommit(true);
|
||||||
} catch (SQLException ex2) {
|
} catch (SQLException ex2) {
|
||||||
|
ex2.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void resetMoveRank(boolean job) throws SQLException {
|
||||||
|
String query = "UPDATE characters SET " + (job == true ? "jobRankMove = 0" : "rankMove = 0");
|
||||||
|
PreparedStatement reset = con.prepareStatement(query);
|
||||||
|
ResultSet rs = reset.executeQuery();
|
||||||
|
}
|
||||||
|
|
||||||
private void updateRanking(MapleJob job) throws SQLException {
|
private void updateRanking(MapleJob job) throws SQLException {
|
||||||
String sqlCharSelect = "SELECT c.id, " + (job != null ? "c.jobRank, c.jobRankMove" : "c.rank, c.rankMove") + ", a.lastlogin AS lastlogin, a.loggedin FROM characters AS c LEFT JOIN accounts AS a ON c.accountid = a.id WHERE c.gm = 0 ";
|
String sqlCharSelect = "SELECT c.id, " + (job != null ? "c.jobRank, c.jobRankMove" : "c.rank, c.rankMove") + ", a.lastlogin AS lastlogin, a.loggedin FROM characters AS c LEFT JOIN accounts AS a ON c.accountid = a.id WHERE c.gm = 0 ";
|
||||||
|
|||||||
@@ -168,11 +168,11 @@ public class Server implements Runnable {
|
|||||||
MapleItemInformationProvider.getInstance().getAllItems();
|
MapleItemInformationProvider.getInstance().getAllItems();
|
||||||
|
|
||||||
CashItemFactory.getSpecialCashItems();
|
CashItemFactory.getSpecialCashItems();
|
||||||
System.out.println("Items loaded in " + ((System.currentTimeMillis() - timeToTake) / 1000.0) + " seconds\r\n");
|
System.out.println("Items loaded in " + ((System.currentTimeMillis() - timeToTake) / 1000.0) + " seconds");
|
||||||
|
|
||||||
timeToTake = System.currentTimeMillis();
|
timeToTake = System.currentTimeMillis();
|
||||||
MapleQuest.loadAllQuest();
|
MapleQuest.loadAllQuest();
|
||||||
System.out.println("Quest loaded in " + ((System.currentTimeMillis() - timeToTake) / 1000.0) + " seconds\r\n");
|
System.out.println("Quest loaded in " + ((System.currentTimeMillis() - timeToTake) / 1000.0) + " seconds\r\n");
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user