mirror of
https://github.com/islehorse/HISP.git
synced 2025-06-20 09:45:19 +12:00
Maybe? NPC Randomly Wander..
This commit is contained in:
parent
f20e67bfd6
commit
0767f82299
4 changed files with 124 additions and 14 deletions
|
@ -121,19 +121,19 @@ namespace HISP.Game
|
|||
|
||||
public static bool CanComplete(User user, QuestEntry quest)
|
||||
{
|
||||
// Has completed other required quests?
|
||||
foreach (int questId in quest.RequiresQuestIdCompleted)
|
||||
if (user.Quests.GetTrackedQuestAmount(questId) < 1)
|
||||
return false;
|
||||
|
||||
// Has NOT competed other MUST NOT BE required quests
|
||||
foreach (int questId in quest.RequiresQuestIdNotCompleted)
|
||||
if (user.Quests.GetTrackedQuestAmount(questId) > 1)
|
||||
return false;
|
||||
|
||||
if (quest.Tracked)
|
||||
{
|
||||
|
||||
// Has completed other required quests?
|
||||
foreach (int questId in quest.RequiresQuestIdCompleted)
|
||||
if (user.Quests.GetTrackedQuestAmount(questId) < 1)
|
||||
return false;
|
||||
|
||||
// Has NOT competed other MUST NOT BE required quests
|
||||
foreach (int questId in quest.RequiresQuestIdNotCompleted)
|
||||
if (user.Quests.GetTrackedQuestAmount(questId) > 1)
|
||||
return false;
|
||||
|
||||
// Has allready tracked this quest?
|
||||
if (user.Quests.GetTrackedQuestAmount(quest.Id) >= quest.MaxRepeats)
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue