Core/Players: Rename "heroic character" to "death knight"

This commit is contained in:
Chazy Chaz authored and Aokromes committed 2017-03-20 16:52:23 +01:00
1 parent cb8f052a65
commit 3f14e4e56e
9 files changed
+62 -62

No files matched your search

+1 -1
View File
@@ -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,
+2 -2
View File
@@ -687,7 +687,7 @@ bool Player::Create(ObjectGuid::LowType guidlow, CharacterCreateInfo* createInfo
// set starting level
uint32 start_level = 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);
if (m_session->HasPermission(rbac::RBAC_PERM_USE_START_GM_LEVEL))
{
@@ -4284,7 +4284,7 @@ void Player::DeleteFromDB(ObjectGuid playerguid, uint32 accountId, bool updateRe
else if (characterInfo) // To avoid a query, we select loaded data. If it doesn't exist, return.
{
// Define the required variables
uint32 charDelete_minLvl = sWorld->getIntConfig(characterInfo->Class != CLASS_DEATH_KNIGHT ? CONFIG_CHARDELETE_MIN_LEVEL : CONFIG_CHARDELETE_HEROIC_MIN_LEVEL);
uint32 charDelete_minLvl = 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
+24 -26
View File
@@ -405,19 +405,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;
@@ -479,40 +477,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;
}
}
@@ -544,32 +542,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;
+15 -15
View File
@@ -751,14 +751,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] > 10)
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] > 10)
{
TC_LOG_ERROR("server.loading", "HeroicCharactersPerRealm (%i) must be in range 0..10. 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..10. 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_SKIP_CINEMATICS] = sConfigMgr->GetIntDefault("SkipCinematics", 0);
if (int32(m_int_configs[CONFIG_SKIP_CINEMATICS]) < 0 || m_int_configs[CONFIG_SKIP_CINEMATICS] > 2)
@@ -796,18 +796,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_PLAYER_MONEY] = sConfigMgr->GetIntDefault("StartPlayerMoney", 0);
@@ -1198,7 +1198,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
+4 -4
View File
@@ -236,13 +236,13 @@ 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_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_PLAYER_MONEY,
CONFIG_CURRENCY_START_JUSTICE_POINTS,
CONFIG_CURRENCY_MAX_JUSTICE_POINTS,
@@ -345,7 +345,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,
+1 -1
View File
@@ -128,7 +128,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);
+12 -12
View File
@@ -760,22 +760,22 @@ CharactersPerAccount = 50
CharactersPerRealm = 10
#
# 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-10
# 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
#
# SkipCinematics
@@ -812,12 +812,12 @@ MinDualSpecLevel = 30
StartPlayerLevel = 1
#
# StartHeroicPlayerLevel
# Description: Staring level for heroic class characters after creation.
# StartDeathKnightPlayerLevel
# Description: Staring level for death knight characters after creation.
# Range: 1-MaxPlayerLevel
# Default: 55
StartHeroicPlayerLevel = 55
StartDeathKnightPlayerLevel = 55
#
# StartPlayerMoney
@@ -2816,12 +2816,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