Handle ToLower neutrally across all locales (#412)

This commit is contained in:
Archangel
2025-07-03 18:27:41 +02:00
parent 939198026f
commit 79489eadce
38 changed files with 106 additions and 104 deletions
@@ -446,8 +446,8 @@ public class LocationLifecycleService
// ServerId has various info stored in it, delimited by a period
var serverDetails = request.ServerId.Split(".");
var locationName = serverDetails[0].ToLower();
var isPmc = serverDetails[1].ToLower().Contains("pmc");
var locationName = serverDetails[0].ToLowerInvariant();
var isPmc = serverDetails[1].ToLowerInvariant().Contains("pmc");
var isDead = IsPlayerDead(request.Results);
var isTransfer = IsMapToMapTransfer(request.Results);
var isSurvived = IsPlayerSurvived(request.Results);
@@ -554,7 +554,7 @@ public class LocationLifecycleService
return false;
}
if (extractName.ToLower().Contains("v-ex"))
if (extractName.ToLowerInvariant().Contains("v-ex"))
{
return true;
}
@@ -1018,7 +1018,7 @@ public class LocationLifecycleService
var roles = new List<string> { "pmcbear", "pmcusec" };
var victims = postRaidProfile
.Stats.Eft.Victims.Where(victim => roles.Contains(victim.Role.ToLower()))
.Stats.Eft.Victims.Where(victim => roles.Contains(victim.Role.ToLowerInvariant()))
.ToList();
if (victims?.Count > 0)
// Player killed PMCs, send some mail responses to them