mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-23 00:12:29 +00:00
Remove redundant script event calling when changing the time
This commit is contained in:
parent
56f09e87a1
commit
4de21d4a40
@ -350,12 +350,6 @@ public class Player implements PlayerHook, FieldFetch {
|
|||||||
world.changeTime(gameTime);
|
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();
|
this.save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -522,10 +522,6 @@ public class World implements Iterable<Player> {
|
|||||||
*/
|
*/
|
||||||
public void changeTime(long gameTime) {
|
public void changeTime(long gameTime) {
|
||||||
this.currentWorldTime = gameTime;
|
this.currentWorldTime = gameTime;
|
||||||
|
|
||||||
// Trigger script events.
|
|
||||||
this.players.forEach(
|
|
||||||
player -> player.getQuestManager().queueEvent(QuestContent.QUEST_CONTENT_GAME_TIME_TICK));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user