mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-01-06 23:33:09 +08:00
perf: fix redundant addAll
This commit is contained in:
parent
33d5c5238a
commit
1424405c64
@ -29,8 +29,7 @@ public class KillMonsterTimeChallengeFactoryHandler implements ChallengeFactoryH
|
|||||||
Scene scene,
|
Scene scene,
|
||||||
SceneGroup group) {
|
SceneGroup group) {
|
||||||
val realGroup = scene.getScriptManager().getGroupById(groupId);
|
val realGroup = scene.getScriptManager().getGroupById(groupId);
|
||||||
val challengeTriggers = new ArrayList<ChallengeTrigger>();
|
val challengeTriggers = new ArrayList<>(List.of(new KillMonsterCountTrigger(), new InTimeTrigger()));
|
||||||
challengeTriggers.addAll(List.of(new KillMonsterCountTrigger(), new InTimeTrigger()));
|
|
||||||
|
|
||||||
val challengeData = GameData.getDungeonChallengeConfigDataMap().get(challengeId);
|
val challengeData = GameData.getDungeonChallengeConfigDataMap().get(challengeId);
|
||||||
val challengeType = challengeData.getChallengeType();
|
val challengeType = challengeData.getChallengeType();
|
||||||
|
@ -58,8 +58,7 @@ public class MailHandler extends BasePlayerManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void deleteMail(List<Integer> mailList) {
|
public void deleteMail(List<Integer> mailList) {
|
||||||
List<Integer> sortedMailList = new ArrayList<>();
|
List<Integer> sortedMailList = new ArrayList<>(mailList);
|
||||||
sortedMailList.addAll(mailList);
|
|
||||||
sortedMailList.sort(Collections.reverseOrder());
|
sortedMailList.sort(Collections.reverseOrder());
|
||||||
|
|
||||||
List<Integer> deleted = new ArrayList<>();
|
List<Integer> deleted = new ArrayList<>();
|
||||||
|
Loading…
Reference in New Issue
Block a user