diff options
author | maximius <none@none> | 2009-08-15 13:39:40 -0700 |
---|---|---|
committer | maximius <none@none> | 2009-08-15 13:39:40 -0700 |
commit | b6e7065d41b712f73177096ebb3bb9b36bf4bd7f (patch) | |
tree | 59a30cc0c195295518f62c8a3de90242bbc44b5d /src | |
parent | 3269f47b5bdd98e9a8195a2dde8d785be38d81ce (diff) |
*Add config option to change minimum level required to Dual Spec
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Creature.cpp | 4 | ||||
-rw-r--r-- | src/game/Player.cpp | 2 | ||||
-rw-r--r-- | src/game/World.cpp | 2 | ||||
-rw-r--r-- | src/game/World.h | 1 | ||||
-rw-r--r-- | src/trinitycore/trinitycore.conf.dist | 5 |
5 files changed, 11 insertions, 3 deletions
diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp index 07652fe8eb6..1fc31e8a93a 100644 --- a/src/game/Creature.cpp +++ b/src/game/Creature.cpp @@ -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) { diff --git a/src/game/Player.cpp b/src/game/Player.cpp index d1358e5a5c3..ebb01bdb14a 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -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; diff --git a/src/game/World.cpp b/src/game/World.cpp index e09aab24e44..a5e6a66f491 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -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) { diff --git a/src/game/World.h b/src/game/World.h index 9d1813f9752..bfc2947201a 100644 --- a/src/game/World.h +++ b/src/game/World.h @@ -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, diff --git a/src/trinitycore/trinitycore.conf.dist b/src/trinitycore/trinitycore.conf.dist index 242f1f52933..f8aa1eccb63 100644 --- a/src/trinitycore/trinitycore.conf.dist +++ b/src/trinitycore/trinitycore.conf.dist @@ -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 |