aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMachiavelli <none@none>2010-03-20 17:51:23 +0100
committerMachiavelli <none@none>2010-03-20 17:51:23 +0100
commitb651b592ef49faf93c82548398a96aab940e404a (patch)
treeea26f39ff990b1660f73fd749c7c0089f4d1df86 /src
parentd21f0c3ce857699950b978f33163fc6e7b18a067 (diff)
Fix arena point calculation. If the configured arena season is >= 5, teams below 1500 rating should get a fixed amount of points, equal to the amount of points a person with 1500 rating would get.
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/ArenaTeam.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/game/ArenaTeam.cpp b/src/game/ArenaTeam.cpp
index 05a6a8fd75b..2512d20115b 100644
--- a/src/game/ArenaTeam.cpp
+++ b/src/game/ArenaTeam.cpp
@@ -518,15 +518,20 @@ uint32 ArenaTeam::GetPoints(uint32 MemberRating)
uint32 rating = MemberRating + 150 < m_stats.rating ? MemberRating : m_stats.rating;
- if(rating<=1500)
- points = (float)rating * 0.22f + 14.0f;
+ if (rating<=1500)
+ {
+ if (sWorld.getConfig(CONFIG_ARENA_SEASON_ID) < 5)
+ points = (float)rating * 0.22f + 14.0f;
+ else
+ points = 344;
+ }
else
points = 1511.26f / (1.0f + 1639.28f * exp(-0.00412f * (float)rating));
// type penalties for <5v5 teams
- if(m_Type == ARENA_TEAM_2v2)
+ if (m_Type == ARENA_TEAM_2v2)
points *= 0.76f;
- else if(m_Type == ARENA_TEAM_3v3)
+ else if (m_Type == ARENA_TEAM_3v3)
points *= 0.88f;
return (uint32) points;