mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 19:37:02 +00:00
Merge branch 'master' into 303
Conflicts: src/game/CharacterHandler.cpp src/game/Chat.h src/game/Player.h src/game/World.h src/game/debugcmds.cpp
This commit is contained in:
commit
71b1065c8b
50 changed files with 3499 additions and 976 deletions
|
|
@ -912,6 +912,12 @@ void World::LoadConfigSettings(bool reload)
|
|||
m_configs[CONFIG_LISTEN_RANGE_TEXTEMOTE] = sConfig.GetIntDefault("ListenRange.TextEmote", 25);
|
||||
m_configs[CONFIG_LISTEN_RANGE_YELL] = sConfig.GetIntDefault("ListenRange.Yell", 300);
|
||||
|
||||
m_configs[CONFIG_ARENA_MAX_RATING_DIFFERENCE] = sConfig.GetIntDefault("Arena.MaxRatingDifference", 0);
|
||||
m_configs[CONFIG_ARENA_RATING_DISCARD_TIMER] = sConfig.GetIntDefault("Arena.RatingDiscardTimer",300000);
|
||||
m_configs[CONFIG_ARENA_AUTO_DISTRIBUTE_POINTS] = sConfig.GetBoolDefault("Arena.AutoDistributePoints", false);
|
||||
m_configs[CONFIG_ARENA_AUTO_DISTRIBUTE_INTERVAL_DAYS] = sConfig.GetIntDefault("Arena.AutoDistributeInterval", 7);
|
||||
|
||||
m_configs[CONFIG_BATTLEGROUND_PREMATURE_FINISH_TIMER] = sConfig.GetIntDefault("BattleGround.PrematureFinishTimer", 0);
|
||||
m_configs[CONFIG_INSTANT_LOGOUT] = sConfig.GetIntDefault("InstantLogout", SEC_MODERATOR);
|
||||
|
||||
m_VisibleUnitGreyDistance = sConfig.GetFloatDefault("Visibility.Distance.Grey.Unit", 1);
|
||||
|
|
@ -1322,6 +1328,7 @@ void World::SetInitialWorldSettings()
|
|||
///- Initialize Battlegrounds
|
||||
sLog.outString( "Starting BattleGround System" );
|
||||
sBattleGroundMgr.CreateInitialBattleGrounds();
|
||||
sBattleGroundMgr.InitAutomaticArenaPointDistribution();
|
||||
|
||||
//Not sure if this can be moved up in the sequence (with static data loading) as it uses MapManager
|
||||
sLog.outString( "Loading Transports..." );
|
||||
|
|
@ -2205,7 +2212,7 @@ void World::ScriptsProcess()
|
|||
void World::SendGlobalMessage(WorldPacket *packet, WorldSession *self, uint32 team)
|
||||
{
|
||||
SessionMap::iterator itr;
|
||||
for (itr = m_sessions.begin(); itr != m_sessions.end(); itr++)
|
||||
for (itr = m_sessions.begin(); itr != m_sessions.end(); ++itr)
|
||||
{
|
||||
if (itr->second &&
|
||||
itr->second->GetPlayer() &&
|
||||
|
|
@ -2272,11 +2279,29 @@ void World::SendWorldText(int32 string_id, ...)
|
|||
delete data_cache[i][j];
|
||||
}
|
||||
|
||||
/// Send a System Message to all players (except self if mentioned)
|
||||
void World::SendGlobalText(const char* text, WorldSession *self)
|
||||
{
|
||||
WorldPacket data;
|
||||
|
||||
// need copy to prevent corruption by strtok call in LineFromMessage original string
|
||||
char* buf = strdup(text);
|
||||
char* pos = buf;
|
||||
|
||||
while(char* line = ChatHandler::LineFromMessage(pos))
|
||||
{
|
||||
ChatHandler::FillMessageData(&data, NULL, CHAT_MSG_SYSTEM, LANG_UNIVERSAL, NULL, 0, line, NULL);
|
||||
SendGlobalMessage(&data, self);
|
||||
}
|
||||
|
||||
free(buf);
|
||||
}
|
||||
|
||||
/// Send a packet to all players (or players selected team) in the zone (except self if mentioned)
|
||||
void World::SendZoneMessage(uint32 zone, WorldPacket *packet, WorldSession *self, uint32 team)
|
||||
{
|
||||
SessionMap::iterator itr;
|
||||
for (itr = m_sessions.begin(); itr != m_sessions.end(); itr++)
|
||||
for (itr = m_sessions.begin(); itr != m_sessions.end(); ++itr)
|
||||
{
|
||||
if (itr->second &&
|
||||
itr->second->GetPlayer() &&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue