nwnxee / unified

Binaries available under the Releases tab on Github
https://nwnxee.github.io/unified
GNU General Public License v3.0
129 stars 92 forks source link

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

Closed summonFox closed 1 year ago

summonFox commented 1 year ago

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.