create PlayerManager static class
This commit is contained in:
1 parent
76eed79b0a
commit
450ae2ec82
87 files changed
+2730
-2853
No files matched your search
@@ -12,6 +12,7 @@ package engine.net.client.msg;
|
||||
import engine.Enum;
|
||||
import engine.gameManager.ChatManager;
|
||||
import engine.gameManager.DbManager;
|
||||
import engine.gameManager.PlayerManager;
|
||||
import engine.net.*;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.Protocol;
|
||||
@@ -381,23 +382,23 @@ public class ApplyRuneMsg extends ClientNetMsg {
|
||||
//add any additional stats to match old amount
|
||||
int dif = strTotal - (int) playerCharacter.statStrBase;
|
||||
if (dif > 0 && strTotal < (int) playerCharacter.statStrMax) {
|
||||
playerCharacter.addStr(dif);
|
||||
PlayerManager.addStr(playerCharacter, dif);
|
||||
}
|
||||
dif = dexTotal - (int) playerCharacter.statDexBase;
|
||||
if (dif > 0 && dexTotal < (int) playerCharacter.statDexMax) {
|
||||
playerCharacter.addDex(dif);
|
||||
PlayerManager.addDex(playerCharacter, dif);
|
||||
}
|
||||
dif = conTotal - (int) playerCharacter.statConBase;
|
||||
if (dif > 0 && conTotal < (int) playerCharacter.statConMax) {
|
||||
playerCharacter.addCon(dif);
|
||||
PlayerManager.addCon(playerCharacter, dif);
|
||||
}
|
||||
dif = intTotal - (int) playerCharacter.statIntBase;
|
||||
if (dif > 0 && intTotal < (int) playerCharacter.statIntMax) {
|
||||
playerCharacter.addInt(dif);
|
||||
PlayerManager.addInt(playerCharacter, dif);
|
||||
}
|
||||
dif = spiTotal - (int) playerCharacter.statSpiBase;
|
||||
if (dif > 0 && spiTotal < (int) playerCharacter.statSpiMax) {
|
||||
playerCharacter.addSpi(dif);
|
||||
PlayerManager.addSpi(playerCharacter, dif);
|
||||
}
|
||||
// recalculate all bonuses/formulas/skills/powers
|
||||
playerCharacter.recalculate();
|
||||
|
||||
Reference in new issue
Block a user