mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 08:55:32 +01:00
Core/Achievements: Fixed achieements with ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_PERSONAL_RATING
closes #2021 Signed-off-by: Subv2112 <s.v.h21@hotmail.com>
This commit is contained in:
@@ -455,7 +455,7 @@ void ArenaTeam::Inspect(WorldSession* session, uint64 guid)
|
||||
session->SendPacket(&data);
|
||||
}
|
||||
|
||||
void ArenaTeamMember::ModifyPersonalRating(Player* player, int32 mod, uint32 slot)
|
||||
void ArenaTeamMember::ModifyPersonalRating(Player* player, int32 mod, uint32 type)
|
||||
{
|
||||
if (int32(PersonalRating) + mod < 0)
|
||||
PersonalRating = 0;
|
||||
@@ -465,7 +465,7 @@ void ArenaTeamMember::ModifyPersonalRating(Player* player, int32 mod, uint32 slo
|
||||
if (player)
|
||||
{
|
||||
player->SetArenaTeamInfoField(slot, ARENA_TEAM_PERSONAL_RATING, PersonalRating);
|
||||
player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_PERSONAL_RATING, PersonalRating, slot);
|
||||
player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_PERSONAL_RATING, PersonalRating, type);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -725,7 +725,7 @@ void ArenaTeam::MemberLost(Player* player, uint32 againstMatchmakerRating, int32
|
||||
{
|
||||
// Update personal rating
|
||||
int32 mod = GetRatingMod(itr->PersonalRating, againstMatchmakerRating, false);
|
||||
itr->ModifyPersonalRating(player, mod, GetSlot());
|
||||
itr->ModifyPersonalRating(player, mod, GetType());
|
||||
|
||||
// Update matchmaker rating
|
||||
itr->ModifyMatchmakerRating(MatchmakerRatingChange, GetSlot());
|
||||
@@ -751,7 +751,7 @@ void ArenaTeam::OfflineMemberLost(uint64 guid, uint32 againstMatchmakerRating, i
|
||||
{
|
||||
// update personal rating
|
||||
int32 mod = GetRatingMod(itr->PersonalRating, againstMatchmakerRating, false);
|
||||
itr->ModifyPersonalRating(NULL, mod, GetSlot());
|
||||
itr->ModifyPersonalRating(NULL, mod, GetType());
|
||||
|
||||
// update matchmaker rating
|
||||
itr->ModifyMatchmakerRating(MatchmakerRatingChange, GetSlot());
|
||||
@@ -773,7 +773,7 @@ void ArenaTeam::MemberWon(Player* player, uint32 againstMatchmakerRating, int32
|
||||
{
|
||||
// update personal rating
|
||||
int32 mod = GetRatingMod(itr->PersonalRating, againstMatchmakerRating, true);
|
||||
itr->ModifyPersonalRating(player, mod, GetSlot());
|
||||
itr->ModifyPersonalRating(player, mod, GetType());
|
||||
|
||||
// update matchmaker rating
|
||||
itr->ModifyMatchmakerRating(MatchmakerRatingChange, GetSlot());
|
||||
|
||||
@@ -97,7 +97,7 @@ struct ArenaTeamMember
|
||||
uint16 PersonalRating;
|
||||
uint16 MatchMakerRating;
|
||||
|
||||
void ModifyPersonalRating(Player* player, int32 mod, uint32 slot);
|
||||
void ModifyPersonalRating(Player* player, int32 mod, uint32 type);
|
||||
void ModifyMatchmakerRating(int32 mod, uint32 slot);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user