Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send QUEST_COND_NONE on every login #2386

Merged
merged 1 commit into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading