Core/Arena/Logging:
* Implement option for extended arena match info for each player (guid, name, team, IP, healing/damage done, killing blows) [disabled by default] * Fix logging for rating change, winner and loser get different ratings with the new arena system --HG-- branch : trunk
This commit is contained in:
@@ -738,7 +738,17 @@ void Battleground::EndBattleground(uint32 winner)
|
||||
SetArenaTeamRatingChangeForTeam(GetOtherTeam(winner), loser_change);
|
||||
SetArenaMatchmakerRating(winner, winner_matchmaker_rating);
|
||||
SetArenaMatchmakerRating(GetOtherTeam(winner), loser_matchmaker_rating);
|
||||
sLog.outArena("Arena match Type: %u for Team1Id: %u - Team2Id: %u ended. WinnerTeamId: %u. RatingChange: %i.", m_ArenaType, m_ArenaTeamIds[BG_TEAM_ALLIANCE], m_ArenaTeamIds[BG_TEAM_HORDE], winner_arena_team->GetId(), winner_change);
|
||||
sLog.outArena("Arena match Type: %u for Team1Id: %u - Team2Id: %u ended. WinnerTeamId: %u. Winner rating: +%d, Loser rating: %d", m_ArenaType, m_ArenaTeamIds[BG_TEAM_ALLIANCE], m_ArenaTeamIds[BG_TEAM_HORDE], winner_arena_team->GetId(), winner_change, loser_change);
|
||||
if (sWorld.getBoolConfig(CONFIG_ARENA_LOG_EXTENDED_INFO))
|
||||
for (Battleground::BattlegroundScoreMap::const_iterator itr = GetPlayerScoresBegin(); itr != GetPlayerScoresEnd(); itr++)
|
||||
if (Player* player = sObjectMgr.GetPlayer(itr->first))
|
||||
{
|
||||
std::string last_ip = "<unknown>";
|
||||
QueryResult_AutoPtr result = LoginDatabase.PQuery("SELECT last_ip FROM account WHERE id = %u", player->GetSession()->GetAccountId());
|
||||
if (result)
|
||||
last_ip = (result->Fetch())[0].GetCppString();
|
||||
sLog.outArena("Statistics for %s (GUID: %llu, Team: %d, IP: %s): %u damage, %u healing, %u killing blows", player->GetName(), itr->first, player->GetArenaTeamId(m_ArenaType == 5 ? 2 : m_ArenaType == 3), last_ip.c_str(), itr->second->DamageDone, itr->second->HealingDone, itr->second->KillingBlows);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1045,6 +1045,7 @@ void World::LoadConfigSettings(bool reload)
|
||||
m_int_configs[CONFIG_ARENA_START_RATING] = sConfig.GetIntDefault ("Arena.ArenaStartRating", 0);
|
||||
m_int_configs[CONFIG_ARENA_START_PERSONAL_RATING] = sConfig.GetIntDefault ("Arena.ArenaStartPersonalRating", 0);
|
||||
m_bool_configs[CONFIG_ARENA_SEASON_IN_PROGRESS] = sConfig.GetBoolDefault("Arena.ArenaSeason.InProgress", true);
|
||||
m_bool_configs[CONFIG_ARENA_LOG_EXTENDED_INFO] = sConfig.GetBoolDefault("ArenaLog.ExtendedInfo", false);
|
||||
|
||||
m_bool_configs[CONFIG_OFFHAND_CHECK_AT_SPELL_UNLEARN] = sConfig.GetBoolDefault("OffhandCheckAtSpellUnlearn", true);
|
||||
|
||||
|
||||
@@ -141,6 +141,7 @@ enum WorldBoolConfigs
|
||||
CONFIG_ARENA_QUEUE_ANNOUNCER_ENABLE,
|
||||
CONFIG_ARENA_QUEUE_ANNOUNCER_PLAYERONLY,
|
||||
CONFIG_ARENA_SEASON_IN_PROGRESS,
|
||||
CONFIG_ARENA_LOG_EXTENDED_INFO,
|
||||
CONFIG_OFFHAND_CHECK_AT_SPELL_UNLEARN,
|
||||
CONFIG_VMAP_INDOOR_CHECK,
|
||||
CONFIG_PET_LOS,
|
||||
|
||||
@@ -412,6 +412,11 @@ CleanCharacterDB = 0
|
||||
# Log file of arena fights and arena team creations
|
||||
# Default: "" - do not create arena log file
|
||||
#
|
||||
# ArenaLog.ExtendedInfo
|
||||
# Include extended info for each player after rated arena (guid, name, team, IP, healing/damage done, killing blows)
|
||||
# Default: 0 - disabled
|
||||
# 1 - enabled
|
||||
#
|
||||
# SQLDriverLogFile
|
||||
# Log file of SQL driver events.
|
||||
# For effective query logging you need to build in debug configuration.
|
||||
@@ -545,6 +550,7 @@ GmLogTimestamp = 0
|
||||
GmLogPerAccount = 0
|
||||
RaLogFile = "ra_commands.log"
|
||||
ArenaLogFile = ""
|
||||
ArenaLog.ExtendedInfo = 0
|
||||
SQLDriverLogFile = ""
|
||||
LogColors = ""
|
||||
EnableLogDB = 0
|
||||
|
||||
Reference in New Issue
Block a user