Display mage class name ocrrectly. Fixes #178

This commit is contained in:
Phillip Thelen 2015-12-10 21:28:41 +01:00
parent 7a9e628089
commit 6802f2bbf8
3 changed files with 9 additions and 2 deletions

View file

@ -85,7 +85,7 @@ public class AvatarWithBarsViewModel implements View.OnClickListener {
new UserPicture(user, this.context).setPictureOn(image);
if (user.getStats().get_class() != null) {
userClass += user.getStats().get_class().name();
userClass += user.getStats().getCleanedClassName();
}
lvlText.setText("Lvl" + user.getStats().getLvl() + " " + userClass);
Drawable drawable;

View file

@ -98,7 +98,7 @@ public class PartyMemberRecyclerViewAdapter extends RecyclerView.Adapter<PartyMe
lvl.setText("LVL " + user.getStats().getLvl());
classLabel.setText(user.getStats()._class.toString());
classLabel.setText(user.getStats().getCleanedClassName());
switch (user.getStats()._class) {

View file

@ -71,6 +71,13 @@ public abstract class PlayerMinStats extends BasicStats {
return _class;
}
public String getCleanedClassName() {
if (_class.toString().equals("wizard")) {
return "mage";
}
return _class.toString();
}
public void set_class(HabitRpgClass _class) {
this._class = _class;
}