cleanup: use bulk operation instead of iteration
This commit is contained in:
@@ -514,9 +514,7 @@ public class MaplePlayerNPC extends AbstractMapleMapObject {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
for (Integer i : updateMapids) {
|
||||
mapids.add(i);
|
||||
}
|
||||
mapids.addAll(updateMapids);
|
||||
|
||||
return mapids;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user