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,5 +1,4 @@
using System;
using System.Linq;
using Server.Gumps;
using Server.Misc;
using Server.Mobiles;
@ -21,13 +20,14 @@ namespace Server.Engines.MLQuests.Objectives
MLQuestContext context = MLQuestSystem.GetContext(pm);
if (context != null)
if (context.QuestInstances.Any(instance => instance.Quest.IsEscort))
{
if (message)
MLQuestSystem.Tell(quester, pm, 500896); // I see you already have an escort.
foreach (MLQuestInstance instance in context.QuestInstances)
if (instance.Quest.IsEscort)
{
if (message)
MLQuestSystem.Tell(quester, pm, 500896); // I see you already have an escort.
return false;
}
return false;
}
DateTime nextEscort = pm.LastEscortTime + BaseEscortable.EscortDelay;

View file

@ -1,5 +1,4 @@
using System;
using System.Linq;
using Server.Gumps;
using Server.Mobiles;
@ -92,21 +91,22 @@ namespace Server.Engines.MLQuests.Objectives
{
int desired = Objective.DesiredAmount;
if (Objective.AcceptedTypes.Any(acceptedType => acceptedType.IsAssignableFrom(type)))
{
if (Objective.Area?.Contains(mob) == false)
return false;
foreach (Type acceptedType in Objective.AcceptedTypes)
if (acceptedType.IsAssignableFrom(type))
{
if (Objective.Area?.Contains(mob) == false)
return false;
PlayerMobile pm = Instance.Player;
PlayerMobile pm = Instance.Player;
if (++Slain >= desired)
pm.SendLocalizedMessage(1075050); // You have killed all the required quest creatures of this type.
else
pm.SendLocalizedMessage(1075051,
(desired - Slain).ToString()); // You have killed a quest creature. ~1_val~ more left.
if (++Slain >= desired)
pm.SendLocalizedMessage(1075050); // You have killed all the required quest creatures of this type.
else
pm.SendLocalizedMessage(1075051,
(desired - Slain).ToString()); // You have killed a quest creature. ~1_val~ more left.
return true;
}
return true;
}
return false;
}