Replace most T.Parse with T.TryParse for all user input.

This commit is contained in:
hondacrx
2017-11-05 15:21:29 -05:00
parent 8c863de8a6
commit 8ed446ae7a
40 changed files with 477 additions and 527 deletions
@@ -720,7 +720,10 @@ namespace Game.Achievements
ca.Date = achievementResult.Read<uint>(1);
var guids = new StringArray(achievementResult.Read<string>(2), ' ');
for (int i = 0; i < guids.Length; ++i)
ca.CompletingPlayers.Add(ObjectGuid.Create(HighGuid.Player, ulong.Parse(guids[i])));
{
if (ulong.TryParse(guids[i], out ulong guid))
ca.CompletingPlayers.Add(ObjectGuid.Create(HighGuid.Player, guid));
}
ca.Changed = false;