fix "a/an" and crashing

This commit is contained in:
SilicaAndPina 2021-02-19 21:42:13 +13:00
parent ff91d7bafb
commit 905dc1a6ce
5 changed files with 49 additions and 30 deletions

View file

@ -740,7 +740,8 @@ namespace HISP.Game
message = Messages.HorsesHere;
foreach (WildHorse horse in horses)
{
message += Messages.FormatWildHorse(horse.Instance.Name, horse.Instance.Breed.Name, horse.Instance.RandomId);
bool vowel = (horse.Instance.Breed.Name[0].ToString().ToLower() == "a" || horse.Instance.Breed.Name[0].ToString().ToLower() == "i" || horse.Instance.Breed.Name[0].ToString().ToLower() == "u" || horse.Instance.Breed.Name[0].ToString().ToLower() == "e" || horse.Instance.Breed.Name[0].ToString().ToLower() == "o");
message += Messages.FormatWildHorse(horse.Instance.Name, horse.Instance.Breed.Name, horse.Instance.RandomId, vowel);
}
}
return message;