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

@ -86,7 +86,14 @@ namespace Server.Engines.MLQuests
public virtual int Version => 0;
public bool HasObjective<T>() where T : BaseObjective => Objectives.OfType<T>().Any();
public bool HasObjective<T>() where T : BaseObjective
{
foreach (BaseObjective obj in Objectives)
if (obj is T)
return true;
return false;
}
public virtual void Generate()
{
@ -144,7 +151,11 @@ namespace Server.Engines.MLQuests
}
}
return Objectives.All(obj => obj.CanOffer(quester, pm, message));
foreach (BaseObjective obj in Objectives)
if (!obj.CanOffer(quester, pm, message))
return false;
return true;
}
public virtual void SendOffer(IQuestGiver quester, PlayerMobile pm)