diff --git a/src/game/ArenaTeam.cpp b/src/game/ArenaTeam.cpp index 4fe4fcb2c..df1fc7d9f 100644 --- a/src/game/ArenaTeam.cpp +++ b/src/game/ArenaTeam.cpp @@ -561,7 +561,7 @@ int32 ArenaTeam::LostAgainst(uint32 againstRating) float chance = GetChanceAgainst(m_stats.rating, againstRating); float K = (m_stats.rating < 1000) ? 48.0f : 32.0f; // calculate the rating modification (ELO system with k=32 or k=48 if rating<1000) - int32 mod = (int32)floor(K* (1.0f - chance)); + int32 mod = (int32)ceil(K * (0.0f - chance)); // modify the team stats accordingly FinishGame(mod); @@ -578,9 +578,9 @@ void ArenaTeam::MemberLost(Player * plr, uint32 againstRating) { // update personal rating float chance = GetChanceAgainst(itr->personal_rating, againstRating); - float K = (m_stats.rating < 1000) ? 48.0f : 32.0f; + float K = (itr->personal_rating < 1000) ? 48.0f : 32.0f; // calculate the rating modification (ELO system with k=32 or k=48 if rating<1000) - int32 mod = (int32)floor(K* (1.0f - chance)); + int32 mod = (int32)ceil(K * (0.0f - chance)); itr->ModifyPersonalRating(plr, mod, GetSlot()); // update personal played stats itr->games_week += 1; @@ -602,9 +602,9 @@ void ArenaTeam::OfflineMemberLost(uint64 guid, uint32 againstRating) { // update personal rating float chance = GetChanceAgainst(itr->personal_rating, againstRating); - float K = (m_stats.rating < 1000) ? 48.0f : 32.0f; + float K = (itr->personal_rating < 1000) ? 48.0f : 32.0f; // calculate the rating modification (ELO system with k=32 or k=48 if rating<1000) - int32 mod = (int32)floor(K* (1.0f - chance)); + int32 mod = (int32)ceil(K * (0.0f - chance)); if (int32(itr->personal_rating) + mod < 0) itr->personal_rating = 0; else @@ -626,7 +626,7 @@ void ArenaTeam::MemberWon(Player * plr, uint32 againstRating) { // update personal rating float chance = GetChanceAgainst(itr->personal_rating, againstRating); - float K = (m_stats.rating < 1000) ? 48.0f : 32.0f; + float K = (itr->personal_rating < 1000) ? 48.0f : 32.0f; // calculate the rating modification (ELO system with k=32 or k=48 if rating<1000) int32 mod = (int32)floor(K* (1.0f - chance)); itr->ModifyPersonalRating(plr, mod, GetSlot()); diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index da5c412c2..e054693fc 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "8779" + #define REVISION_NR "8780" #endif // __REVISION_NR_H__