merge valid condition into single expression

master
melvinzhang 2017-08-01 20:24:33 +08:00
parent 54cbaf0bca
commit ec5f99dc7a
1 changed files with 1 additions and 5 deletions

View File

@ -167,11 +167,7 @@ public abstract class MagicItemOnStack extends MagicObjectImpl implements MagicT
@Override
public boolean isValidTarget(final MagicSource aSource) {
if (aSource instanceof MagicItemOnStack) {
return aSource.getId() > getId();
} else {
return aSource != this;
}
return !(aSource instanceof MagicItemOnStack) || aSource.getId() > getId();
}
@Override