Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Server Code Submissions

Reply
 
Thread Tools Display Modes
  #1  
Old 09-25-2013, 11:39 PM
NatedogEZ's Avatar
NatedogEZ
Developer
 
Join Date: Dec 2012
Posts: 515
Default Perl Doors Fix -- GetIncline and SetIncline

Incline is allowed to be negative and the Perl only allows uint32.

There is a minor typo fix in this as well... the "Usage example" for GetSize ..said "GetIncline" so just changed it.



Code:
@@ -332,7 +332,7 @@
 		Perl_croak(aTHX_ "Usage: Doors::GetIncline(THIS)");
 	{
 		Doors *		THIS;
-		uint32		RETVAL;
+		int32		    RETVAL;
 		dXSTARG;
 
 		if (sv_derived_from(ST(0), "Doors")) {
@@ -345,7 +345,7 @@
 			Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
 
 		RETVAL = THIS->GetIncline();
-		XSprePUSH; PUSHu((UV)RETVAL);
+		XSprePUSH; PUSHi((IV)RETVAL);
 	}
 	XSRETURN(1);
 }
@@ -355,7 +355,7 @@
 {
 	dXSARGS;
 	if (items != 1)
-		Perl_croak(aTHX_ "Usage: Doors::GetIncline(THIS)");
+		Perl_croak(aTHX_ "Usage: Doors::GetSize(THIS)");
 	{
 		Doors *		THIS;
 		uint32		RETVAL;
@@ -482,7 +482,7 @@
 		Perl_croak(aTHX_ "Usage: Doors::SetIncline(THIS, type)");
 	{
 		Doors *		THIS;
-		uint32		type = (uint32)SvUV(ST(1));
+		int32		type = (int32)SvIV(ST(1));
 
 		if (sv_derived_from(ST(0), "Doors")) {
 			IV tmp = SvIV((SV*)SvRV(ST(0)));
Reply With Quote
Reply

Thread Tools
Display Modes

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 12:24 PM.


 

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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3