mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-23 13:15:53 +12:00
Fix crashing on talking to npcs with 0 chatpoints.
This commit is contained in:
parent
d776d2adc3
commit
fa8f21388c
8 changed files with 214 additions and 10 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue