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

@ -861,10 +861,7 @@ namespace Server.Items
public bool GetRestoreInfo(Item item, ref Point3D loc)
{
if (m_RestoreTable == null || item == null)
return false;
return m_RestoreTable.TryGetValue(item, out loc);
return item != null && m_RestoreTable?.TryGetValue(item, out loc) == true;
}
public void SetRestoreInfo(Item item, Point3D loc)
@ -1026,8 +1023,8 @@ namespace Server.Items
if (qs is UzeraanTurmoilQuest)
{
if (qs.FindObjective(typeof(GetDaemonBoneObjective)) is GetDaemonBoneObjective obj &&
obj.CorpseWithBone == this && (!obj.Completed || UzeraanTurmoilQuest.HasLostDaemonBone(player)))
GetDaemonBoneObjective obj = qs.FindObjective<GetDaemonBoneObjective>();
if (obj?.CorpseWithBone == this && (!obj.Completed || UzeraanTurmoilQuest.HasLostDaemonBone(player)))
{
Item bone = new QuestDaemonBone();
@ -1052,8 +1049,8 @@ namespace Server.Items
}
else if (qs is TheSummoningQuest)
{
if (qs.FindObjective(typeof(VanquishDaemonObjective)) is VanquishDaemonObjective obj &&
obj.Completed && obj.CorpseWithSkull == this)
VanquishDaemonObjective obj = qs.FindObjective<VanquishDaemonObjective>();
if (obj?.Completed == true && obj.CorpseWithSkull == this)
{
GoldenSkull sk = new GoldenSkull();