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
Cord teaches One-handed Sword Level 2 too soon #191
Conversation
gothic-1-community-patch/scriptbase/_work/Data/Scripts/Content/Story/Missions/DIA_SLD_709_Cord.d Lines 115 to 123 in 746a440
changed to FUNC int SLD_709_Cord_TRAINAGAIN_Condition()
{
if (Npc_KnowsInfo (hero,SLD_709_Cord_TRAINOFFER))
&& (Npc_GetTalentSkill (hero,NPC_TALENT_1H) == 1)
{
return TRUE;
};
}; |
Note on implementation: Place a hook around the condition function. Before calling the original function, do if (Npc_GetTalentSkill(hero, NPC_TALENT_1H) != 1) {
return FALSE;
}; Of course, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got some minor remarks. Note: I only skimmed the code and I have not run the tests!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code wise it looks good I think. But I haven't tried it. Do all tests pass?
Yes, I wrote the test first, tested it, then wrote the fix and tested again. The fist test failed (obviously) and the second test passed. |
Describe the bug
Cord's dialog option to teach One-handed Sword Level 2 appears before the player learned Level 1.
Expected behavior
Cord's dialog option to teach One-handed Sword Level 2 now appears only after the player learned Level 1.
Additional context
opinionated
.gothic-1-community-patch/scriptbase/_work/Data/Scripts/Content/Story/Missions/DIA_TPL_1402_GorNaToth.d
Lines 441 to 449 in 746a440
gothic-1-community-patch/scriptbase/_work/Data/Scripts/Content/Story/Missions/DIA_GRD_210_Scatty.d
Lines 318 to 321 in 746a440