Core/Players: Rename "heroic character" to "death knight"
Closes #19286
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
UPDATE rbac_permissions SET `name` = 'Skip character creation death knight min level check' WHERE id = 18;
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user