Fixes more casting
This commit is contained in:
parent
61937d9c97
commit
e77d695684
91 changed files with 512 additions and 908 deletions
|
|
@ -62,17 +62,13 @@ namespace Server.Engines.Quests.Hag
|
|||
if ( !from.InRange( this.GetWorldLocation(), 2 ) )
|
||||
return;
|
||||
|
||||
PlayerMobile player = from as PlayerMobile;
|
||||
|
||||
if ( player != null )
|
||||
if ( from is PlayerMobile player )
|
||||
{
|
||||
QuestSystem qs = player.Quest;
|
||||
|
||||
if ( qs is WitchApprenticeQuest )
|
||||
{
|
||||
FindApprenticeObjective obj = qs.FindObjective( typeof( FindApprenticeObjective ) ) as FindApprenticeObjective;
|
||||
|
||||
if ( obj != null && !obj.Completed )
|
||||
if ( qs.FindObjective( typeof( FindApprenticeObjective ) ) is FindApprenticeObjective obj && !obj.Completed )
|
||||
{
|
||||
if ( obj.Corpse == this )
|
||||
{
|
||||
|
|
@ -106,4 +102,4 @@ namespace Server.Engines.Quests.Hag
|
|||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue