mirror of
https://github.com/magefree/mage.git
synced 2025-12-27 22:12:03 -08:00
Fixed equal or == errors -- 23 cards and more (see #4407)
This commit is contained in:
parent
15fa8fa124
commit
c24ba742f6
36 changed files with 115 additions and 75 deletions
|
|
@ -329,7 +329,7 @@ public class TestPlayer implements Player {
|
|||
}
|
||||
UUID modeId = ability.getModes().getModeId(modeNr);
|
||||
selectedMode = ability.getModes().get(modeId);
|
||||
if (modeId != ability.getModes().getMode().getId()) {
|
||||
if (!Objects.equals(modeId, ability.getModes().getMode().getId())) {
|
||||
ability.getModes().setActiveMode(modeId);
|
||||
index = 0; // reset target index if mode changes
|
||||
}
|
||||
|
|
@ -2416,4 +2416,21 @@ public class TestPlayer implements Player {
|
|||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Player obj = (Player) o;
|
||||
if (this.getId() == null || obj.getId() == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return this.getId().equals(obj.getId());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1293,4 +1293,22 @@ public class PlayerStub implements Player {
|
|||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Player obj = (Player) o;
|
||||
if (this.getId() == null || obj.getId() == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return this.getId().equals(obj.getId());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue