Skip to content

Commit

Permalink
Replace battleground announcer options.
Browse files Browse the repository at this point in the history
* Drop Battleground.QueueAnnouncer.Enable and Battleground.QueueAnnouncer.PlayerOnly
* Add Battleground.QueueAnnouncer.Join with 0..2 values (1=to joined player, 2=to world)
* Add Battleground.QueueAnnouncer.Start for start bg event

Also fixed bug when not rated arenas announced as BG announces
Also lost mangosd.config changes from prev commit.

(based on commit 28e9423)
  • Loading branch information
VladimirMangos committed Feb 25, 2010
1 parent f9d2a80 commit 889abb0
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 27 deletions.
6 changes: 3 additions & 3 deletions src/game/BattleGroundMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ void BattleGroundQueue::AnnounceWorld(GroupQueueInfo *ginfo, const uint64& playe
}
else //if BG
{
if( sWorld.getConfig(CONFIG_BOOL_BATTLEGROUND_QUEUE_ANNOUNCER_ENABLE) )
if( sWorld.getConfig(CONFIG_UINT32_BATTLEGROUND_QUEUE_ANNOUNCER_JOIN) )
{
Player *plr = sObjectMgr.GetPlayer(playerGUID);
if(!plr)
Expand Down Expand Up @@ -436,7 +436,7 @@ void BattleGroundQueue::AnnounceWorld(GroupQueueInfo *ginfo, const uint64& playe
}

// Show queue status to player only (when joining queue)
if(sWorld.getConfig(CONFIG_BOOL_BATTLEGROUND_QUEUE_ANNOUNCER_PLAYERONLY))
if(sWorld.getConfig(CONFIG_UINT32_BATTLEGROUND_QUEUE_ANNOUNCER_JOIN)==1)
{
ChatHandler(plr).PSendSysMessage(LANG_BG_QUEUE_ANNOUNCE_SELF,
bgName, q_min_level, q_max_level, qAlliance, MinPlayers, qHorde, MinPlayers);
Expand Down Expand Up @@ -787,7 +787,7 @@ void BattleGroundQueue::Update(BattleGroundTypeId bgTypeId, BattleGroundBracketI
{
// create new battleground
bg2 = sBattleGroundMgr.CreateNewBattleGround(bgTypeId);
if( sWorld.getConfig(CONFIG_BOOL_BATTLEGROUND_QUEUE_ANNOUNCER_ENABLE) )
if (sWorld.getConfig(CONFIG_BOOL_BATTLEGROUND_QUEUE_ANNOUNCER_START))
{
char const* bgName = bg2->GetName();
uint32 q_min_level = Player::GetMinLevelForBattleGroundBracketId(bracket_id);
Expand Down
7 changes: 3 additions & 4 deletions src/game/World.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -690,10 +690,9 @@ void World::LoadConfigSettings(bool reload)
else
setConfig(CONFIG_BOOL_DECLINED_NAMES_USED, "DeclinedNames", false);

setConfig(CONFIG_BOOL_BATTLEGROUND_CAST_DESERTER, "Battleground.CastDeserter", true);
setConfig(CONFIG_BOOL_BATTLEGROUND_QUEUE_ANNOUNCER_ENABLE, "Battleground.QueueAnnouncer.Enable", false);
setConfig(CONFIG_BOOL_BATTLEGROUND_QUEUE_ANNOUNCER_PLAYERONLY, "Battleground.QueueAnnouncer.PlayerOnly", false);

setConfig(CONFIG_BOOL_BATTLEGROUND_CAST_DESERTER, "Battleground.CastDeserter", true);
setConfigMinMax(CONFIG_UINT32_BATTLEGROUND_QUEUE_ANNOUNCER_JOIN, "Battleground.QueueAnnouncer.Join", 0, 0, 2);
setConfig(CONFIG_BOOL_BATTLEGROUND_QUEUE_ANNOUNCER_START, "Battleground.QueueAnnouncer.Start", false);
setConfig(CONFIG_UINT32_BATTLEGROUND_PREMATURE_FINISH_TIMER, "BattleGround.PrematureFinishTimer", 5 * MINUTE * IN_MILISECONDS);
setConfig(CONFIG_UINT32_ARENA_MAX_RATING_DIFFERENCE, "Arena.MaxRatingDifference", 150);
setConfig(CONFIG_UINT32_ARENA_RATING_DISCARD_TIMER, "Arena.RatingDiscardTimer", 10 * MINUTE * IN_MILISECONDS);
Expand Down
4 changes: 2 additions & 2 deletions src/game/World.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ enum eConfigUint32Values
CONFIG_UINT32_CORPSE_DECAY_WORLDBOSS,
CONFIG_UINT32_INSTANT_LOGOUT,
CONFIG_UINT32_BATTLEGROUND_PREMATURE_FINISH_TIMER,
CONFIG_UINT32_BATTLEGROUND_QUEUE_ANNOUNCER_JOIN,
CONFIG_UINT32_ARENA_MAX_RATING_DIFFERENCE,
CONFIG_UINT32_ARENA_RATING_DISCARD_TIMER,
CONFIG_UINT32_ARENA_AUTO_DISTRIBUTE_INTERVAL_DAYS,
Expand Down Expand Up @@ -285,8 +286,7 @@ enum eConfigBoolValues
CONFIG_BOOL_ALL_TAXI_PATHS,
CONFIG_BOOL_DECLINED_NAMES_USED,
CONFIG_BOOL_BATTLEGROUND_CAST_DESERTER,
CONFIG_BOOL_BATTLEGROUND_QUEUE_ANNOUNCER_ENABLE,
CONFIG_BOOL_BATTLEGROUND_QUEUE_ANNOUNCER_PLAYERONLY,
CONFIG_BOOL_BATTLEGROUND_QUEUE_ANNOUNCER_START,
CONFIG_BOOL_ARENA_AUTO_DISTRIBUTE_POINTS,
CONFIG_BOOL_ARENA_QUEUE_ANNOUNCER_JOIN,
CONFIG_BOOL_ARENA_QUEUE_ANNOUNCER_EXIT,
Expand Down
37 changes: 19 additions & 18 deletions src/mangosd/mangosd.conf.dist.in
Original file line number Diff line number Diff line change
Expand Up @@ -485,21 +485,6 @@ LogColors = ""
# Default: 1 (true)
# 0 (false)
#
# Battleground.CastDeserter
# Cast or not Deserter spell at player who leave battleground in progress
# Default: 1 (true)
# 0 (false)
#
# Battleground.QueueAnnouncer.Enable
# Enable queue announcer posting to chat
# Default: 0 (false)
# 1 (true)
#
# Battleground.QueueAnnouncer.PlayerOnly
# Enable queue announcer posting to chat
# Default: 0 (false)
# 1 (true)
#
# CastUnstuck
# Allow cast or not Unstuck spell at .start or client Help option use
# Default: 1 (true)
Expand Down Expand Up @@ -644,9 +629,6 @@ DisableWaterBreath = 4
AllFlightPaths = 0
AlwaysMaxSkillForLevel = 0
ActivateWeather = 1
Battleground.CastDeserter = 1
Battleground.QueueAnnouncer.Enable = 0
Battleground.QueueAnnouncer.PlayerOnly = 0
CastUnstuck = 1
MaxSpellCastsInChain = 10
Instance.IgnoreLevel = 0
Expand Down Expand Up @@ -1205,13 +1187,32 @@ Death.Bones.BattlegroundOrArena = 1
###################################################################################################################
# BATTLEGROUND CONFIG
#
# Battleground.CastDeserter
# Cast Deserter spell at player who leave battleground in progress
# Default: 1 (enable)
# 0 (disable)
#
# Battleground.QueueAnnouncer.Join
# Enable queue announcer posting to chat at join
# Default: 0 (not send)
# 1 (send to joined player only)
# 2 (send to all players)
#
# Battleground.QueueAnnouncer.Start
# Enable queue announcer posting to chat at BG start
# Default: 0 (disable)
# 1 (enable)
#
# Battleground.PrematureFinishTimer
# The time to end the bg if there are less than MinPlayersPerTeam on one side in milliseconds
# Default: 300000 (5 minutes)
# 0 - disable (not recommended)
#
###################################################################################################################

Battleground.CastDeserter = 1
Battleground.QueueAnnouncer.Join = 0
Battleground.QueueAnnouncer.Start = 0
BattleGround.PrematureFinishTimer = 300000

###################################################################################################################
Expand Down

0 comments on commit 889abb0

Please sign in to comment.