servuo/Scripts/Quests/Eodon/Hawkwind/Objective.cs
TrueUO 8b8519dba4
Bug Fixes (#4767)
Added removed mobiles to Spawner Persistence to remove them from spawners.
Re-Added harful effects for aura effect, reduced range to 3.
Various code cleanup.

Co-authored-by: TrueUO <knight.daniel.r@gmail.com>
2020-04-23 21:02:21 -07:00

46 lines
1.6 KiB
C#

using Server.Items;
using Server.Mobiles;
using System;
namespace Server.Engines.Quests.TimeLord
{
public class TimeForLegendsObjective : QuestObjective
{
public override object Message => 1156341; // Prove yourself to Hawkwind, defeat thy foe in order to begin your journey among the Legendary.
public override int MaxProgress => 1;
public override void RenderProgress(BaseQuestGump gump)
{
if (System is TimeForLegendsQuest)
{
TimeForLegendsQuest q = System as TimeForLegendsQuest;
if (q.ToSlay == null)
gump.AddHtmlObject(70, 260, 270, 100, Completed ? 1049077 : 1049078, BaseQuestGump.Blue, false, false);
else
{
int index = Array.IndexOf(TimeForLegendsQuest.Targets, q.ToSlay);
gump.AddHtmlObject(70, 260, 150, 100, index <= 13 ? 1156324 + index : 1156354 + (index - 14), BaseQuestGump.Blue, false, false);
gump.AddHtmlObject(230, 260, 10, 100, ":", BaseQuestGump.Blue, false, false);
gump.AddHtmlObject(235, 260, 150, 100, Completed ? 1046033 : 1046034, BaseQuestGump.Blue, false, false);
}
}
}
public override void OnKill(BaseCreature creature, Container corpse)
{
if (System is TimeForLegendsQuest && creature.GetType() == ((TimeForLegendsQuest)System).ToSlay)
{
Complete();
}
}
public override void Complete()
{
base.Complete();
System.Complete();
}
}
}