[C++]Levelup 80 to 255 Latest TrinityCore

JadaDev

reaper-wow.com
Legend
JadaDev Rep
5
0
0
Rep
5
JadaDev Vouches
0
0
0
Vouches
0
Posts
514
Likes
530
Bits
3 YEARS
3 YEARS OF SERVICE
LEVEL 11 50 XP

How to Extend Level Cap from 80 to 255 in TrinityCore

This guide will help you increase the level cap for characters from 80 to 255 in World of Warcraft TrinityCore. We'll make the necessary code changes in the player.cpp file located at src\server\game\Entities\player\player.cpp.


Steps to Modify TrinityCore

  1. Open your code editor and find the player.cpp file at src\server\game\Entities\player\player.cpp.
  2. Locate the following code block in player.cpp:
C++:
uint8 exp_max_lvl = GetMaxLevelForExpansion(GetSession()->Expansion());
uint8 conf_max_lvl = sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL);
if (exp_max_lvl == DEFAULT_MAX_LEVEL || exp_max_lvl >= conf_max_lvl)
SetUInt32Value(PLAYER_FIELD_MAX_LEVEL, conf_max_lvl);
else
SetUInt32Value(PLAYER_FIELD_MAX_LEVEL, exp_max_lvl);
SetUInt32Value(PLAYER_NEXT_LEVEL_XP, sObjectMgr->GetXPForLevel(GetLevel()));


  1. Comment out the entire code block by adding // at the start of each line:

C++:
//uint8 exp_max_lvl = GetMaxLevelForExpansion(GetSession()->Expansion());
//uint8 conf_max_lvl = sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL);
//if (exp_max_lvl == DEFAULT_MAX_LEVEL || exp_max_lvl >= conf_max_lvl)
// SetUInt32Value(PLAYER_FIELD_MAX_LEVEL, conf_max_lvl);
//else
// SetUInt32Value(PLAYER_FIELD_MAX_LEVEL, exp_max_lvl);
//SetUInt32Value(PLAYER_NEXT_LEVEL_XP, sObjectMgr->GetXPForLevel(GetLevel()));


  1. Add the following code block right after the commented-out section:

C++:
uint8 conf_max_lvl = sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL);
SetUInt32Value(PLAYER_FIELD_MAX_LEVEL, conf_max_lvl);
SetUInt32Value(PLAYER_NEXT_LEVEL_XP, sObjectMgr->GetXPForLevel(GetLevel()));


This code sets the maximum player level based on your server configuration and updates the experience required for the next level.


  1. Save the player.cpp file.
  2. Open the DBCenums.h file located at src\server\shared\DataStores\DBCenums.h.
  3. Find this section in DBCenums.h:

C++:
#pragma pack(pop)
enum LevelLimit : uint8
{
// Client expected level limitation, like as used in DBC item max levels for "until max player level"
// use as default max player level, must be fit max level for used client
// also see MAX_LEVEL and STRONG_MAX_LEVEL define
DEFAULT_MAX_LEVEL = 255,

// client supported max level for player/pets/etc. Avoid overflow or client stability affected.
// also see GT_MAX_LEVEL define
MAX_LEVEL = 255,

// Server side limitation. Base at used code requirements.
// also see MAX_LEVEL and GT_MAX_LEVEL define
STRONG_MAX_LEVEL = 255,
};


  1. Ensure that the values for DEFAULT_MAX_LEVEL, MAX_LEVEL, and STRONG_MAX_LEVEL are all set to 255, as shown above.
  2. Save the DBCenums.h file.
  3. Recompile TrinityCore to apply the changes.

With these changes, characters on your modified TrinityCore server will be able to level up from 80 to 255, based on your server configuration.

Note: To fully implement this level cap change, you may also need to add the appropriate database changes. If you're using JadaDev SQL, you can use the "Level80-255" SQL or the ARAC (All Ranks All Classes) version of "Level 80 - 255" SQL to enable this extended level range in your server's database. Be sure to apply the necessary database changes to match the code modifications made in TrinityCore.
 
Liked By 2 members :

PrivateDonut

Account Closed
banned
Rep
3
0
0
Rep
3
Vouches
0
0
0
Vouches
0
Posts
533
Likes
448
Bits
3 YEARS
3 YEARS OF SERVICE
LEVEL 31 71 XP
Awesome share man, will for sure be helpful. :)
 

Rogue Rogue

Developer
Divine
Rogue Rep
2
0
0
Rep
2
Rogue Vouches
0
0
0
Vouches
0
Posts
609
Likes
131
Bits
3 YEARS
3 YEARS OF SERVICE
LEVEL 11 215 XP
Nice share, thanks buddy :D !!
 
Liked By 1 member :

dev2kingdom

Member
dev2kingdom Rep
0
0
0
Rep
0
dev2kingdom Vouches
0
0
0
Vouches
0
Posts
17
Likes
5
Bits
2 YEARS
2 YEARS OF SERVICE
LEVEL 5 45 XP
Anyone have AzerothCore version maybe ? :)
 
Liked By 1 member :

3,571

1,285

9,620

433

Top