Skip to content

Events: NWNX_ON_SET_EXPERIENCE update to allow SetEventResult#1789

Merged
Daztek merged 1 commit intonwnxee:masterfrom
hendrikgit:xp-event-update
Oct 22, 2024
Merged

Events: NWNX_ON_SET_EXPERIENCE update to allow SetEventResult#1789
Daztek merged 1 commit intonwnxee:masterfrom
hendrikgit:xp-event-update

Conversation

@hendrikgit
Copy link
Contributor

Added the option to set event result. Now the event can be (better) used to limit xp.

@hendrikgit hendrikgit changed the title Events: NWNX_ON_SET_EXPERIENCE update: SetEventResult, real xp in AFTER Events: NWNX_ON_SET_EXPERIENCE update to allow SetEventResult Oct 10, 2024
Comment on lines +221 to +224
else if (const auto newXP = String::FromString<uint32_t>(result))
{
s_SetExperienceHook->CallOriginal<void>(thisPtr, newXP.value(), bDoLevel);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if you skip the event without setting a result?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only checking from the phone now so I hope I'm not overlooking anything but my intention was that then nothing happens. No CallOriginal. Skipping the event (without setting a result) means no xp change.

@Daztek Daztek merged commit d54327e into nwnxee:master Oct 22, 2024
@hendrikgit hendrikgit deleted the xp-event-update branch May 16, 2025 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants