mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 20:41:58 -08:00
* Fixed that mana auto-payment settings were not correctly set from previous settings on game start.
This commit is contained in:
parent
049f9aca7b
commit
0cbe590cac
9 changed files with 45 additions and 9 deletions
|
|
@ -140,7 +140,9 @@ public class Session {
|
|||
if (user == null) {
|
||||
user = UserManager.getInstance().findUser("Admin");
|
||||
}
|
||||
user.setUserData(new UserData(UserGroup.ADMIN, 0, false, false, false, null, "world.png", false));
|
||||
UserData adminUserData = UserData.getDefaultUserDataView();
|
||||
adminUserData.setGroupId(UserGroup.ADMIN.getGroupId());
|
||||
user.setUserData(adminUserData);
|
||||
if (!UserManager.getInstance().connectToSession(sessionId, user.getId())) {
|
||||
logger.info("Error connecting Admin!");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,6 @@ import mage.game.Table;
|
|||
import mage.game.tournament.TournamentPlayer;
|
||||
import mage.interfaces.callback.ClientCallback;
|
||||
import mage.players.net.UserData;
|
||||
import mage.players.net.UserGroup;
|
||||
import mage.server.draft.DraftSession;
|
||||
import mage.server.game.GameManager;
|
||||
import mage.server.game.GameSessionPlayer;
|
||||
|
|
@ -400,7 +399,7 @@ public class User {
|
|||
|
||||
public UserData getUserData() {
|
||||
if (userData == null) {// default these to avaiod NPE -> will be updated from client short after
|
||||
return new UserData(UserGroup.DEFAULT, 0, false, false, false, null, "world.png", false);
|
||||
return UserData.getDefaultUserDataView();
|
||||
}
|
||||
return this.userData;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue