aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Handlers/CharacterHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Handlers/CharacterHandler.cpp')
-rw-r--r--src/server/game/Handlers/CharacterHandler.cpp50
1 files changed, 24 insertions, 26 deletions
diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp
index 15b408cd87d..52af8e1d6cc 100644
--- a/src/server/game/Handlers/CharacterHandler.cpp
+++ b/src/server/game/Handlers/CharacterHandler.cpp
@@ -380,19 +380,17 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket& recvData)
return;
}
- if (createInfo->Class == CLASS_DEATH_KNIGHT && !HasPermission(rbac::RBAC_PERM_SKIP_CHECK_CHARACTER_CREATION_HEROIC_CHARACTER))
+ if (createInfo->Class == CLASS_DEATH_KNIGHT && !HasPermission(rbac::RBAC_PERM_SKIP_CHECK_CHARACTER_CREATION_DEATH_KNIGHT))
{
- // speedup check for heroic class disabled case
- uint32 heroic_free_slots = sWorld->getIntConfig(CONFIG_HEROIC_CHARACTERS_PER_REALM);
- if (heroic_free_slots == 0)
+ // speedup check for death knight class disabled case
+ if (sWorld->getIntConfig(CONFIG_DEATH_KNIGHTS_PER_REALM) == 0)
{
SendCharCreate(CHAR_CREATE_UNIQUE_CLASS_LIMIT);
return;
}
- // speedup check for heroic class disabled case
- uint32 req_level_for_heroic = sWorld->getIntConfig(CONFIG_CHARACTER_CREATING_MIN_LEVEL_FOR_HEROIC_CHARACTER);
- if (req_level_for_heroic > sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
+ // speedup check for death knight class disabled case
+ if (sWorld->getIntConfig(CONFIG_CHARACTER_CREATING_MIN_LEVEL_FOR_DEATH_KNIGHT) > sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
{
SendCharCreate(CHAR_CREATE_LEVEL_REQUIREMENT);
return;
@@ -454,40 +452,40 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket& recvData)
std::function<void(PreparedQueryResult)> finalizeCharacterCreation = [this, createInfo](PreparedQueryResult result)
{
bool haveSameRace = false;
- uint32 heroicReqLevel = sWorld->getIntConfig(CONFIG_CHARACTER_CREATING_MIN_LEVEL_FOR_HEROIC_CHARACTER);
- bool hasHeroicReqLevel = (heroicReqLevel == 0);
+ uint32 deathKnightReqLevel = sWorld->getIntConfig(CONFIG_CHARACTER_CREATING_MIN_LEVEL_FOR_DEATH_KNIGHT);
+ bool hasDeathKnightReqLevel = (deathKnightReqLevel == 0);
bool allowTwoSideAccounts = !sWorld->IsPvPRealm() || HasPermission(rbac::RBAC_PERM_TWO_SIDE_CHARACTER_CREATION);
uint32 skipCinematics = sWorld->getIntConfig(CONFIG_SKIP_CINEMATICS);
- bool checkHeroicReqs = createInfo->Class == CLASS_DEATH_KNIGHT && !HasPermission(rbac::RBAC_PERM_SKIP_CHECK_CHARACTER_CREATION_HEROIC_CHARACTER);
+ bool checkDeathKnightReqs = createInfo->Class == CLASS_DEATH_KNIGHT && !HasPermission(rbac::RBAC_PERM_SKIP_CHECK_CHARACTER_CREATION_DEATH_KNIGHT);
if (result)
{
uint32 team = Player::TeamForRace(createInfo->Race);
- uint32 freeHeroicSlots = sWorld->getIntConfig(CONFIG_HEROIC_CHARACTERS_PER_REALM);
+ uint32 freeDeathKnightSlots = sWorld->getIntConfig(CONFIG_DEATH_KNIGHTS_PER_REALM);
Field* field = result->Fetch();
uint8 accRace = field[1].GetUInt8();
- if (checkHeroicReqs)
+ if (checkDeathKnightReqs)
{
uint8 accClass = field[2].GetUInt8();
if (accClass == CLASS_DEATH_KNIGHT)
{
- if (freeHeroicSlots > 0)
- --freeHeroicSlots;
+ if (freeDeathKnightSlots > 0)
+ --freeDeathKnightSlots;
- if (freeHeroicSlots == 0)
+ if (freeDeathKnightSlots == 0)
{
SendCharCreate(CHAR_CREATE_UNIQUE_CLASS_LIMIT);
return;
}
}
- if (!hasHeroicReqLevel)
+ if (!hasDeathKnightReqLevel)
{
uint8 accLevel = field[0].GetUInt8();
- if (accLevel >= heroicReqLevel)
- hasHeroicReqLevel = true;
+ if (accLevel >= deathKnightReqLevel)
+ hasDeathKnightReqLevel = true;
}
}
@@ -519,32 +517,32 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket& recvData)
if (!haveSameRace)
haveSameRace = createInfo->Race == accRace;
- if (checkHeroicReqs)
+ if (checkDeathKnightReqs)
{
uint8 acc_class = field[2].GetUInt8();
if (acc_class == CLASS_DEATH_KNIGHT)
{
- if (freeHeroicSlots > 0)
- --freeHeroicSlots;
+ if (freeDeathKnightSlots > 0)
+ --freeDeathKnightSlots;
- if (freeHeroicSlots == 0)
+ if (freeDeathKnightSlots == 0)
{
SendCharCreate(CHAR_CREATE_UNIQUE_CLASS_LIMIT);
return;
}
}
- if (!hasHeroicReqLevel)
+ if (!hasDeathKnightReqLevel)
{
uint8 acc_level = field[0].GetUInt8();
- if (acc_level >= heroicReqLevel)
- hasHeroicReqLevel = true;
+ if (acc_level >= deathKnightReqLevel)
+ hasDeathKnightReqLevel = true;
}
}
}
}
- if (checkHeroicReqs && !hasHeroicReqLevel)
+ if (checkDeathKnightReqs && !hasDeathKnightReqLevel)
{
SendCharCreate(CHAR_CREATE_LEVEL_REQUIREMENT);
return;