Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-22-2009, 01:12 AM
Davood
Discordant
 
Join Date: Jan 2005
Posts: 488
Default Adding "Spent" aa.. here is some code

Anyways.. I tried to write some code to "add" to the "spent" aa pool using the quest manager..and...I tried this, but it doesn't seem to work..

perl_client.cpp

add this in somewhere:

i put it at line 3621

Code:
XS(XS_Client_AddSpentAAPoints);
XS(XS_Client_AddSpentAAPoints) {
	dXSARGS;
	if(items != 2)
		Perl_croak(aTHX_ "Usage: Client::AddSpentAAPoints(THIS, points)");
	{
		Client * THIS;
		uint32 points = SvUV(ST(1));
		uint32 spent_points = THIS->GetPP().aapoints_spent;
		
		if (sv_derived_from(ST(0), "Client")) {
			IV tmp = SvIV((SV*)SvRV(ST(0)));
			THIS = INT2PTR(Client *,tmp);
		}
		else
			Perl_croak(aTHX_ "THIS is not of type Client");
		if(THIS == NULL)
			Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");

		THIS->GetPP().aapoints_spent = spent_points + points;
		THIS->SendAAStats();
	}
	XSRETURN_EMPTY;
}
then i tried calling it using

$client->AddSpentAAPoints(2);

in a quest script, and it doesn't seem to work., the quest manager seems to fail at that point.

any ideas?
__________________
----------
Demon Overlord of Alakamin
skype @ davoodinator
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 11:31 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3