mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 10:26:28 +01:00
*Fix the bug that players gain huge rating when losing a arena game.
--HG-- branch : trunk
This commit is contained in:
@@ -101,10 +101,8 @@ struct ArenaTeamMember
|
||||
|
||||
void ModifyPersonalRating(Player* plr, int32 mod, uint32 slot)
|
||||
{
|
||||
if (int32(personal_rating) + mod < 0)
|
||||
personal_rating = 0;
|
||||
else
|
||||
personal_rating += mod;
|
||||
int32 rating = int32(personal_rating) + mod;
|
||||
personal_rating = rating < 0 ? 0 : rating;
|
||||
if(plr)
|
||||
plr->SetUInt32Value(PLAYER_FIELD_ARENA_TEAM_INFO_1_1 + (slot*6) + 5, personal_rating);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user