Skip to content

Commit

Permalink
Implement battlefields config
Browse files Browse the repository at this point in the history
Signed-off-by: Xfurry <xfurry.cmangos@outlook.com>
  • Loading branch information
Zakamurite authored and xfurry committed Jan 7, 2018
1 parent 7f9e336 commit 69a2e76
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/game/World/World.cpp
Expand Up @@ -723,6 +723,10 @@ void World::LoadConfigSettings(bool reload)
setConfig(CONFIG_BOOL_OUTDOORPVP_TF_ENABLED, "OutdoorPvp.TFEnabled", true);
setConfig(CONFIG_BOOL_OUTDOORPVP_NA_ENABLED, "OutdoorPvp.NAEnabled", true);
setConfig(CONFIG_BOOL_OUTDOORPVP_GH_ENABLED, "OutdoorPvp.GHEnabled", true);
setConfig(CONFIG_BOOL_BATTLEFIELD_WG_ENABLED, "Battlefield.WGEnabled", true);
setConfig(CONFIG_UINT32_BATTLEFIELD_COOLDOWN_DURATION, "Battlefield.CooldownDuraton", 150);
setConfig(CONFIG_UINT32_BATTLEFIELD_BATTLE_DURATION, "Battlefield.BattleDuration", 30);
setConfig(CONFIG_UINT32_BATTLEFIELD_MAX_PLAYERS_PER_TEAM, "Battlefield.MaxPlayersPerTeam", 120);

setConfig(CONFIG_BOOL_OFFHAND_CHECK_AT_TALENTS_RESET, "OffhandCheckAtTalentsReset", false);

Expand Down
4 changes: 4 additions & 0 deletions src/game/World/World.h
Expand Up @@ -178,6 +178,9 @@ enum eConfigUInt32Values
CONFIG_UINT32_ARENA_FIRST_RESET_DAY,
CONFIG_UINT32_ARENA_SEASON_PREVIOUS_ID,
CONFIG_UINT32_GROUP_OFFLINE_LEADER_DELAY,
CONFIG_UINT32_BATTLEFIELD_COOLDOWN_DURATION,
CONFIG_UINT32_BATTLEFIELD_BATTLE_DURATION,
CONFIG_UINT32_BATTLEFIELD_MAX_PLAYERS_PER_TEAM,
CONFIG_UINT32_CLIENTCACHE_VERSION,
CONFIG_UINT32_GUILD_EVENT_LOG_COUNT,
CONFIG_UINT32_GUILD_BANK_EVENT_LOG_COUNT,
Expand Down Expand Up @@ -346,6 +349,7 @@ enum eConfigBoolValues
CONFIG_BOOL_OUTDOORPVP_TF_ENABLED,
CONFIG_BOOL_OUTDOORPVP_NA_ENABLED,
CONFIG_BOOL_OUTDOORPVP_GH_ENABLED,
CONFIG_BOOL_BATTLEFIELD_WG_ENABLED,
CONFIG_BOOL_KICK_PLAYER_ON_BAD_PACKET,
CONFIG_BOOL_STATS_SAVE_ONLY_ON_LOGOUT,
CONFIG_BOOL_CLEAN_CHARACTER_DB,
Expand Down
30 changes: 29 additions & 1 deletion src/mangosd/mangosd.conf.dist.in
Expand Up @@ -3,7 +3,7 @@
#####################################

[MangosdConf]
ConfVersion=2016101401
ConfVersion=2017010701

###################################################################################################################
# CONNECTIONS AND DIRECTORIES
Expand Down Expand Up @@ -1621,6 +1621,7 @@ Arena.StartPersonalRating = -1
# OutdoorPvp.TFEnabled #Enable Terokkar Forest Outdoor pvp
# OutdoorPvp.NAEnabled #Enable Halaa (Nagrand) Outdoor pvp
# OutdoorPvp.GHEnabled #Enable Venture Bay (Grizzly Hills) Outdoor pvp
# OutdoorPvp.WGEnabled #Enable Wintergrasp Outdoor pvp
# Default: 1 (enable)
# 0 (disable)
#
Expand All @@ -1633,6 +1634,33 @@ OutdoorPvp.ZMEnabled = 1
OutdoorPvp.TFEnabled = 1
OutdoorPvp.NAEnabled = 1
OutdoorPvp.GHEnabled = 1
OutdoorPvp.WGEnabled = 1

###################################################################################################################
# BATTLEFIELD CONFIG
#
# Battlefield.WGEnabled #Enable Wintergrasp Battlefield
# Default: 1 (enable)
# 0 (disable)
#
# Battlefield.CooldownDuraton
# Duration of the battlefield cooldown (in minutes)
# Default: 150 (2 hours and 30 minutes)
#
# Battlefield.BattleDuration
# Maximum duration of the battlefield battle (in minutes)
# Default: 30 (minutes)
#
# Battlefield.MaxPlayersPerTeam
# Maximum allowed players for each team in battlefields
# Default: 120
#
###################################################################################################################

Battlefield.WGEnabled = 1
Battlefield.CooldownDuraton = 150
Battlefield.BattleDuration = 30
Battlefield.MaxPlayersPerTeam = 120

###################################################################################################################
# NETWORK CONFIG
Expand Down
2 changes: 1 addition & 1 deletion src/shared/SystemConfig.h
Expand Up @@ -37,7 +37,7 @@
// Format is YYYYMMDDRR where RR is the change in the conf file
// for that day.
#ifndef _MANGOSDCONFVERSION
# define _MANGOSDCONFVERSION 2016101401
# define _MANGOSDCONFVERSION 2017010701
#endif
#ifndef _REALMDCONFVERSION
# define _REALMDCONFVERSION 2010062001
Expand Down

0 comments on commit 69a2e76

Please sign in to comment.