PlayerEditor: fixed players not being saved
This commit is contained in:
parent
f4d88a47e2
commit
8c11be5cdd
1 changed files with 7 additions and 7 deletions
|
@ -124,19 +124,19 @@ public class PlayerEditor extends ActionBarActivity {
|
|||
if (!atk[i].getText().toString().isEmpty())
|
||||
atkInts[i] = Integer.parseInt(atk[i].getText().toString());
|
||||
boolean validAtk = true;
|
||||
for (int i : atkInts)
|
||||
if (i == 0) {
|
||||
for (int i = Player.STR; i <= Player.CHA; i++)
|
||||
if (atkInts[i] == 0) {
|
||||
validAtk = false;
|
||||
break;
|
||||
}
|
||||
|
||||
if (
|
||||
!nameString.isEmpty() &&
|
||||
classInt != Player.NULL &&
|
||||
raceInt != Player.NULL &&
|
||||
pxInt != -1 &&
|
||||
validAtk
|
||||
) {
|
||||
classInt != Player.NULL &&
|
||||
raceInt != Player.NULL &&
|
||||
pxInt != -1 &&
|
||||
validAtk
|
||||
) {
|
||||
SharedPreferences p = getSharedPreferences(Welcome.PREFERENCES, MODE_PRIVATE);
|
||||
int i = p.getInt("players", 0);
|
||||
String saveName = nameString;
|
||||
|
|
Reference in a new issue