It'll allow you to set a level up 250 max
SEE BOTTOM (oo err) OF THIS POST (FIX) IF YOU CAN'T BE BOTHERED TO READ THIS
Not sure if this is an issue, but when I zapped max with that command and put his toon to level 101 he promptly took his slipper to my bottom :o (core crash potential!!!!)
Anyway, once the deep heat had done its job, and I could sit down again, I decided to peruse the database, then the code to see how this command is processed.
From its database entry in mangos.commands, with a value of "levelup" in the name field, I then searched for this value in the MaNGOS Zero code.
That search gave me:
file: levelup.cpp
function: HandleLevelUp( ... )
Within the body of that function it does have a boundary check on the resulting value of the level up command; the minimum value check works fine:
[PHP]int32 newlevel = oldlevel + addlevel;
if (newlevel { newlevel = 1; }[/PHP]
But the maximum value check does not, unless it is supposed to allow for 255:
[PHP] if (newlevel > STRONG_MAX_LEVEL) // hardcoded maximum level
{ newlevel = STRONG_MAX_LEVEL; }[/PHP]
Now, the contant STRONG_MAX_LEVEL has a value of 255
Searching for that constant, I found where it is defined (DBCEnums.h), and below it, is another contant: DEFAULT_MAX_LEVEL, which is set to 60
In my copy of the MaNGOS Zero server source, I replaced the constant STRONG_MAX_LEVEL with the constant DEFAULT_MAX_LEVEL. Rebuilt it, and successfully tested it in game.
I could no longer set a level greater than WoW Classic's max of 60.
[SIZE=4]FIX:[/SIZE]
change the constant from STRONG_MAX_LEVEL to DEFAULT_MAX_LEVEL (2 of these), in the file levelup.cpp, function bool ChatHandler::HandleLevelUpCommand(char* args)
OR
Set the value assigned to the STRONG_MAX_LEVEL to 60, in the DBCEnums.h file
OR
none of the above, because that's how it is supposed to work :P
Recommended Comments
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now