Jump to content
  • GM command .level up going above and beyond


    Chucksta
    • Status: Awaiting Feedback
      Main Category: Core / Mangos Daemon
      Sub-Category: Game Master
      Version: 21.0 Milestone: 21 Priority: Low
      Implemented Version: 0.20

    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


    User Feedback

    Recommended Comments

    That should be normal. After all, we only have stats data for 1-60 in Zero, and 1-70 in TBC, etc etc. I played as a lv255 paladin for a while messing with friends (Horde) while killing Cairne. He still kicked my bottom because I had level 60 stats, just a bunch of extra talents!

    The normal cap is 60 for players. GM's can go above and beyond, up to 255 which is the max for an unsigned char. Seems fine to me. Also, it does not crash anything.

    Link to comment
    Share on other sites

    It has been this way since before the split. In fact I remember doing this in 2008. How is setting a number to 255 going to cause a stability issue? The only thing I can see even remotely possible is that one aura from a talent tree may adversely affect an aura from another tree, but during the beta there was a week or two where they did just that: Grant everybody all talents.

    Also, this is something to be used by GM's. I had spoken with Luda or Salja about keeping the level data from WoTLK in Zero and One so the GM would be mega-buff when going above 60 and was told that it was a simple matter of bringing the level data from WoTLK into the databases for One and Zero. Never was it mentioned that this would be an issue. If it is an issue, you can tell it to my pally who has been 255 for eons and never brought down a server.

    If this is such an issue, I vote we put a setting in the configuration file that defaults to 60 but allows a GM to raise his/her level up to whatever the value is set to, or a max of 255. This way the server admin is in charge of how buff the GM's can be.

    Link to comment
    Share on other sites

    [quote=antz]I believe this command should use the value from
    MaxPlayerLevel in mangos.conf

    But should gm's be allowed to skip past this check ?[/quote]

    Maybe have an additional setting in the conf to allow GMs to bypass max level check?

    If they try adding levels above the max level and the check says they have to abide by it then only level to the max allowed. If on the other hand they can bypass it then allow it to level up to 255? (Which i think is a client limit?)

    Link to comment
    Share on other sites

    The client level is "unsigned char", which ranges from 0 to 255, so yes 255 is the max. I would like for GM's to be able to do what they want. I would prefer the cap to stop normal players at the specified level, but if a GM does ".levelup ", whether on himself or a player, the server should abide by that decision. Along with that, it would require level stats up to 100 to be in the database even for Zero. I believe the cap in Draenor is 100, right? Either way we'd need to put in the data for all of the KNOWN levels.

    Link to comment
    Share on other sites



    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 account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use