fix: set Player::ChangeExp to use internal func#255
fix: set Player::ChangeExp to use internal func#255shad0wshayd3 wants to merge 3 commits intollde:masterfrom
Player::ChangeExp to use internal func#255Conversation
|
Please update the PR description with some context - Was the replaced code incorrect or does |
|
@shadeMe context is on Discord |
Nevertheless, it should be in the PR description foremost (particularly given that Discord isn't searchable from public internet). |
|
@shadeMe added context |
|
@shad0wshayd3 restore .gitmodules please |
|
@shad0wshayd3 IncrementPlayerSKilUse is a 3 arguments function that directly call ModExperience from the PlayerCharacter vtbl. What baffle me at the beginning is that howManyTimes cause the invocation of ModExperience if greater then 0 and the manual ChangeExperience if lesser then 0. TriggerPlayerSkillUse docs have:
Ok this is officially a mess... the names of parameters are all over the place, howManyTimes become baseDelta, whichUse scaleIndex. WTF? |
The original code doesn't properly trigger the game to notify the player about skill increases with corner messages or skill mastery menu popups, and likewise doesn't trigger the OnSkillUse event handler. The UseSkill function that replaces the logic for increasing skill xp does consistently produce these messages, and also applies the same modifications to the passed skill xp amount (with the fSkillUse game settings).
The underlying logic used in the original code does at least seem to function correctly for the purpose of modifying skill xp and setting skill values accordingly, so it's been retained for the negative skill xp code, since it shouldn't 't trigger any of the normal skill increase events anyway.