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 
 
Hey Terra: Void NextFunc?

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



Joined: 02 Sep 2007
Posts: 816

PostPosted: Wed Dec 31, 2014 2:22    Post subject: Hey Terra: Void NextFunc? Reply with quote

Is it possible to do


Code:

CreateHook( SummonFamiliarLoc, CNWSCreature__SummonFamiliar, (PVOID*) NULL, "SummonFam","SummonFam");



Reason I am trying to null the 'Next' argument, is because I have re-written the entire Summon Familiar and Companion code - to match
https://github.com/jd28/nwnx2-linux/blob/ta/plugins/levels/hooks/h_SummonAnimalCompanion.cpp


This is to allow summon companion / familiar to function at levels 41+
So - if we have a working replacement function, do we need to attach a Next function?
Or do we simply attach it, and don't call the Next function from the hook?
I am assuming it still only gets called if the Next function is invoked from the hook - right?
Back to top
View user's profile Send private message
Terra_777



Joined: 27 Jun 2008
Posts: 216
Location: Sweden

PostPosted: Wed Dec 31, 2014 3:17    Post subject: Reply with quote

Just put a dummy in the hook function since it'll fail if its null. Then just never run next or do anything with it.

Code:

DWORD nextproc;

CreateHook( SummonFamiliarLoc, CNWSCreature__SummonFamiliar, (PVOID*)&nextproc, "SummonFam","SummonFam");

_________________
I dun have any signature, I'm happy anyway.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
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