*Add config option to change minimum level required to Dual Spec

--HG--
branch : trunk
This commit is contained in:
maximius
2009-08-15 13:39:40 -07:00
parent 3269f47b5b
commit b6e7065d41
5 changed files with 11 additions and 3 deletions
+2 -2
View File
@@ -923,7 +923,7 @@ void Creature::prepareGossipMenu( Player *pPlayer,uint32 gossipid )
cantalking=false;
break;
case GOSSIP_OPTION_LEARNDUALSPEC:
if(!(pPlayer->GetSpecsCount() == 1 && isCanTrainingAndResetTalentsOf(pPlayer) && !(pPlayer->getLevel() < 40)))
if(!(pPlayer->GetSpecsCount() == 1 && isCanTrainingAndResetTalentsOf(pPlayer) && !(pPlayer->getLevel() < sWorld.getConfig(CONFIG_MIN_DUALSPEC_LEVEL))))
cantalking=false;
break;
case GOSSIP_OPTION_UNLEARNTALENTS:
@@ -1074,7 +1074,7 @@ void Creature::OnGossipSelect(Player* player, uint32 option)
player->SendTalentWipeConfirm(guid);
break;
case GOSSIP_OPTION_LEARNDUALSPEC:
if(player->GetSpecsCount() == 1 && !(player->getLevel() < 40))
if(player->GetSpecsCount() == 1 && !(player->getLevel() < sWorld.getConfig(CONFIG_MIN_DUALSPEC_LEVEL)))
{
if (player->GetMoney() < 10000000)
{
+1 -1
View File
@@ -2547,7 +2547,7 @@ void Player::InitTalentForLevel()
}
else
{
if (level < 40 || m_specsCount == 0)
if (level < sWorld.getConfig(CONFIG_MIN_DUALSPEC_LEVEL) || m_specsCount == 0)
{
m_specsCount = 1;
m_activeSpec = 0;
+2
View File
@@ -729,6 +729,8 @@ void World::LoadConfigSettings(bool reload)
m_configs[CONFIG_MAX_PLAYER_LEVEL] = MAX_LEVEL;
}
m_configs[CONFIG_MIN_DUALSPEC_LEVEL] = sConfig.GetIntDefault("MinDualSpecLevel", 40);
m_configs[CONFIG_START_PLAYER_LEVEL] = sConfig.GetIntDefault("StartPlayerLevel", 1);
if(m_configs[CONFIG_START_PLAYER_LEVEL] < 1)
{
+1
View File
@@ -124,6 +124,7 @@ enum WorldConfigs
CONFIG_MIN_LEVEL_FOR_HEROIC_CHARACTER_CREATING,
CONFIG_SKIP_CINEMATICS,
CONFIG_MAX_PLAYER_LEVEL,
CONFIG_MIN_DUALSPEC_LEVEL,
CONFIG_START_PLAYER_LEVEL,
CONFIG_START_HEROIC_PLAYER_LEVEL,
CONFIG_START_PLAYER_MONEY,
+5
View File
@@ -593,6 +593,10 @@ ChatLogTimestamp = 0
# Change not recommended
# Default: 80
#
# MinDualSpecLevel
# Min level at which players can use Dual Spec functionality
# Default: 40
#
# StartPlayerLevel
# Staring level that have character at creating (in range 1 to MaxPlayerLevel)
# Default: 1
@@ -755,6 +759,7 @@ HeroicCharactersPerRealm = 1
MinLevelForHeroicCharacterCreating = 55
SkipCinematics = 0
MaxPlayerLevel = 80
MinDualSpecLevel = 40
StartPlayerLevel = 1
StartHeroicPlayerLevel = 55
StartPlayerMoney = 0