diff options
author | Rat <none@none> | 2010-05-04 16:53:19 +0200 |
---|---|---|
committer | Rat <none@none> | 2010-05-04 16:53:19 +0200 |
commit | 9207757861b2c8670c68d23b6fb36e795c958af3 (patch) | |
tree | 4ab1c95ca876908ce7facc848bffd8a2853b4ca6 | |
parent | 1677e6e5ec27fb430ef73d62f1499eec51dc29e4 (diff) |
ALWAYS use starting personal rating from config IF greater then 0, thanks to Gyullo
using 0 will let core calculate it
--HG--
branch : trunk
-rw-r--r-- | src/game/ArenaTeam.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/game/ArenaTeam.cpp b/src/game/ArenaTeam.cpp index 9b6327d1f08..eda36f886e5 100644 --- a/src/game/ArenaTeam.cpp +++ b/src/game/ArenaTeam.cpp @@ -145,9 +145,9 @@ bool ArenaTeam::AddMember(const uint64& PlayerGuid) newmember.games_week = 0; newmember.wins_season = 0; newmember.wins_week = 0; - if (sWorld.getConfig(CONFIG_ARENA_START_PERSONAL_RATING) >= 0) - newmember.personal_rating = sWorld.getConfig(CONFIG_ARENA_START_PERSONAL_RATING); - else if (sWorld.getConfig(CONFIG_ARENA_SEASON_ID) >= 6) + newmember.personal_rating = 0; + + if (sWorld.getConfig(CONFIG_ARENA_SEASON_ID) >= 6) { if (GetRating() < 1000) newmember.personal_rating = GetRating(); @@ -156,6 +156,10 @@ bool ArenaTeam::AddMember(const uint64& PlayerGuid) } else newmember.personal_rating = 1500; + + if (sWorld.getConfig(CONFIG_ARENA_START_PERSONAL_RATING) > 0) + newmember.personal_rating = sWorld.getConfig(CONFIG_ARENA_START_PERSONAL_RATING); + m_members.push_back(newmember); CharacterDatabase.PExecute("INSERT INTO arena_team_member (arenateamid, guid, personal_rating) VALUES ('%u', '%u', '%u')", m_TeamId, GUID_LOPART(newmember.guid), newmember.personal_rating); |