aboutsummaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
Diffstat (limited to 'src/game')
-rw-r--r--src/game/Creature.cpp4
-rw-r--r--src/game/Player.cpp2
-rw-r--r--src/game/World.cpp2
-rw-r--r--src/game/World.h1
4 files changed, 6 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,