[lua, C++] A Moral Manifest? IF Conversion + Tests - #11153
Conversation
9a34aad to
7d9584d
Compare
zach2good
left a comment
There was a problem hiding this comment.
If you wanted to do a really good job here: You could add a test for this, so that when this gets rewritten there's something to test it against
Ok I will do that, thank you. Will throw it into draft for now. |
7d9584d to
e261f7b
Compare
|
Update: I received captures and have converted the quest to IF instead. PR title and body updated. |
| -- TODO: Convert this to interaction. The way this is coded, it WILL block you out from a guildmaster. | ||
| entity.onEventFinish = function(player, csid, option, npc) | ||
| -- The guild master handler fires a Records of Eminence hook for any event it is given. | ||
| -- A Moral Manifest's events reach this fallback too. |
There was a problem hiding this comment.
then the solution would be to add an event check to the guildmaster global
| quest:cleanup(player) | ||
| end | ||
|
|
||
| local function pononoOnTrigger(player, npc) |
There was a problem hiding this comment.
why are you placing the logic of an npc in a function that is only called in one place?
| local function cancelQuest(player) | ||
| player:delQuest(quest.areaId, quest.questId) | ||
| quest:cleanup(player) | ||
| end |
There was a problem hiding this comment.
use this logic directly
|
Addressed all comments and added some tests, as well as C++ changes to accommodate the tests. |
2705428 to
c191097
Compare
c191097 to
08ea907
Compare
I affirm:
What does this pull request do?
This PR converts the quest "A Moral Manifest?" into IF and in the process fixes many bugs. This PR also introduces a test file for the quest and for the guildmaster lua. It also makes some C++ changes to accomodate these tests. Namely, the test framework can now trade gil and in tthe appropriate amounts. I ran what I did by a few people as a smell test.
Steps to test these changes
Do the quest. See the old bugs are gone and you can complete it.
Captures
Thank you to Valentine and Skold for giving me me the captures which allowed this to become a conversion and not simply a bug fix.
A Moral Manifest.zip
A Moral Manifest - Pt 2..zip
Quest_A_Moral_Manifest (1).zip