Fix crashing on talking to npcs with 0 chatpoints.

This commit is contained in:
SilicaAndPina 2021-02-09 21:25:12 +13:00
parent d776d2adc3
commit fa8f21388c
8 changed files with 214 additions and 10 deletions

View file

@ -235,7 +235,7 @@ namespace HISP.Game
}
// Check if award unlocked
int questPointsPercent = Convert.ToInt32(Math.Floor(((decimal)user.QuestPoints / (decimal)GetTotalQuestPoints()) * (decimal)100.0));
int questPointsPercent = Convert.ToInt32(Math.Floor(((decimal)user.QuestPoints / (decimal)GetTotalQuestPoints()) * (decimal)100.0));
if (questPointsPercent >= 25)
user.Awards.AddAward(Award.GetAwardById(1)); // 25% Quest Completion Award.
if (questPointsPercent >= 50)