Modernization Fixes & Updates to Default Values (#3)

This commit is contained in:
Kamron Batman 2018-10-28 00:33:16 -07:00 • committed by GitHub
parent 445eddff68
commit dcf64091b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
768 changed files with 10507 additions and 14196 deletions

View file

@ -30,7 +30,7 @@ namespace Server.Engines.Quests.Necro
if (qs is DarkTidesQuest)
{
QuestObjective obj = qs.FindObjective(typeof(SpeakCavePasswordObjective));
QuestObjective obj = qs.FindObjective<SpeakCavePasswordObjective>();
if (obj != null && obj.Completed)
{

View file

@ -58,9 +58,9 @@ namespace Server.Engines.Quests.Necro
{
if (pm.Map == m_WellOfTearsMap && m_WellOfTearsArea.Contains(pm))
{
QuestObjective obj = qs.FindObjective(typeof(UseCallingScrollObjective));
QuestObjective obj = qs.FindObjective<UseCallingScrollObjective>();
if (obj != null && !obj.Completed)
if (obj?.Completed == false)
obj.Complete();
Delete();

View file

@ -31,9 +31,9 @@ namespace Server.Engines.Quests.Necro
if (qs is DarkTidesQuest)
{
QuestObjective obj = qs.FindObjective(typeof(FindCallingScrollObjective));
QuestObjective obj = qs.FindObjective<FindCallingScrollObjective>();
if (obj != null && !obj.Completed || DarkTidesQuest.HasLostCallingScroll(from))
if (obj?.Completed == false || DarkTidesQuest.HasLostCallingScroll(from))
{
Item scroll = new KronusScroll();
@ -42,7 +42,7 @@ namespace Server.Engines.Quests.Necro
pm.SendLocalizedMessage(1060120, "",
0x41); // You rummage through the scrolls until you find the Scroll of Calling. You quickly put it in your pack.
if (obj != null && !obj.Completed)
if (obj?.Completed == false)
obj.Complete();
}
else

View file

@ -34,14 +34,10 @@ namespace Server.Engines.Quests.Necro
if (Maabus != null || SpawnLocation == Point3D.Zero)
return;
foreach (MaabusCoffinComponent c in Components)
c.TurnToEmpty();
Maabus = new Maabus();
Maabus.Location = SpawnLocation;
Maabus.Map = Map;
foreach (AddonComponent c in Components)
(c as MaabusCoffinComponent)?.TurnToEmpty();
Maabus = new Maabus { Location = SpawnLocation, Map = Map };
Maabus.Direction = Maabus.GetDirectionTo(caller);
Timer.DelayCall(TimeSpan.FromSeconds(7.5), BeginSleep);

View file

@ -34,9 +34,9 @@ namespace Server.Engines.Quests.Necro
if (qs is DarkTidesQuest)
{
QuestObjective obj = qs.FindObjective(typeof(RetrieveAbraxusScrollObjective));
QuestObjective obj = qs.FindObjective<RetrieveAbraxusScrollObjective>();
if (obj != null && !obj.Completed)
if (obj?.Completed == false)
obj.Complete();
}
}
@ -54,9 +54,9 @@ namespace Server.Engines.Quests.Necro
if (qs is DarkTidesQuest)
{
QuestObjective obj = qs.FindObjective(typeof(ReadAbraxusScrollObjective));
QuestObjective obj = qs.FindObjective<ReadAbraxusScrollObjective>();
if (obj != null && !obj.Completed)
if (obj?.Completed == false)
obj.Complete();
}
}