Skip to content

Commit

Permalink
[9452] 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.
  • Loading branch information
VladimirMangos committed Feb 25, 2010
1 parent 48e7003 commit 28e9423
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion src/game/BattleGround.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ void BattleGround::Update(uint32 diff)
if (Player* plr = sObjectMgr.GetPlayer(itr->first))
plr->RemoveAurasDueToSpell(SPELL_PREPARATION);
//Announce BG starting
if (sWorld.getConfig(CONFIG_BOOL_BATTLEGROUND_QUEUE_ANNOUNCER_ENABLE))
if (sWorld.getConfig(CONFIG_BOOL_BATTLEGROUND_QUEUE_ANNOUNCER_START))
{
sWorld.SendWorldText(LANG_BG_STARTED_ANNOUNCE_WORLD, GetName(), GetMinLevel(), GetMaxLevel());
}
Expand Down
4 changes: 2 additions & 2 deletions src/game/BattleGroundMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ GroupQueueInfo * BattleGroundQueue::AddGroup(Player *leader, Group* grp, BattleG
m_QueuedGroups[bracketId][index].push_back(ginfo);

//announce to world, this code needs mutex
if (!isRated && !isPremade && sWorld.getConfig(CONFIG_BOOL_BATTLEGROUND_QUEUE_ANNOUNCER_ENABLE))
if (!ArenaType && !isRated && !isPremade && sWorld.getConfig(CONFIG_UINT32_BATTLEGROUND_QUEUE_ANNOUNCER_JOIN))
{
if (BattleGround* bg = sBattleGroundMgr.GetBattleGroundTemplate(ginfo->BgTypeId))
{
Expand All @@ -231,7 +231,7 @@ GroupQueueInfo * BattleGroundQueue::AddGroup(Player *leader, Group* grp, BattleG
qHorde += (*itr)->Players.size();

// 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(leader).PSendSysMessage(LANG_BG_QUEUE_ANNOUNCE_SELF, bgName, q_min_level, q_max_level,
qAlliance, (MinPlayers > qAlliance) ? MinPlayers - qAlliance : (uint32)0, qHorde, (MinPlayers > qHorde) ? MinPlayers - qHorde : (uint32)0);
Expand Down
7 changes: 3 additions & 4 deletions src/game/World.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -708,10 +708,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_INVITATION_TYPE, "Battleground.InvitationType", 0);
setConfig(CONFIG_UINT32_BATTLEGROUND_PREMATURE_FINISH_TIMER, "BattleGround.PrematureFinishTimer", 5 * MINUTE * IN_MILISECONDS);
setConfig(CONFIG_UINT32_BATTLEGROUND_PREMADE_GROUP_WAIT_FOR_MATCH, "BattleGround.PremadeGroupWaitForMatch", 30 * 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 @@ -159,6 +159,7 @@ enum eConfigUint32Values
CONFIG_UINT32_BATTLEGROUND_INVITATION_TYPE,
CONFIG_UINT32_BATTLEGROUND_PREMATURE_FINISH_TIMER,
CONFIG_UINT32_BATTLEGROUND_PREMADE_GROUP_WAIT_FOR_MATCH,
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 @@ -296,8 +297,7 @@ enum eConfigBoolValues
CONFIG_BOOL_DECLINED_NAMES_USED,
CONFIG_BOOL_SKILL_MILLING,
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
27 changes: 14 additions & 13 deletions src/mangosd/mangosd.conf.dist.in
Original file line number Diff line number Diff line change
Expand Up @@ -1238,13 +1238,14 @@ Death.Bones.BattlegroundOrArena = 1
# Default: 1 (enable)
# 0 (disable)
#
# Battleground.QueueAnnouncer.Enable
# Enable queue announcer posting to chat
# Default: 0 (disable)
# 1 (enable)
#
# Battleground.QueueAnnouncer.PlayerOnly
# Enable queue announcer posting to chat
# 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)
#
Expand All @@ -1266,8 +1267,8 @@ Death.Bones.BattlegroundOrArena = 1
###################################################################################################################

Battleground.CastDeserter = 1
Battleground.QueueAnnouncer.Enable = 0
Battleground.QueueAnnouncer.PlayerOnly = 0
Battleground.QueueAnnouncer.Join = 0
Battleground.QueueAnnouncer.Start = 0
Battleground.InvitationType = 0
BattleGround.PrematureFinishTimer = 300000
BattleGround.PremadeGroupWaitForMatch = 1800000
Expand Down Expand Up @@ -1297,12 +1298,12 @@ BattleGround.PremadeGroupWaitForMatch = 1800000
# If automatic distribution is enabled in days
# Default: 7 (weekly)
#
# Arena.QueueJoinAnnouncer.Enable
# Arena.QueueAnnouncer.Join
# Enable arena queue announcer posting to chat at join
# Default: 0 (disable)
# 1 (enable)
#
# Arena.QueueExitAnnouncer.Enable
# Arena.QueueAnnouncer.Exit
# Enable arena queue announcer posting to chat at exit
# Default: 0 (disable)
# 1 (enable)
Expand All @@ -1322,8 +1323,8 @@ Arena.MaxRatingDifference = 150
Arena.RatingDiscardTimer = 600000
Arena.AutoDistributePoints = 0
Arena.AutoDistributeInterval = 7
Arena.QueueJoinAnnouncer.Enable = 0
Arena.QueueExitAnnouncer.Enable = 0
Arena.QueueAnnouncer.Join = 0
Arena.QueueAnnouncer.Exit = 0
Arena.ArenaSeason.ID = 1
Arena.ArenaSeason.InProgress = 1

Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "9451"
#define REVISION_NR "9452"
#endif // __REVISION_NR_H__

0 comments on commit 28e9423

Please sign in to comment.