Skip to content
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

Events: NWNX_ON_SET_EXPERIENCE update to allow SetEventResult #1789

Merged
merged 1 commit into from
Oct 22, 2024

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
5 checks passed
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