arianne / stendhal

Stendhal is a fun friendly and free multiplayer online adventure game with an old school feel.
https://arianne-project.org
GNU General Public License v2.0
593 stars 200 forks source link

Completed Seven Cherubs Showing Up Under Open Quests #695

Closed AntumDeluge closed 6 months ago

AntumDeluge commented 6 months ago

🐞 Describe the bug

This started occurring today, not sure exactly at what time, I just noticed it a moment ago. Seven Cherubs, which my character Seriph completed a long time ago, is showing up under open quests.

Screenshot_20240329_003106_Stendhal

🔥 How to reproduce

Not sure.

Edit: It is the same for all my characters that had completed the quest previously. There was a change to the quest system to allow showing completed seasonal quests indefinitely. I don't remember if it was added for 1.45 or 1.46. If the latter then it may be related.

AntumDeluge commented 6 months ago

After completing quest on local server the quest is moved to completed. Not sure what is happening on main server.

AntumDeluge commented 6 months ago

Seven Cherubs quest code:

    @Override
    public boolean isCompleted(final Player player) {
        if (!player.hasQuest(QUEST_SLOT)) {
            return false;
        }
        final String npcDoneText = player.getQuest(QUEST_SLOT);
        final String[] done = npcDoneText.split(";");
        final int left = 7 - done.length;
        return left < 0;
    }

Quest status on local server immediately after completing:

seven_cherubs (deluge): ;Cherubiel;Gabriel;Ophaniel;Raphael;Uriel;Zophiel;Azazel

Quest status on stendhalgame.org test server:

seven_cherubs (deluge): Cherubiel;Raphael;Ophaniel;Azazel;Uriel;Zophiel;Gabriel

Quest status on local server after logout/login:

seven_cherubs (deluge): Cherubiel;Gabriel;Ophaniel;Raphael;Uriel;Zophiel;Azazel

It appears that changes made to update converter (potentially dd0d9f1747895ef33e7624a932d8a0b23a5b147c or 221e059542e38c7dbacfc157d63e2046e27025b9) trims leading empty slots. Therefore the leading ";" is removed so SevenCherubs.isCompleted is returning false. No other quests have resulted showing issues, but it should probably be fixed in updated converter as it could potentially be a problem.