魔兽世界私服最大天赋值系统
Index: src/mangosd/mangosd.conf.in
===================================================================
--- src/mangosd/mangosd.conf.in (révision 4243)
+++ src/mangosd/mangosd.conf.in (copie de travail)
@@ -131,11 +131,15 @@
# Default: 100
PlayerLimit = 100
-# Max level that can reached by player for expirience (in range from 1 to 255).
+# Max level that can reached by player for experience (in range from 1 to 255).
# Change not recommended
# Default: 60
MaxPlayerLevel = 70
+# Max talent points that a player can have (by default : MaxPlayerLevel - 9)
+# Default: 51
+MaxPlayerTalent = 61
+
# Activate weather system
# Default: 1 (true)
# 0 (false)
Index: src/game/World.h
===================================================================
--- src/game/World.h (révision 4243)
+++ src/game/World.h (copie de travail)
@@ -74,6 +74,7 @@
CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD,
CONFIG_ALLOW_TWO_SIDE_INTERACTION_TRADE,
CONFIG_ALLOW_TWO_SIDE_WHO_LIST,
+ CONFIG_MAX_PLAYER_TALENT,
CONFIG_MAX_PLAYER_LEVEL,
CONFIG_IGNORE_AT_LEVEL_REQUIREMENT,
CONFIG_MAX_PRIMARY_TRADE_SKILL,
Index: src/game/World.cpp
===================================================================
--- src/game/World.cpp (révision 4243)
+++ src/game/World.cpp (copie de travail)
@@ -322,6 +329,7 @@
m_configs[CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD] = sConfig.GetIntDefault("AllowTwoSide.Interaction.Guild",0);
m_configs[CONFIG_ALLOW_TWO_SIDE_INTERACTION_TRADE] = sConfig.GetIntDefault("AllowTwoSide.Interaction.Trade",0);
m_configs[CONFIG_ALLOW_TWO_SIDE_WHO_LIST] = sConfig.GetIntDefault("AllowTwoSide.WhoList", 0);
+ m_configs[CONFIG_MAX_PLAYER_TALENT] = sConfig.GetIntDefault("MaxPlayerTalent", 51);
m_configs[CONFIG_MAX_PLAYER_LEVEL] = sConfig.GetIntDefault("MaxPlayerLevel", 60);
if(m_configs[CONFIG_MAX_PLAYER_LEVEL] > 255)
{
Index: src/game/Player.cpp
===================================================================
--- src/game/Player.cpp (révision 4243)
+++ src/game/Player.cpp (copie de travail)
@@ -2029,6 +2029,11 @@
else
{
uint32 talentPointsForLevel = uint32((level-9)*sWorld.getRate(RATE_TALENT));
+
+ // Check if reached the maximum of talent points
+ if(talentPointsForLevel > sWorld.getConfig(CONFIG_MAX_PLAYER_TALENT))
+ talentPointsForLevel = sWorld.getConfig(CONFIG_MAX_PLAYER_TALENT);
+
// if used more that have then reset
if(m_usedTalentCount > talentPointsForLevel)
{
@@ -2733,6 +2738,10 @@
{
uint32 level = getLevel();
uint32 talentPointsForLevel = level < 10 ? 0 : uint32((level-9)*sWorld.getRate(RATE_TALENT));
+
+ // Check if reached the maximum of talent points
+ if(talentPointsForLevel > sWorld.getConfig(CONFIG_MAX_PLAYER_TALENT))
+ talentPointsForLevel = sWorld.getConfig(CONFIG_MAX_PLAYER_TALENT);
if (m_usedTalentCount == 0)
{
|