Skip to content

Commit

Permalink
Send QUEST_COND_NONE on every login (#2386)
Browse files Browse the repository at this point in the history
For players that enabled questing late
  • Loading branch information
scooterboo committed Sep 25, 2023
1 parent 5faf39d commit b6e7d69
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 13 deletions.
8 changes: 0 additions & 8 deletions src/main/java/emu/grasscutter/game/player/Player.java
Original file line number Diff line number Diff line change
Expand Up @@ -1378,14 +1378,6 @@ public void loadFromDatabase() {
this.getPlayerProgress().setPlayer(this); // Add reference to the player.
}

/**
* Invoked when the player selects their avatar.
*/
public void onPlayerBorn() {
Grasscutter.getThreadPool().submit(
this.getQuestManager()::onPlayerBorn);
}

public void onLogin() {
// Quest - Commented out because a problem is caused if you log out while this quest is active
/*
Expand Down
5 changes: 1 addition & 4 deletions src/main/java/emu/grasscutter/game/quest/QuestManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -221,14 +221,11 @@ public void sendGivingRecords() {
this.player.sendPacket(new PacketGivingRecordNotify(this.getGivingRecords()));
}

public void onPlayerBorn() {
public void onLogin() {
if (this.isQuestingEnabled()) {
this.enableQuests();
this.sendGivingRecords();
}
}

public void onLogin() {

List<GameMainQuest> activeQuests = getActiveMainQuests();
List<GameQuest> activeSubs = new ArrayList<>(activeQuests.size());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ public void handle(GameSession session, byte[] header, byte[] payload) throws Ex

// Login done
session.getPlayer().onLogin();
session.getPlayer().onPlayerBorn();

// Born resp packet
session.send(new BasePacket(PacketOpcodes.SetPlayerBornDataRsp));
Expand Down

0 comments on commit b6e7d69

Please sign in to comment.