logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
2 spellslot fixes in nwnx_funcs & save/restore spells sc

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows development
View previous topic :: View next topic  
Author Message
magaiti



Joined: 08 Aug 2014
Posts: 7

PostPosted: Tue Aug 12, 2014 20:50    Post subject: 2 spellslot fixes in nwnx_funcs & save/restore spells sc Reply with quote

I tried to use nwnx_funcs to save/restore spells, and have found that 2 functions were broken (i tried version 0.941):
- GetRemainingSpellSlots - always returns 0;
- SetMemorizedSpellSlot - crashes server most of the time.

So I have fixed those functions and made my own plugin (basically a trimmed down version of nwnx_funcs) to use as a "patch" of sorts.

Here are the dll, sources and nwscript for saving/restoring spells.
https://drive.google.com/file/d/0B8mH67FquBndejExdXdnSy1WQU0/edit?usp=sharing

I understand that probably everyone interested in NWNX plugins for Windows has already started their own projects, but still posting here just in case this will be helpful for someone.

All fixes are in NssSpells.cpp, take code from there if you want to insert it into your own build of nwnx_funcs.
Back to top
View user's profile Send private message
magaiti



Joined: 08 Aug 2014
Posts: 7

PostPosted: Tue Aug 19, 2014 22:10    Post subject: Reply with quote

I have uploaded an updated version.
Now correctly gets/sets "domain spell" flag.
Without this flag, cleric domain spells are cleared on client enter.

- GetMemorizedSpellSlot has been added to nwnx_mgfuncs plugin

https://drive.google.com/file/d/0B8mH67FquBndTHlKUUc0N3BNUkk/edit?usp=sharing
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows development All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group