UserDataView. More custom avatars.

This commit is contained in:
magenoxx 2011-09-08 10:41:52 +04:00
parent 0b223bfe4f
commit 33be6bd828
7 changed files with 38 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View file

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

View file

@ -0,0 +1,29 @@
package mage.view;
import mage.players.net.UserData;
import java.io.Serializable;
/**
* Transfer object for {@link mage.players.net.UserData}
*
* @author ayrat
*/
public class UserDataView implements Serializable {
protected int avatarId;
protected int userGroup;
public UserDataView(int avatarId) {
this.avatarId = avatarId;
}
public UserDataView(UserData userData) {
this.avatarId = userData.getAvatarId();
this.userGroup = userData.getGroupId();
}
public int getAvatarId() {
return avatarId;
}
}

View file

@ -112,7 +112,13 @@ public class Session {
} else if (userName.equals("i_no_k")) {
userData.setAvatarId(1002);
} else if (userName.equals("Askael")) {
userData.setAvatarId(1003);
userData.setAvatarId(1004);
} else if (userName.equals("North")) {
userData.setAvatarId(1006);
} else if (userName.equals("BetaSteward")) {
userData.setAvatarId(1008);
} else if (userName.equals("Arching")) {
userData.setAvatarId(1010);
}
}

View file

@ -8,7 +8,8 @@ public enum UserGroup {
COMPUTER(0),
PLAYER(1),
MAGE(3),
ADMIN(7);
ADMIN(7),
OWNER(15);
private int groupId;