Comments (6)
Thanks Mord! Do you have something handy that I can test with?
from unified.
#include "nwnx_creature"
void ChangeSpell(object oPC, int nSpellId, int bIsReady=TRUE)
{
int nIndex = 0;
SendMessageToPC(GetFirstPC(), "Index:" + IntToString(nIndex) + "Ready" + IntToString(bIsReady));
struct NWNX_Creature_SpecialAbility spell = NWNX_Creature_GetSpecialAbility(oPC, nIndex);
SendMessageToPC(GetFirstPC(), "Id:" + IntToString(spell.id) + "Ready" + IntToString(spell.ready) + "Level" + IntToString(spell.level));
spell.ready = bIsReady;
spell.id = SPELL_MELFS_ACID_ARROW;
spell.level=3;
NWNX_Creature_SetSpecialAbility(oPC, nIndex, spell);
spell = NWNX_Creature_GetSpecialAbility(oPC, nIndex);
SendMessageToPC(GetFirstPC(), "Id:" + IntToString(spell.id) + "Ready" + IntToString(spell.ready) + "Level" + IntToString(spell.level));
}
void main()
{
struct NWNX_Creature_SpecialAbility spell;
spell.id = SPELL_MAGE_ARMOR;
spell.level = 2;
spell.ready = TRUE;
NWNX_Creature_AddSpecialAbility(GetFirstPC(), spell);
ChangeSpell(GetFirstPC(), SPELL_MAGE_ARMOR);
}
Here you are, returns mage armor before and after the the special ability should be changed and can confirm it didn't change through the gui.
Should work from any event.
from unified.
I can't repro this, everything seems to be working as intended.
from unified.
Likewise. Closing.
from unified.
from unified.
from unified.
Related Issues (20)
- Segmentation fault related to AI / Henchman
- NWNXLib::API::Constants::SavingThrowType is missing a a value for "Paralysis" (=20) HOT 3
- NWNX_Events: ON_COMBAT_EXIT does not hook (Must sub to ON_COMBAT_ENTER) HOT 1
- Event on encumbered
- Event for excessive pathfinding instructions
- NWNX_Creature_SetSavingThrowModifier feature request
- Feature request: DM Chooser and Creator windows/data added to nwnx_events
- DAMAGE_TYPE_BASE_WEAPON doesn't propogate if added in ResolveDeathAttackHook HOT 2
- Add 'NWNX_Player_SetBicFileName' HOT 3
- nwnx func quastion HOT 1
- NWNX_Weapon hooks CNWSCreatureStats::GetWeaponFinesse and replaces it, so it ignores baseitem.2da values.
- 'development' folder not working with newest NWNX files? HOT 2
- FEATURE REQUEST: Text Label for NWNX_PLAYER_TIMING_BAR_CUSTOM()
- Core: _ZN7NWNXLib8Platform13GetStackTraceB5cxx11Eh
- NWNX 8193.36-9 (b12b114856) has crashed. Fatal error: Segmentation fault (11). HOT 15
- nwnx_signal_handler should print the nwscript context too
- NWNX_ON_DETECT_ENTER_* Events Get Signaled on Both Enter and Exit
- NWNX_Creature_GetSpecialAbilityCount doesn't count removed abilities (with id = -1) HOT 2
- Feature Request: Add a way to return Number of Inventory Pages a Store/Creature/Container Has
- ActionJumpToLocation Crashes server with PRC Ninja Class
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unified.