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

Creature: DoItemCastSpell () allow setting casting item and impact script #1637

Merged
merged 2 commits into from
Apr 14, 2023
Merged

Creature: DoItemCastSpell () allow setting casting item and impact script #1637

merged 2 commits into from
Apr 14, 2023

Conversation

summonFox
Copy link
Contributor

Allows oItem retrieved by GetSpellCastItem() to be set in DoItemCastSpell(), as well as overriding the impact script (or even removing the impact script if set to "****").

When combined with NWNX_ON_BROADCAST_SAFE_PROJECTILE_BEFORE it allows us to effectively create a ActionCastCustomFakeSpell() function that casts a ActionCastFakeSpell* or ActionCastSpell*, which we then replace with DoItemCastSpell() during the broadcast event to use a custom projectile or impact script instead.

Comment on lines +2853 to +2854
auto oidItem = args.extract<ObjectID>();
auto impactScript = args.extract<std::string>();
Copy link
Member

Choose a reason for hiding this comment

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

Like your other PR, this is also a breaking ABI change, would be nice to mention it in the changelog.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, my bad! I didn't realize that would be ABI breaking. Can I blame inexperience? I'll note it in the changelog, same with the other PR.

@Daztek Daztek merged commit c02278b into nwnxee:master Apr 14, 2023
@summonFox summonFox deleted the Creature--more-param-overrides-for-DoItemCastSpell branch April 16, 2023 08:38
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