From 4de21d4a40959486fd97ef2f1311864ed9879e16 Mon Sep 17 00:00:00 2001 From: KingRainbow44 Date: Sat, 3 Jun 2023 15:35:04 -0400 Subject: [PATCH] Remove redundant script event calling when changing the time --- src/main/java/emu/grasscutter/game/player/Player.java | 6 ------ src/main/java/emu/grasscutter/game/world/World.java | 4 ---- 2 files changed, 10 deletions(-) diff --git a/src/main/java/emu/grasscutter/game/player/Player.java b/src/main/java/emu/grasscutter/game/player/Player.java index 246c8a370..6dae38820 100644 --- a/src/main/java/emu/grasscutter/game/player/Player.java +++ b/src/main/java/emu/grasscutter/game/player/Player.java @@ -350,12 +350,6 @@ public class Player implements PlayerHook, FieldFetch { world.changeTime(gameTime); } - // Trigger the script event for game time update. - var questManager = this.getQuestManager(); - questManager.queueEvent(QuestCond.QUEST_COND_IS_DAYTIME); - questManager.queueEvent(QuestCond.QUEST_COND_TIME_VAR_GT_EQ); - questManager.queueEvent(QuestCond.QUEST_COND_TIME_VAR_PASS_DAY); - this.save(); } diff --git a/src/main/java/emu/grasscutter/game/world/World.java b/src/main/java/emu/grasscutter/game/world/World.java index 59a87e576..2040d9788 100644 --- a/src/main/java/emu/grasscutter/game/world/World.java +++ b/src/main/java/emu/grasscutter/game/world/World.java @@ -522,10 +522,6 @@ public class World implements Iterable { */ public void changeTime(long gameTime) { this.currentWorldTime = gameTime; - - // Trigger script events. - this.players.forEach( - player -> player.getQuestManager().queueEvent(QuestContent.QUEST_CONTENT_GAME_TIME_TICK)); } /**