Adds style cop (#109)

This commit is contained in:
Kamron Batman 2020-04-26 00:16:02 -07:00 committed by GitHub
parent 3e715bcb60
commit 556a17aba8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1725 changed files with 33831 additions and 38046 deletions

View file

@ -6,8 +6,7 @@ namespace Server.Engines.MLQuests.Objectives
{
public class KillObjective : BaseObjective
{
public KillObjective(
public KillObjective(
int amount = 0, Type[] types = null, TextDefinition name = null, QuestArea area = null)
{
DesiredAmount = amount;
@ -16,13 +15,13 @@ namespace Server.Engines.MLQuests.Objectives
Area = area;
}
public int DesiredAmount{ get; set; }
public int DesiredAmount { get; set; }
public Type[] AcceptedTypes{ get; set; }
public Type[] AcceptedTypes { get; set; }
public TextDefinition Name{ get; set; }
public TextDefinition Name { get; set; }
public QuestArea Area{ get; set; }
public QuestArea Area { get; set; }
public override void WriteToGump(Gump g, ref int y)
{
@ -38,8 +37,6 @@ namespace Server.Engines.MLQuests.Objectives
y += 16;
#region Location
if (Area != null)
{
g.AddHtmlLocalized(103, y, 312, 20, 1018327, 0x15F90); // Location
@ -51,15 +48,11 @@ namespace Server.Engines.MLQuests.Objectives
y += 16;
}
#endregion
}
public override BaseObjectiveInstance CreateInstance(MLQuestInstance instance) => new KillObjectiveInstance(this, instance);
}
#region Timed
public class TimedKillObjective : KillObjective
{
public TimedKillObjective(TimeSpan duration, int amount, Type[] types, TextDefinition name, QuestArea area = null)
@ -67,11 +60,9 @@ namespace Server.Engines.MLQuests.Objectives
Duration = duration;
public override bool IsTimed => true;
public override TimeSpan Duration{ get; }
public override TimeSpan Duration { get; }
}
#endregion
public class KillObjectiveInstance : BaseObjectiveInstance
{
public KillObjectiveInstance(KillObjective objective, MLQuestInstance instance)
@ -81,9 +72,9 @@ namespace Server.Engines.MLQuests.Objectives
Slain = 0;
}
public KillObjective Objective{ get; set; }
public KillObjective Objective { get; set; }
public int Slain{ get; set; }
public int Slain { get; set; }
public override DataType ExtraDataType => DataType.KillObjective;