cleanup: use bulk operation instead of iteration

This commit is contained in:
P0nk
2021-04-08 17:44:35 +02:00
parent 3434c7334b
commit 202f2d8bc5
16 changed files with 42 additions and 101 deletions

View File

@@ -62,9 +62,7 @@ public class MobSkill {
}
public void addSummons(List<Integer> toSummon) {
for (Integer summon : toSummon) {
this.toSummon.add(summon);
}
this.toSummon.addAll(toSummon);
}
public void setSpawnEffect(int spawnEffect) {
@@ -186,9 +184,7 @@ public class MobSkill {
break;
case 129: // Banish
if (lt != null && rb != null && skill) {
for (MapleCharacter chr : getPlayersInRange(monster)) {
banishPlayers.add(chr);
}
banishPlayers.addAll(getPlayersInRange(monster));
} else {
banishPlayers.add(player);
}