mirror of
https://github.com/mangosfour/server.git
synced 2025-12-27 10:37:02 +00:00
[7252] Move all world global broadcast string (all arena/bg related) to mangos_string.
PLEASE, NOT USE string world broadcasts in real code. This function _only_ for debug purposes. Really allow with .debug bg start bg with 1 player. Added helps for some existed .debug commands.
This commit is contained in:
parent
22cb305002
commit
100429f29c
8 changed files with 68 additions and 14 deletions
|
|
@ -694,6 +694,14 @@ void BattleGroundQueue::Update(BattleGroundTypeId bgTypeId, uint32 queue_id, uin
|
|||
}
|
||||
}
|
||||
}
|
||||
// BG case
|
||||
else
|
||||
{
|
||||
if(sBattleGroundMgr.isTesting())
|
||||
{
|
||||
MinPlayersPerTeam = 1;
|
||||
}
|
||||
}
|
||||
|
||||
// found out the minimum and maximum ratings the newly added team should battle against
|
||||
// arenaRating is the rating of the latest joined team
|
||||
|
|
@ -1700,9 +1708,9 @@ void BattleGroundMgr::InitAutomaticArenaPointDistribution()
|
|||
void BattleGroundMgr::DistributeArenaPoints()
|
||||
{
|
||||
// used to distribute arena points based on last week's stats
|
||||
sWorld.SendGlobalText("Flushing Arena points based on team ratings, this may take a few minutes. Please stand by...", NULL);
|
||||
sWorld.SendWorldText(LANG_DIST_ARENA_POINTS_START);
|
||||
|
||||
sWorld.SendGlobalText("Distributing arena points to players...", NULL);
|
||||
sWorld.SendWorldText(LANG_DIST_ARENA_POINTS_ONLINE_START);
|
||||
|
||||
//temporary structure for storing maximum points to add values for all players
|
||||
std::map<uint32, uint32> PlayerPoints;
|
||||
|
|
@ -1729,9 +1737,9 @@ void BattleGroundMgr::DistributeArenaPoints()
|
|||
|
||||
PlayerPoints.clear();
|
||||
|
||||
sWorld.SendGlobalText("Finished setting arena points for online players.", NULL);
|
||||
sWorld.SendWorldText(LANG_DIST_ARENA_POINTS_ONLINE_END);
|
||||
|
||||
sWorld.SendGlobalText("Modifying played count, arena points etc. for loaded arena teams, sending updated stats to online players...", NULL);
|
||||
sWorld.SendWorldText(LANG_DIST_ARENA_POINTS_TEAM_START);
|
||||
for(ObjectMgr::ArenaTeamMap::iterator titr = objmgr.GetArenaTeamMapBegin(); titr != objmgr.GetArenaTeamMapEnd(); ++titr)
|
||||
{
|
||||
if(ArenaTeam * at = titr->second)
|
||||
|
|
@ -1742,9 +1750,9 @@ void BattleGroundMgr::DistributeArenaPoints()
|
|||
}
|
||||
}
|
||||
|
||||
sWorld.SendGlobalText("Modification done.", NULL);
|
||||
sWorld.SendWorldText(LANG_DIST_ARENA_POINTS_TEAM_END);
|
||||
|
||||
sWorld.SendGlobalText("Done flushing Arena points.", NULL);
|
||||
sWorld.SendWorldText(LANG_DIST_ARENA_POINTS_END);
|
||||
}
|
||||
|
||||
void BattleGroundMgr::BuildBattleGroundListPacket(WorldPacket *data, const uint64& guid, Player* plr, BattleGroundTypeId bgTypeId)
|
||||
|
|
@ -1899,18 +1907,18 @@ void BattleGroundMgr::ToggleTesting()
|
|||
{
|
||||
m_Testing = !m_Testing;
|
||||
if(m_Testing)
|
||||
sWorld.SendGlobalText("Battlegrounds are set to 1v0 for debugging.", NULL);
|
||||
sWorld.SendWorldText(LANG_DEBUG_BG_ON);
|
||||
else
|
||||
sWorld.SendGlobalText("Battlegrounds are set to normal playercount.", NULL);
|
||||
sWorld.SendWorldText(LANG_DEBUG_BG_OFF);
|
||||
}
|
||||
|
||||
void BattleGroundMgr::ToggleArenaTesting()
|
||||
{
|
||||
m_ArenaTesting = !m_ArenaTesting;
|
||||
if(m_ArenaTesting)
|
||||
sWorld.SendGlobalText("Arenas are set to 1v1 for debugging. So, don't join as group.", NULL);
|
||||
sWorld.SendWorldText(LANG_DEBUG_ARENA_ON);
|
||||
else
|
||||
sWorld.SendGlobalText("Arenas are set to normal playercount.", NULL);
|
||||
sWorld.SendWorldText(LANG_DEBUG_ARENA_OFF);
|
||||
}
|
||||
|
||||
uint32 BattleGroundMgr::GetMaxRatingDifference() const
|
||||
|
|
|
|||
|
|
@ -670,7 +670,17 @@ enum MangosStrings
|
|||
LANG_CANNOT_SUMMON_TO_BG = 734, // "You cannot summon players to a battleground or arena map."
|
||||
LANG_CANNOT_GO_TO_BG_GM = 735, // "You must be in GM mode to teleport to a player in a battleground."
|
||||
LANG_CANNOT_GO_TO_BG_FROM_BG = 736, // "You cannot teleport to a battleground from another battleground. Please leave the current battleground first."
|
||||
// Room for batleground/arena strings 737-799 not used
|
||||
LANG_DEBUG_ARENA_ON = 737,
|
||||
LANG_DEBUG_ARENA_OFF = 738,
|
||||
LANG_DEBUG_BG_ON = 739,
|
||||
LANG_DEBUG_BG_OFF = 740,
|
||||
LANG_DIST_ARENA_POINTS_START = 741,
|
||||
LANG_DIST_ARENA_POINTS_ONLINE_START = 742,
|
||||
LANG_DIST_ARENA_POINTS_ONLINE_END = 743,
|
||||
LANG_DIST_ARENA_POINTS_TEAM_START = 744,
|
||||
LANG_DIST_ARENA_POINTS_TEAM_END = 745,
|
||||
LANG_DIST_ARENA_POINTS_END = 746,
|
||||
// Room for batleground/arena strings 747-799 not used
|
||||
|
||||
// in game strings
|
||||
// = 800, not used
|
||||
|
|
|
|||
|
|
@ -2328,7 +2328,7 @@ void World::SendWorldText(int32 string_id, ...)
|
|||
delete data_cache[i][j];
|
||||
}
|
||||
|
||||
/// Send a System Message to all players (except self if mentioned)
|
||||
/// DEPRICATED, only for debug purpose. Send a System Message to all players (except self if mentioned)
|
||||
void World::SendGlobalText(const char* text, WorldSession *self)
|
||||
{
|
||||
WorldPacket data;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "7251"
|
||||
#define REVISION_NR "7252"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue