Fixes more casting
This commit is contained in:
parent
61937d9c97
commit
e77d695684
91 changed files with 512 additions and 908 deletions
|
|
@ -53,9 +53,9 @@ namespace Server.Engines.Quests.Doom
|
|||
{
|
||||
foreach ( Item item in GetItemsInRange( AltarRange ) )
|
||||
{
|
||||
if ( item is SummoningAltar )
|
||||
if ( item is SummoningAltar altar )
|
||||
{
|
||||
m_Altar = (SummoningAltar)item;
|
||||
m_Altar = altar;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -79,18 +79,14 @@ namespace Server.Engines.Quests.Doom
|
|||
|
||||
public override bool OnDragDrop( Mobile from, Item dropped )
|
||||
{
|
||||
PlayerMobile player = from as PlayerMobile;
|
||||
|
||||
if ( player != null )
|
||||
if ( from is PlayerMobile player )
|
||||
{
|
||||
QuestSystem qs = player.Quest;
|
||||
|
||||
if ( qs is TheSummoningQuest )
|
||||
{
|
||||
if ( dropped is DaemonBone )
|
||||
if ( dropped is DaemonBone bones )
|
||||
{
|
||||
DaemonBone bones = (DaemonBone)dropped;
|
||||
|
||||
QuestObjective obj = qs.FindObjective( typeof( CollectBonesObjective ) );
|
||||
|
||||
if ( obj != null && !obj.Completed )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue