Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ https://github.com/nwnxee/unified/compare/build8193.37.13...HEAD
- MaxLevel: Fixed returning an invalid number of known spells in some cases.
- Fixed `NWNX_TWEAKS_RESIST_ENERGY_STACKS_WITH_EPIC_ENERGY_RESISTANCE` not working correctly when the character has more than one resist energy feat.
- Fixed `NWNX_TWEAKS_SNEAK_ATTACK_IGNORE_CRIT_IMMUNITY` only considering 3 classes for determining the level difference of attacker and defender.
- SkillRanks: Fixed `GetAreaModifier()` dereferencing an empty `std::optional` (undefined behavior) when the queried area had no modifier set for the skill. Now returns `0` in that case.

## 8193.37.13
https://github.com/nwnxee/unified/compare/build8193.36.10...build8193.37.13
Expand Down
2 changes: 1 addition & 1 deletion Plugins/SkillRanks/SkillRanks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,7 @@ ArgumentStack SkillRanks::GetAreaModifier(ArgumentStack&& args)
ASSERT_OR_THROW(skillId >= Constants::Skill::MIN);
ASSERT_OR_THROW(skillId < Globals::Rules()->m_nNumSkills);

int32_t retVal = *pArea->nwnxGet<int>(areaModPOSKey + std::to_string(skillId));
int32_t retVal = pArea->nwnxGet<int>(areaModPOSKey + std::to_string(skillId)).value_or(0);

return ScriptAPI::Arguments(retVal);
}
Expand Down
Loading