From 0a1d017b7d1f222a83bda8d5fc4f964ad2612c37 Mon Sep 17 00:00:00 2001 From: Liberate Date: Thu, 7 Oct 2010 16:49:35 +0200 Subject: [PATCH] Core/Arena: Add a missing change from revision 6802b3bf07. Also personal rating should now start at 1k again if the team rating is over 1k and a new member joins the team (and the start personal rating is set to 0 in the config). Fixes issue #4283 --HG-- branch : trunk --- src/server/game/Battlegrounds/ArenaTeam.cpp | 9 ++++++++- src/server/game/Battlegrounds/ArenaTeam.h | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/server/game/Battlegrounds/ArenaTeam.cpp b/src/server/game/Battlegrounds/ArenaTeam.cpp index 4823b159d1..0e22125685 100755 --- a/src/server/game/Battlegrounds/ArenaTeam.cpp +++ b/src/server/game/Battlegrounds/ArenaTeam.cpp @@ -140,7 +140,14 @@ bool ArenaTeam::AddMember(const uint64& PlayerGuid) } plMMRating = sWorld.getIntConfig(CONFIG_ARENA_START_MATCHMAKER_RATING); - plPRating = sWorld.getIntConfig(CONFIG_ARENA_START_PERSONAL_RATING); + plPRating = 0; + + if (sWorld.getIntConfig(CONFIG_ARENA_START_PERSONAL_RATING) > 0) + plPRating = sWorld.getIntConfig(CONFIG_ARENA_START_PERSONAL_RATING); + else if (GetRating() >= 1000) + plPRating = 1000; + + sWorld.getIntConfig(CONFIG_ARENA_START_PERSONAL_RATING); QueryResult result = CharacterDatabase.PQuery("SELECT matchmaker_rating FROM character_arena_stats WHERE guid='%u' AND slot='%u'", GUID_LOPART(PlayerGuid), GetSlot()); if (result) diff --git a/src/server/game/Battlegrounds/ArenaTeam.h b/src/server/game/Battlegrounds/ArenaTeam.h index 9a9c9ab40d..1df98fa978 100755 --- a/src/server/game/Battlegrounds/ArenaTeam.h +++ b/src/server/game/Battlegrounds/ArenaTeam.h @@ -202,7 +202,7 @@ class ArenaTeam void MemberWon(Player * plr, uint32 againstMatchmakerRating, int32 teamratingchange = 12); int32 LostAgainst(uint32 againstRating); void MemberLost(Player * plr, uint32 againstMatchmakerRating, int32 teamratingchange = -12); - void OfflineMemberLost(uint64 guid, uint32 againstMatchmakerRating, int32 teamratingchange = 12); + void OfflineMemberLost(uint64 guid, uint32 againstMatchmakerRating, int32 teamratingchange = -12); void UpdateArenaPointsHelper(std::map & PlayerPoints);