Check quest status instead of settings when spawning hellfire quest items
https://github.com/diasurgical/DevilutionX/blob/0c381798087dee4ce1d989e1569bc8d66068f2f6/Source/items.cpp#L2473
During the Save & Raid event we noticed that the brown suit didn't spawn, this seems to be because the person that entered the level didn't have the cow quest enabled unlike the other players.
This is also an issue for the Theo quest: https://github.com/diasurgical/DevilutionX/blob/0c381798087dee4ce1d989e1569bc8d66068f2f6/Source/monster.cpp#L867
I kinda thought this was a feature. In Single Player, you can get the Rune Bomb from Lester and complete his quest, then switch to cow quest and complete both in the same game.
But now that you mention it, we don't actually set quest._qactive = QUEST_NOTAVAIL for any Hellfire quests during InitQuests(), and neither does vanilla Hellfire. That possibility of activating both quests in the same game must be vanilla behavior. So there's not really a clearly reliable way to handle this based on quest state.
This might require a brainstorming session to come up with a proper strategy.
After sleeping on it, I believe I came up with a strategy that could work.
- Modify
InitQuests()to disable inactive Hellfire quests based on settings. - Update
ResyncQuests()... a. IfQ_FARMERis active/done andQ_JERSEYis init, setQ_JERSEYto unavailable. b. IfQ_FARMERis init andQ_JERSEYis active/done, setQ_FARMERto unavailable. c. If bothQ_FARMERandQ_JERSEYare init, disable the inactive one based on the setting. - If both
Q_FARMERandQ_JERSEYare active/done, enableQ_JERSEY.
This will change things so that you can't do Q_FARMER and Q_JERSEY in the same Single Player game session. Also, when it comes to Q_GIRL, we can simply trust the quest state. This means all vanilla Hellfire saves will have Q_GIRL enabled when moving to DevilutionX, even if it wasn't enabled via command.txt. Such is life.
Also note that when I say "active/done", I am including the special quest states for those quests.
https://github.com/diasurgical/DevilutionX/blob/0c381798087dee4ce1d989e1569bc8d66068f2f6/Source/quests.h#L75-L78