forked from 2009Scape/Server
When an Hardcore Ironman dies, the stats page will update with HARDCORE_DEAD and the XP will no longer increase
This commit is contained in:
parent
9f23d58673
commit
aa5e663f0a
1 changed files with 10 additions and 0 deletions
|
|
@ -4,6 +4,7 @@ import org.crandor.ServerConstants;
|
|||
import org.crandor.game.content.skill.Skills;
|
||||
import org.crandor.game.node.entity.player.Player;
|
||||
import org.crandor.game.node.entity.player.info.Rights;
|
||||
import org.crandor.game.node.entity.player.link.IronmanMode;
|
||||
import org.crandor.game.system.mysql.SQLEntryHandler;
|
||||
import org.crandor.game.system.mysql.SQLManager;
|
||||
import org.crandor.game.world.GameWorld;
|
||||
|
|
@ -58,6 +59,15 @@ public final class HighscoreSQLHandler extends SQLEntryHandler<Player> {
|
|||
create();
|
||||
return;
|
||||
}
|
||||
if (entry.getIronmanManager().checkRestriction(IronmanMode.HARDCORE_DEAD))
|
||||
{
|
||||
//Update the SQL table to indicate the player was a Hardcore ironman that died, do not update hiscores
|
||||
StringBuilder b = new StringBuilder("UPDATE highscores SET ironManMode='" + entry.getIronmanManager().getMode().name() + "' WHERE username ='" + value +"'");
|
||||
PreparedStatement statement = connection.prepareStatement(b.toString());
|
||||
statement.executeUpdate();
|
||||
SQLManager.close(statement.getConnection());
|
||||
return;
|
||||
}
|
||||
StringBuilder b = new StringBuilder("UPDATE highscores SET overall_xp='" + getTotalXp() + "', total_level='" + entry.getSkills().getTotalLevel() + "', ironManMode='" + entry.getIronmanManager().getMode().name() + "', ");
|
||||
int xp;
|
||||
for (int i = 0; i < Skills.SKILL_NAME.length; i++) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue