Skip to content

Commit

Permalink
[PvPPunishment,PvPLeaderboard] Fixed an issue with highest gear score…
Browse files Browse the repository at this point in the history
… retrieval
  • Loading branch information
WhiteFang5 committed Jul 30, 2022
1 parent 76fa7e1 commit d6f0587
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Shared/HighestGearScoreSystem/HighestGearScoreSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,18 @@ public static void Save()
public static float GetCurrentOrHighestGearScore(FromCharacter fromCharacter)
{
var entityManager = VWorld.Server.EntityManager;
var currentGS = GetCurrentGearScore(fromCharacter, entityManager);
if(HighestGearScoreSystemConfig.HighestGearScoreSystemEnabled.Value)
{
PruneHighestGearScores();

var user = entityManager.GetComponentData<User>(fromCharacter.User);
if(_gearScoreData.TryGetValue(user.PlatformId, out var gearScoreData))
{
return gearScoreData.HighestGearScore;
return Math.Max(currentGS, gearScoreData.HighestGearScore);
}
}
return GetCurrentGearScore(fromCharacter, entityManager);
return currentGS;
}

public static float GetCurrentGearScore(FromCharacter fromCharacter, EntityManager entityManager)
Expand Down

0 comments on commit d6f0587

Please sign in to comment.