Tip : If you have more than 2 worlds you should check out your CreateCharHandler.java, in the most sources you can use names which are already used in other worlds. This can easily be fixed.
This is to have different experience rates in each world. You can do the same for the world icon, event message and whatever, all you have to do is to use your brain. I am not telling you where to add what, it is really not hard.
This is to have different experience rates in each world. You can do the same for the world icon, event message and whatever, all you have to do is to use your brain. I am not telling you where to add what, it is really not hard.
- Code:
private Properties worldProp = new Properties();
private List<Integer> expRate = new ArrayList<Integer>();
- Code:
int worlds = Integer.parseInt(props.getProperty("net.sf.odinms.login.worlds", "1"));
for (int i = 1; i <= worlds; i++) {
try {
FileReader fileReader = new FileReader("world/" + i + ".properties");
worldProp.load(fileReader);
fileReader.close();
expRate.add(Integer.parseInt(worldProp.getProperty("net.sf.odinms.world.expRate", "1")));
serverMessage.add(worldProp.getProperty("net.sf.odinms.world.serverMessage"));
} catch (FileNotFoundException e) {
log.error("Properties for world " + i + " can not be found.");
}
}
- Code:
public int getExpRate(int worldId) {
return expRate.get(worldId);
}