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

@ -55,20 +55,18 @@ namespace Server.Engines.Quests.Doom
Effects.PlaySound(GetWorldLocation(), Map, 0x100);
Timer.DelayCall(TimeSpan.FromSeconds(8.0), new TimerStateCallback(EndSummon), from);
Timer.DelayCall(TimeSpan.FromSeconds(8.0), () => EndSummon(from));
}
}
public virtual void EndSummon(object state)
public virtual void EndSummon(Mobile from)
{
Mobile from = (Mobile)state;
if (Chyloth != null && !Chyloth.Deleted)
if (Chyloth?.Deleted == false)
{
from.SendLocalizedMessage(
1050010); // The ferry man has already been summoned. There is no need to ring for him again.
}
else if (Dragon != null && !Dragon.Deleted)
else if (Dragon?.Deleted == false)
{
from.SendLocalizedMessage(
1050017); // The ferryman has recently been summoned already. You decide against ringing the bell again so soon.

View file

@ -188,7 +188,7 @@ namespace Server.Engines.Quests.Doom
if (AngryAt == member)
AngryAt = null;
member.CloseGump(typeof(ChylothPartyGump));
member.CloseGump<ChylothPartyGump>();
member.SendGump(new ChylothPartyGump(from, member));
}
}

View file

@ -76,9 +76,9 @@ namespace Server.Engines.Quests.Doom
if (qs is TheSummoningQuest)
if (dropped is DaemonBone bones)
{
QuestObjective obj = qs.FindObjective(typeof(CollectBonesObjective));
QuestObjective obj = qs.FindObjective<CollectBonesObjective>();
if (obj != null && !obj.Completed)
if (obj?.Completed == false)
{
int need = obj.MaxProgress - obj.CurProgress;

View file

@ -75,7 +75,7 @@ namespace Server.Engines.Quests.Doom
{
base.Cancel();
QuestObjective obj = FindObjective(typeof(CollectBonesObjective));
QuestObjective obj = FindObjective<CollectBonesObjective>();
if (obj != null && obj.CurProgress > 0)
{