关灯
开启左侧

M端比较老的角色出生金钱控制

  [复制链接]
admin实名认证 发表于 2016-4-23 16:50:41 | 显示全部楼层 |阅读模式 打印 上一主题 下一主题
 
适用于MANGOS系统。比较老的代码了,不过貌似还是可以使用的,大概需要修改的地方不多


Index: src/game/Player.cpp===================================================================--- src/game/Player.cpp (revision 5495)
+++ src/game/Player.cpp (working copy)@@
-439,6 +439,7 @@
// set starting level SetUInt32Value( UNIT_FIELD_LEVEL, sWorld.getConfig(CONFIG_START_PLAYER_LEVEL) );
+ SetUInt32Value( PLAYER_FIELD_COINAGE, sWorld.getConfig(CONFIG_START_PLAYER_MONEY) * 10000 );
// Played time m_Last_tick = time(NULL);
Index: src/game/World.cpp===================================================================
--- src/game/World.cpp (revision 5495)
+++ src/game/World.cpp (working copy)@@
-431,6 +431,17 @@ sLog.outError("StartPlayerLevel (%i) must be in range 1..MaxPlayerLevel(%u). Set to %u.",m_configs[CONFIG_START_PLAYER_LEVEL],m_configs[CONFIG_MAX_PLAYER_LEVEL],m_configs[CONFIG_MAX_PLAYER_LEVEL]);
m_configs[CONFIG_START_PLAYER_LEVEL] = m_configs[CONFIG_MAX_PLAYER_LEVEL];
}
+ m_configs[CONFIG_START_PLAYER_MONEY] = sConfig.GetIntDefault("StartPlayerMoney", 1);
+ if(m_configs[CONFIG_START_PLAYER_MONEY] < 0)
+ {
+ sLog.outError("StartPlayerMoney (%i) must be a positive number. Set to 0.",m_configs[CONFIG_START_PLAYER_MONEY]);
+ m_configs[CONFIG_START_PLAYER_MONEY] = 0;
+ }
+ else if(m_configs[CONFIG_START_PLAYER_MONEY] > 214748)
+ {
+ sLog.outError("StartPlayerMoney (%i) must be in range 0..MaxPlayerMoney(%u). Set to %u.",m_configs[CONFIG_START_PLAYER_MONEY],214748,214748);
+ m_configs[CONFIG_START_PLAYER_MONEY] = 214748;
+ }
m_configs[CONFIG_INSTANCE_IGNORE_LEVEL] = sConfig.GetBoolDefault("Instance.IgnoreLevel", 0);
m_configs[CONFIG_INSTANCE_IGNORE_RAID] = sConfig.GetBoolDefault("Instance.IgnoreRaid", 0);
m_configs[CONFIG_BATTLEGROUND_CAST_DESERTER] = sConfig.GetBoolDefault("Battleground.CastDeserter", 1);
Index: src/game/World.h===================================================================
--- src/game/World.h (revision 5495)
+++ src/game/World.h (working copy)@@
-82,6 +82,7 @@
CONFIG_ALLOW_TWO_SIDE_ADD_FRIEND,
CONFIG_MAX_PLAYER_LEVEL,
CONFIG_START_PLAYER_LEVEL,
+ CONFIG_START_PLAYER_MONEY,
CONFIG_INSTANCE_IGNORE_LEVEL,
CONFIG_INSTANCE_IGNORE_RAID,
CONFIG_BATTLEGROUND_CAST_DESERTER,
Index: src/mangosd/mangosd.conf.in===================================================================--- src/mangosd/mangosd.conf.in
(revision 5495)+++ src/mangosd/mangosd.conf.in (working copy)
@@ -306,6 +306,11 @@
# Staring level that have character at creating (in range 1 to MaxPlayerLevel)
# Default: 1 #
+# StartPlayerMoney
+# Starting money in Gold that have character at creating (in range 0 to 214748)
+# Todo: Break this up by copper silver and gold
+# Default: 0
+#
# ActivateWeather
# Activate weather system
# Default: 1 (true)
@@ -385,6 +390,7 @@
DBC.Locale = 255
MaxPlayerLevel = 70
StartPlayerLevel = 1
+StartPlayerMoney = 0
ActivateWeather = 1
Battleground.CastDeserter = 1
Instance.IgnoreLevel = 0
标签:角色
 

精彩评论1

倒序浏览
爱上你的人 发表于 2016-10-26 23:49:26 | 显示全部楼层
 
吾爱尚玩免费服务端下载!每天20金币走起!
 
VIP介绍
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 最佳新人

    注册账号后积极发帖的会员
  • 活跃会员

    经常参与各类话题的讨论,发帖内容较有主见
  • 热心会员

    经常帮助其他会员答疑
  • 推广达人

    积极宣传本站,为本站带来更多注册会员
  • 宣传达人

    积极宣传本站,为本站带来更多的用户访问量
  • 灌水之王

    经常在论坛发帖,且发帖量较大
  • 突出贡献

    长期对论坛的繁荣而不断努力,或多次提出建设性意见
  • 优秀版主

    活跃且尽责职守的版主
  • 荣誉管理

    曾经为论坛做出突出贡献目前已离职的版主
  • 论坛元老

    为论坛做出突出贡献的会员

0关注

5粉丝

3421帖子

排行榜
作者专栏

QQ交流群&&微信订阅号

QQ交流群

微信订阅号

吾爱尚玩资源基地永久域名:

Www.523Play.Com

在线管理员QQ:1589479632

邮箱:Email@523play.com

QQ交流群:558936238

Copyright   ©2015-2116  吾爱尚玩资源基地|523play.comPowered by©523Pplay.Com技术支持:吾爱尚玩资源基地