forked from External/mage
* Fixed some problems with new avatar handling.
This commit is contained in:
parent
23cd772fea
commit
b95d7ca705
6 changed files with 19 additions and 19 deletions
|
|
@ -36,6 +36,7 @@ import java.util.concurrent.locks.ReentrantLock;
|
|||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import mage.MageException;
|
||||
import mage.constants.Constants;
|
||||
import mage.interfaces.callback.ClientCallback;
|
||||
import mage.players.net.UserData;
|
||||
import mage.players.net.UserGroup;
|
||||
|
|
@ -157,6 +158,10 @@ public class Session {
|
|||
} else {
|
||||
user.getUserData().update(userData);
|
||||
}
|
||||
if (user.getUserData().getAvatarId() < Constants.MIN_AVATAR_ID
|
||||
|| user.getUserData().getAvatarId() > Constants.MAX_AVATAR_ID) {
|
||||
user.getUserData().setAvatarId(Constants.DEFAULT_AVATAR_ID);
|
||||
}
|
||||
if (user.getUserData().getAvatarId() == 11) {
|
||||
user.getUserData().setAvatarId(updateAvatar(user.getName()));
|
||||
}
|
||||
|
|
@ -169,24 +174,16 @@ public class Session {
|
|||
//TODO: move to separate class
|
||||
//TODO: add for checking for private key
|
||||
switch (userName) {
|
||||
case "nantuko":
|
||||
return 1000;
|
||||
case "North":
|
||||
return 1006;
|
||||
case "BetaSteward":
|
||||
return 1008;
|
||||
case "loki":
|
||||
return 1012;
|
||||
case "Ayrat":
|
||||
return 1018;
|
||||
case "Bandit":
|
||||
return 1020;
|
||||
case "fireshoes":
|
||||
return 1021;
|
||||
case "Wehk":
|
||||
return 66;
|
||||
}
|
||||
return 51;
|
||||
return 11;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue