Skip to content

Commit

Permalink
- will only parse up to the first 3 bonus stats to send to client as …
Browse files Browse the repository at this point in the history
…was intended originally
  • Loading branch information
mfoltz committed Sep 15, 2024
1 parent a7f62e6 commit 767fa88
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions Services/EclipseService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,12 @@ public static void SendClientProgress(Entity character, ulong SteamID)

if (SteamID.TryGetPlayerBloodStats(out var bloodStats) && bloodStats.TryGetValue(bloodType, out var stats))
{
// need to get a 00 value for each stat and add them together but not literally, just concatenating
if (stats.Count != 0) bonusStats = int.Parse(string.Join("", stats.Select(stat => ((int)stat + 1).ToString("D2"))));
//if (stats.Count != 0) bonusStats = int.Parse(string.Join("", stats.Select(stat => ((int)stat + 1).ToString("D2"))));
var limitedStats = stats.Take(3).Select(stat => ((int)stat + 1).ToString("D2"));
if (limitedStats.Any())
{
bonusStats = int.Parse(string.Join("", limitedStats));
}
}
}
else if (bloodType.Equals(BloodType.None))
Expand Down Expand Up @@ -180,8 +184,12 @@ public static void SendClientProgress(Entity character, ulong SteamID)

if (SteamID.TryGetPlayerWeaponStats(out var weaponStats) && weaponStats.TryGetValue(weaponType, out var stats))
{
// need to get a 00 value for each stat and add them together but not literally, just concatenating
if (stats.Count != 0) bonusStats = int.Parse(string.Join("", stats.Select(stat => ((int)stat + 1).ToString("D2"))));
//if (stats.Count != 0) bonusStats = int.Parse(string.Join("", stats.Select(stat => ((int)stat + 1).ToString("D2"))));
var limitedStats = stats.Take(3).Select(stat => ((int)stat + 1).ToString("D2"));
if (limitedStats.Any())
{
bonusStats = int.Parse(string.Join("", limitedStats));
}
}
}
}
Expand Down

0 comments on commit 767fa88

Please sign in to comment.