aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChazy Chaz <ChazyTheBest@hotmail.es>2017-03-17 19:00:33 +0100
committerShauren <shauren.trinity@gmail.com>2017-03-17 19:00:56 +0100
commitc31de25627df8267b893dc6bbc49232cf81a07fd (patch)
treec7078de03249cbe84ceae061a9c57436a9763e6a /src
parent3df4135173cb8b8393460403417dc242116290bf (diff)
Core/Players: Rename "heroic character" to "death knight"
Closes #19286
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Accounts/RBAC.h2
-rw-r--r--src/server/game/Entities/Player/Player.cpp4
-rw-r--r--src/server/game/Handlers/CharacterHandler.cpp50
-rw-r--r--src/server/game/World/World.cpp30
-rw-r--r--src/server/game/World/World.h8
-rw-r--r--src/server/scripts/Commands/cs_reset.cpp2
-rw-r--r--src/server/worldserver/worldserver.conf.dist24
7 files changed, 60 insertions, 60 deletions
diff --git a/src/server/game/Accounts/RBAC.h b/src/server/game/Accounts/RBAC.h
index efeb3d93465..425d0e96ccc 100644
--- a/src/server/game/Accounts/RBAC.h
+++ b/src/server/game/Accounts/RBAC.h
@@ -67,7 +67,7 @@ enum RBACPermissions
RBAC_PERM_SKIP_CHECK_CHARACTER_CREATION_CLASSMASK = 15,
RBAC_PERM_SKIP_CHECK_CHARACTER_CREATION_RACEMASK = 16,
RBAC_PERM_SKIP_CHECK_CHARACTER_CREATION_RESERVEDNAME = 17,
- RBAC_PERM_SKIP_CHECK_CHARACTER_CREATION_HEROIC_CHARACTER = 18,
+ RBAC_PERM_SKIP_CHECK_CHARACTER_CREATION_DEATH_KNIGHT = 18,
RBAC_PERM_SKIP_CHECK_CHAT_CHANNEL_REQ = 19,
RBAC_PERM_SKIP_CHECK_DISABLE_MAP = 20,
RBAC_PERM_SKIP_CHECK_MORE_TALENTS_THAN_ALLOWED = 21,
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 0f4e883fac9..0d52d34b149 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -490,7 +490,7 @@ bool Player::Create(ObjectGuid::LowType guidlow, WorldPackets::Character::Charac
// set starting level
uint32 start_level = sWorld->getIntConfig(CONFIG_START_PLAYER_LEVEL);
if (getClass() == CLASS_DEATH_KNIGHT)
- start_level = sWorld->getIntConfig(CONFIG_START_HEROIC_PLAYER_LEVEL);
+ start_level = sWorld->getIntConfig(CONFIG_START_DEATH_KNIGHT_PLAYER_LEVEL);
else if (getClass() == CLASS_DEMON_HUNTER)
start_level = sWorld->getIntConfig(CONFIG_START_DEMON_HUNTER_PLAYER_LEVEL);
@@ -3751,7 +3751,7 @@ void Player::DeleteFromDB(ObjectGuid playerguid, uint32 accountId, bool updateRe
else if (CharacterInfo const* characterInfo = sWorld->GetCharacterInfo(playerguid)) // To avoid a query, we select loaded data. If it doesn't exist, return.
{
// Define the required variables
- uint32 charDeleteMinLvl = sWorld->getIntConfig(characterInfo->Class != CLASS_DEATH_KNIGHT ? CONFIG_CHARDELETE_MIN_LEVEL : CONFIG_CHARDELETE_HEROIC_MIN_LEVEL);
+ uint32 charDeleteMinLvl = sWorld->getIntConfig(characterInfo->Class != CLASS_DEATH_KNIGHT ? CONFIG_CHARDELETE_MIN_LEVEL : CONFIG_CHARDELETE_DEATH_KNIGHT_MIN_LEVEL);
// if we want to finalize the character removal or the character does not meet the level requirement of either heroic or non-heroic settings,
// we set it to mode CHAR_DELETE_REMOVE
diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp
index 467424b1d83..0c3e81ccb1b 100644
--- a/src/server/game/Handlers/CharacterHandler.cpp
+++ b/src/server/game/Handlers/CharacterHandler.cpp
@@ -504,17 +504,17 @@ void WorldSession::HandleCharCreateOpcode(WorldPackets::Character::CreateCharact
return;
}
- if (charCreate.CreateInfo->Class == CLASS_DEATH_KNIGHT && !HasPermission(rbac::RBAC_PERM_SKIP_CHECK_CHARACTER_CREATION_HEROIC_CHARACTER))
+ if (charCreate.CreateInfo->Class == CLASS_DEATH_KNIGHT && !HasPermission(rbac::RBAC_PERM_SKIP_CHECK_CHARACTER_CREATION_DEATH_KNIGHT))
{
- // speedup check for heroic class disabled case
- if (!sWorld->getIntConfig(CONFIG_HEROIC_CHARACTERS_PER_REALM))
+ // speedup check for death knight class disabled case
+ if (!sWorld->getIntConfig(CONFIG_DEATH_KNIGHTS_PER_REALM))
{
SendCharCreate(CHAR_CREATE_UNIQUE_CLASS_LIMIT);
return;
}
- // speedup check for heroic class disabled case
- if (sWorld->getIntConfig(CONFIG_CHARACTER_CREATING_MIN_LEVEL_FOR_HEROIC_CHARACTER) > 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;
@@ -577,44 +577,44 @@ void WorldSession::HandleCharCreateOpcode(WorldPackets::Character::CreateCharact
std::function<void(PreparedQueryResult)> finalizeCharacterCreation = [this, createInfo](PreparedQueryResult result)
{
bool haveSameRace = false;
- uint32 heroicReqLevel = sWorld->getIntConfig(CONFIG_CHARACTER_CREATING_MIN_LEVEL_FOR_HEROIC_CHARACTER);
+ uint32 deathKnightReqLevel = sWorld->getIntConfig(CONFIG_CHARACTER_CREATING_MIN_LEVEL_FOR_DEATH_KNIGHT);
uint32 demonHunterReqLevel = sWorld->getIntConfig(CONFIG_CHARACTER_CREATING_MIN_LEVEL_FOR_DEMON_HUNTER);
- bool hasHeroicReqLevel = (heroicReqLevel == 0);
+ bool hasDeathKnightReqLevel = (deathKnightReqLevel == 0);
bool hasDemonHunterReqLevel = (demonHunterReqLevel == 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);
bool checkDemonHunterReqs = createInfo->Class == CLASS_DEMON_HUNTER && !HasPermission(rbac::RBAC_PERM_SKIP_CHECK_CHARACTER_CREATION_DEMON_HUNTER);
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);
uint32 freeDemonHunterSlots = sWorld->getIntConfig(CONFIG_DEMON_HUNTERS_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;
}
}
@@ -669,26 +669,26 @@ void WorldSession::HandleCharCreateOpcode(WorldPackets::Character::CreateCharact
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;
}
}
@@ -717,7 +717,7 @@ void WorldSession::HandleCharCreateOpcode(WorldPackets::Character::CreateCharact
}
}
- if (checkHeroicReqs && !hasHeroicReqLevel)
+ if (checkDeathKnightReqs && !hasDeathKnightReqLevel)
{
SendCharCreate(CHAR_CREATE_LEVEL_REQUIREMENT);
return;
@@ -2458,7 +2458,7 @@ void WorldSession::HandleCharUndeleteOpcode(WorldPackets::Character::UndeleteCha
/// @todo: add more safety checks
/// * max char count per account
- /// * max heroic char count
+ /// * max death knight count
/// * team violation
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_SUM_CHARS);
diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp
index 1511bd9cdf0..484232494c1 100644
--- a/src/server/game/World/World.cpp
+++ b/src/server/game/World/World.cpp
@@ -813,14 +813,14 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_CHARACTERS_PER_ACCOUNT] = m_int_configs[CONFIG_CHARACTERS_PER_REALM];
}
- m_int_configs[CONFIG_HEROIC_CHARACTERS_PER_REALM] = sConfigMgr->GetIntDefault("HeroicCharactersPerRealm", 1);
- if (int32(m_int_configs[CONFIG_HEROIC_CHARACTERS_PER_REALM]) < 0 || m_int_configs[CONFIG_HEROIC_CHARACTERS_PER_REALM] > 12)
+ m_int_configs[CONFIG_DEATH_KNIGHTS_PER_REALM] = sConfigMgr->GetIntDefault("DeathKnightsPerRealm", 1);
+ if (int32(m_int_configs[CONFIG_DEATH_KNIGHTS_PER_REALM]) < 0 || m_int_configs[CONFIG_DEATH_KNIGHTS_PER_REALM] > 12)
{
- TC_LOG_ERROR("server.loading", "HeroicCharactersPerRealm (%i) must be in range 0..12. Set to 1.", m_int_configs[CONFIG_HEROIC_CHARACTERS_PER_REALM]);
- m_int_configs[CONFIG_HEROIC_CHARACTERS_PER_REALM] = 1;
+ TC_LOG_ERROR("server.loading", "DeathKnightsPerRealm (%i) must be in range 0..12. Set to 1.", m_int_configs[CONFIG_DEATH_KNIGHTS_PER_REALM]);
+ m_int_configs[CONFIG_DEATH_KNIGHTS_PER_REALM] = 1;
}
- m_int_configs[CONFIG_CHARACTER_CREATING_MIN_LEVEL_FOR_HEROIC_CHARACTER] = sConfigMgr->GetIntDefault("CharacterCreating.MinLevelForHeroicCharacter", 55);
+ m_int_configs[CONFIG_CHARACTER_CREATING_MIN_LEVEL_FOR_DEATH_KNIGHT] = sConfigMgr->GetIntDefault("CharacterCreating.MinLevelForDeathKnight", 55);
m_int_configs[CONFIG_DEMON_HUNTERS_PER_REALM] = sConfigMgr->GetIntDefault("DemonHuntersPerRealm", 1);
if (int32(m_int_configs[CONFIG_DEMON_HUNTERS_PER_REALM]) < 0 || m_int_configs[CONFIG_DEMON_HUNTERS_PER_REALM] > 12)
@@ -867,18 +867,18 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_START_PLAYER_LEVEL] = m_int_configs[CONFIG_MAX_PLAYER_LEVEL];
}
- m_int_configs[CONFIG_START_HEROIC_PLAYER_LEVEL] = sConfigMgr->GetIntDefault("StartHeroicPlayerLevel", 55);
- if (m_int_configs[CONFIG_START_HEROIC_PLAYER_LEVEL] < 1)
+ m_int_configs[CONFIG_START_DEATH_KNIGHT_PLAYER_LEVEL] = sConfigMgr->GetIntDefault("StartDeathKnightPlayerLevel", 55);
+ if (m_int_configs[CONFIG_START_DEATH_KNIGHT_PLAYER_LEVEL] < 1)
{
- TC_LOG_ERROR("server.loading", "StartHeroicPlayerLevel (%i) must be in range 1..MaxPlayerLevel(%u). Set to 55.",
- m_int_configs[CONFIG_START_HEROIC_PLAYER_LEVEL], m_int_configs[CONFIG_MAX_PLAYER_LEVEL]);
- m_int_configs[CONFIG_START_HEROIC_PLAYER_LEVEL] = 55;
+ TC_LOG_ERROR("server.loading", "StartDeathKnightPlayerLevel (%i) must be in range 1..MaxPlayerLevel(%u). Set to 55.",
+ m_int_configs[CONFIG_START_DEATH_KNIGHT_PLAYER_LEVEL], m_int_configs[CONFIG_MAX_PLAYER_LEVEL]);
+ m_int_configs[CONFIG_START_DEATH_KNIGHT_PLAYER_LEVEL] = 55;
}
- else if (m_int_configs[CONFIG_START_HEROIC_PLAYER_LEVEL] > m_int_configs[CONFIG_MAX_PLAYER_LEVEL])
+ else if (m_int_configs[CONFIG_START_DEATH_KNIGHT_PLAYER_LEVEL] > m_int_configs[CONFIG_MAX_PLAYER_LEVEL])
{
- TC_LOG_ERROR("server.loading", "StartHeroicPlayerLevel (%i) must be in range 1..MaxPlayerLevel(%u). Set to %u.",
- m_int_configs[CONFIG_START_HEROIC_PLAYER_LEVEL], m_int_configs[CONFIG_MAX_PLAYER_LEVEL], m_int_configs[CONFIG_MAX_PLAYER_LEVEL]);
- m_int_configs[CONFIG_START_HEROIC_PLAYER_LEVEL] = m_int_configs[CONFIG_MAX_PLAYER_LEVEL];
+ TC_LOG_ERROR("server.loading", "StartDeathKnightPlayerLevel (%i) must be in range 1..MaxPlayerLevel(%u). Set to %u.",
+ m_int_configs[CONFIG_START_DEATH_KNIGHT_PLAYER_LEVEL], m_int_configs[CONFIG_MAX_PLAYER_LEVEL], m_int_configs[CONFIG_MAX_PLAYER_LEVEL]);
+ m_int_configs[CONFIG_START_DEATH_KNIGHT_PLAYER_LEVEL] = m_int_configs[CONFIG_MAX_PLAYER_LEVEL];
}
m_int_configs[CONFIG_START_DEMON_HUNTER_PLAYER_LEVEL] = sConfigMgr->GetIntDefault("StartDemonHunterPlayerLevel", 98);
@@ -1262,7 +1262,7 @@ void World::LoadConfigSettings(bool reload)
///- Load the CharDelete related config options
m_int_configs[CONFIG_CHARDELETE_METHOD] = sConfigMgr->GetIntDefault("CharDelete.Method", 0);
m_int_configs[CONFIG_CHARDELETE_MIN_LEVEL] = sConfigMgr->GetIntDefault("CharDelete.MinLevel", 0);
- m_int_configs[CONFIG_CHARDELETE_HEROIC_MIN_LEVEL] = sConfigMgr->GetIntDefault("CharDelete.Heroic.MinLevel", 0);
+ m_int_configs[CONFIG_CHARDELETE_DEATH_KNIGHT_MIN_LEVEL] = sConfigMgr->GetIntDefault("CharDelete.DeathKnight.MinLevel", 0);
m_int_configs[CONFIG_CHARDELETE_KEEP_DAYS] = sConfigMgr->GetIntDefault("CharDelete.KeepDays", 30);
// No aggro from gray mobs
diff --git a/src/server/game/World/World.h b/src/server/game/World/World.h
index a32c63c50b9..389f40947b6 100644
--- a/src/server/game/World/World.h
+++ b/src/server/game/World/World.h
@@ -243,15 +243,15 @@ enum WorldIntConfigs
CONFIG_CHARACTER_CREATING_DISABLED_CLASSMASK,
CONFIG_CHARACTERS_PER_ACCOUNT,
CONFIG_CHARACTERS_PER_REALM,
- CONFIG_HEROIC_CHARACTERS_PER_REALM,
- CONFIG_CHARACTER_CREATING_MIN_LEVEL_FOR_HEROIC_CHARACTER,
+ CONFIG_DEATH_KNIGHTS_PER_REALM,
+ CONFIG_CHARACTER_CREATING_MIN_LEVEL_FOR_DEATH_KNIGHT,
CONFIG_DEMON_HUNTERS_PER_REALM,
CONFIG_CHARACTER_CREATING_MIN_LEVEL_FOR_DEMON_HUNTER,
CONFIG_SKIP_CINEMATICS,
CONFIG_MAX_PLAYER_LEVEL,
CONFIG_MIN_DUALSPEC_LEVEL,
CONFIG_START_PLAYER_LEVEL,
- CONFIG_START_HEROIC_PLAYER_LEVEL,
+ CONFIG_START_DEATH_KNIGHT_PLAYER_LEVEL,
CONFIG_START_DEMON_HUNTER_PLAYER_LEVEL,
CONFIG_START_PLAYER_MONEY,
CONFIG_CURRENCY_START_APEXIS_CRYSTALS,
@@ -350,7 +350,7 @@ enum WorldIntConfigs
CONFIG_CHARDELETE_KEEP_DAYS,
CONFIG_CHARDELETE_METHOD,
CONFIG_CHARDELETE_MIN_LEVEL,
- CONFIG_CHARDELETE_HEROIC_MIN_LEVEL,
+ CONFIG_CHARDELETE_DEATH_KNIGHT_MIN_LEVEL,
CONFIG_AUTOBROADCAST_CENTER,
CONFIG_AUTOBROADCAST_INTERVAL,
CONFIG_MAX_RESULTS_LOOKUP_COMMANDS,
diff --git a/src/server/scripts/Commands/cs_reset.cpp b/src/server/scripts/Commands/cs_reset.cpp
index 54fa2ac9616..c879c3c4c0b 100644
--- a/src/server/scripts/Commands/cs_reset.cpp
+++ b/src/server/scripts/Commands/cs_reset.cpp
@@ -127,7 +127,7 @@ public:
// set starting level
uint32 startLevel = target->getClass() != CLASS_DEATH_KNIGHT
? sWorld->getIntConfig(CONFIG_START_PLAYER_LEVEL)
- : sWorld->getIntConfig(CONFIG_START_HEROIC_PLAYER_LEVEL);
+ : sWorld->getIntConfig(CONFIG_START_DEATH_KNIGHT_PLAYER_LEVEL);
target->_ApplyAllLevelScaleItemMods(false);
target->SetLevel(startLevel);
diff --git a/src/server/worldserver/worldserver.conf.dist b/src/server/worldserver/worldserver.conf.dist
index e8e61f4ead9..31609770c38 100644
--- a/src/server/worldserver/worldserver.conf.dist
+++ b/src/server/worldserver/worldserver.conf.dist
@@ -798,22 +798,22 @@ CharactersPerAccount = 50
CharactersPerRealm = 12
#
-# HeroicCharactersPerRealm
-# Description: Limit number of heroic class characters per account on this realm.
+# DeathKnightsPerRealm
+# Description: Limit number of death knight characters per account on this realm.
# Range: 1-12
# Default: 1
-HeroicCharactersPerRealm = 1
+DeathKnightsPerRealm = 1
#
-# CharacterCreating.MinLevelForHeroicCharacter
-# Description: Limit creating heroic characters only for account with another
+# CharacterCreating.MinLevelForDeathKnight
+# Description: Limit creating death knights only for account with another
# character of specific level (ignored for GM accounts).
# Default: 55 - (Enabled, Requires at least another level 55 character)
# 0 - (Disabled)
# 1 - (Enabled, Requires at least another level 1 character)
-CharacterCreating.MinLevelForHeroicCharacter = 55
+CharacterCreating.MinLevelForDeathKnight = 55
#
# DemonHuntersPerRealm
@@ -868,12 +868,12 @@ MinDualSpecLevel = 30
StartPlayerLevel = 1
#
-# StartHeroicPlayerLevel
-# Description: Staring level for heroic class characters after creation.
+# StartDeathKnightPlayerLevel
+# Description: Staring level for death knights after creation.
# Range: 1-MaxPlayerLevel
# Default: 55
-StartHeroicPlayerLevel = 55
+StartDeathKnightPlayerLevel = 55
#
# StartDemonHunterPlayerLevel
@@ -2898,12 +2898,12 @@ CharDelete.Method = 0
CharDelete.MinLevel = 0
#
-# CharDelete.Heroic.MinLevel
-# Description: Required level to use the unlinking method if enabled for heroic classes.
+# CharDelete.DeathKnight.MinLevel
+# Description: Required level to use the unlinking method if enabled for death knights.
# Default: 0 - (Same method for every level)
# 1+ - (Only characters with the specified level will use the unlinking method)
-CharDelete.Heroic.MinLevel = 0
+CharDelete.DeathKnight.MinLevel = 0
#
# CharDelete.KeepDays