Login
User Name:

Password:



Register

Forgot your password?
do_owhere recursive
Author: Khonsu
Submitted by: Khonsu
Changes list / Addchange
Author: Khonsu
Submitted by: Khonsu
6Dragons mp3 sound pack
Author: Vladaar
Submitted by: Vladaar
AFKMud 2.2.3
Author: AFKMud Team
Submitted by: Samson
SWFOTEFUSS 1.5
Author: Various
Submitted by: Samson
Users Online
AhrefsBot, Bing

Members: 0
Guests: 21
Stats
Files
Topics
Posts
Members
Newest Member
489
3,791
19,644
596
Elwood

Today's Birthdays
There are no member birthdays today.
» SmaugMuds » Codebases » SWFOTE FUSS » BUG in do_rpconvert
Forum Rules | Mark all | Recent Posts

BUG in do_rpconvert
< Newer Topic :: Older Topic > Likely an oversight:

Pages:<< prev 1 next >>
Post is unread #1 Oct 27, 2011 8:21 pm   
Go to the top of the page
Go to the bottom of the page

ayuri
Magician
GroupMembers
Posts239
JoinedJun 13, 2008

 
Poking about even more, I've noticed that do_rpconvert doesn't check to see if the class you've selected is already at max level.

Example:
I have 30 out of 30 combat levels, I spend rpp via rpconvert to increase combat by 1. It takes my rpp, but won't set me to combat level 31 as that is beyond the defined max level.

ayuri

Post is unread #2 Oct 27, 2011 10:59 pm   
Go to the top of the page
Go to the bottom of the page

Aurin
Magician
GroupMembers
Posts189
JoinedSep 5, 2010

 
in do_rpconvert, towards the top, but below the other sanity checks, add a check to see if you're already at max level. if you are, return out of function. :P This stops the process and saves the rpp...you can also send a message to the player about why it didn't work at the same time.

Post is unread #3 Oct 27, 2011 11:30 pm   Last edited Oct 28, 2011 12:43 am by ayuri
Go to the top of the page
Go to the bottom of the page

ayuri
Magician
GroupMembers
Posts239
JoinedJun 13, 2008

 
You got it, just haven't set up a fix yet as I found it at work while I was adding in more bonuses. Wanted to at least get it posted. :D
**EDIT my quick and dirty method to just dump it out is this:
In misc.c do_rpconvert
find:
 if( UPPER( argument[0] ) == UPPER( ability_name[iClass][0] )
                                        && !str_prefix( argument, ability_name[iClass] ) && str_prefix( argument, "force" ))


And change it to:
                        if( UPPER( argument[0] ) == UPPER( ability_name[iClass][0] )
                                        && !str_prefix( argument, ability_name[iClass] ) && str_prefix( argument, "force" )
                                        && (max_level(ch, iClass) < 30) )


Granted you could clean it up, but it gets the point across :biggrin:
ayuri

Pages:<< prev 1 next >>