账号注册

大芒果魔兽|大芒果中国|魔兽世界单机|大芒果单机|大芒果GM命令|大芒果技术

查看: 734|回复: 0

最大天赋值系统

[复制链接]

278

主题

9

回帖

1820

DKP

管理员

Rank: 9Rank: 9Rank: 9

积分
4383
发表于 2021-2-18 17:08:20 | 显示全部楼层 |阅读模式
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)
     {




上一篇:在线改名
下一篇:防外挂补丁
大芒果魔兽世界怀旧服论坛 http://damangos.com
回复

使用道具 举报

游客
回复
您需要登录后才可以回帖 登录 | 账号注册

Archiver|手机版|小黑屋| 大芒果魔兽 ( 苏ICP备23526329 ) |网站地图

GMT+8, 2024-12-27 21:55 , Processed in 3.902714 second(s), 29 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表