mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-03 00:31:51 +00:00
Local debugging accounts fix (#13)
* Revised shop re-stocking interval. * Revised shop re-stocking interval. * Updated character save directory. * Renamed new player save directory from accounts to characters.
This commit is contained in:
committed by
Daniel Ginovker
parent
66396fc4f5
commit
b327e34f8e
@@ -1,11 +1,6 @@
|
||||
package redone.game.players;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileReader;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.*;
|
||||
|
||||
import redone.util.Misc;
|
||||
|
||||
@@ -18,8 +13,7 @@ public class PlayerSave {
|
||||
return loadPlayerInfo(player, playerName, playerPass, true);
|
||||
}
|
||||
|
||||
public static int loadPlayerInfo(Client player, String playerName, String playerPass, boolean doRealLogin)
|
||||
{
|
||||
public static int loadPlayerInfo(Client player, String playerName, String playerPass, boolean doRealLogin) {
|
||||
String line = "";
|
||||
String token = "";
|
||||
String token2 = "";
|
||||
@@ -30,8 +24,7 @@ public class PlayerSave {
|
||||
boolean File1 = false;
|
||||
|
||||
try {
|
||||
characterfile = new BufferedReader(new FileReader(
|
||||
"./data/characters/" + playerName + ".txt"));
|
||||
characterfile = new BufferedReader(new FileReader(System.getProperty("user.dir") + "/data/characters/" + player.playerName + ".txt"));
|
||||
File1 = true;
|
||||
} catch (FileNotFoundException fileex1) {
|
||||
}
|
||||
@@ -505,8 +498,9 @@ public class PlayerSave {
|
||||
|
||||
BufferedWriter characterfile = null;
|
||||
try {
|
||||
characterfile = new BufferedWriter(new FileWriter(
|
||||
"./data/characters/" + player.playerName + ".txt"));
|
||||
String filePath = System.getProperty("user.dir") + "/data/characters/" + player.playerName + ".txt";
|
||||
new File(filePath).getParentFile().mkdir();
|
||||
characterfile = new BufferedWriter(new FileWriter(filePath));
|
||||
|
||||
/* ACCOUNT */
|
||||
characterfile.write("[ACCOUNT]", 0, 9);
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user