I just need to know why my code won't work. I'm trying to give an occupation (Korean Gamer) more occupation EXP rate per occupation level. He will get +50 EXP rate every occupation level. I'm almost 100% positive my code is supposed to work but doesn't.
PHP Code:public double getExpRate(MapleCharacter player) {
int oriExp = WorldConstants.Servers.Scania.getExp();
switch (occupid) {
case 0:
return (int) oriExp + player.getExpBoost();
case 1:
return (int) oriExp * 2.5 + getExpModByKoreanGamer(player);
I only did two levels for debugging purposes. I'm almost sure this is supposed to work and the occupation's EXP rate is supposed to add +50 to it's current EXP rate per rebirth. Any idea as to what's going on?PHP Code:public static double getExpModByKoreanGamer(MapleCharacter chr) {
final int level = chr.getOccupationLevel();
double occuexp = chr.getOccupation().getExpRate(chr);
if (level >= 1) {
occuexp += 50;
} else if (level >= 2) {
occuexp += 50;
}
return occuexp;
}



Reply With Quote![[Help] Occupation](http://ragezone.com/hyper728.png)


