Revert "Updates Packets & Randomizer (#43)" (#61)

This reverts commit 179cb50557.
This commit is contained in:
Kamron Batman 2019-11-11 08:46:11 -08:00 • committed by GitHub
parent 179cb50557
commit c2ecc76457
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
588 changed files with 16260 additions and 10926 deletions

View file

@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Server.Engines.MLQuests.Definitions;
using Server.Engines.MLQuests.Gumps;
using Server.Items;
@ -136,7 +135,20 @@ namespace Server.Engines.MLQuests.Mobiles
{
MLQuestContext context = MLQuestSystem.GetContext(pm);
return context == null ? 0 : Needed.Select(MLQuestSystem.FindQuest).Count(quest => quest == null || context.HasDoneQuest(quest));
if (context == null)
return 0;
int result = 0;
foreach (Type type in Needed)
{
MLQuest quest = MLQuestSystem.FindQuest(type);
if (quest == null || context.HasDoneQuest(quest))
++result;
}
return result;
}
public virtual void OnComplete(PlayerMobile pm)