Sets a default parameter for OnHit. More casting cleanup.
This commit is contained in:
parent
74f498c1c8
commit
d6c0bf2d4c
96 changed files with 350 additions and 579 deletions
|
|
@ -33,15 +33,20 @@ namespace Server.Items
|
|||
|
||||
public override bool OnWandTarget( Mobile from, object o )
|
||||
{
|
||||
if ( o is BaseWeapon )
|
||||
((BaseWeapon)o).Identified = true;
|
||||
else if ( o is BaseArmor )
|
||||
((BaseArmor)o).Identified = true;
|
||||
if (o is Item item)
|
||||
{
|
||||
if ( item is BaseWeapon weapon )
|
||||
weapon.Identified = true;
|
||||
else if ( item is BaseArmor armor )
|
||||
armor.Identified = true;
|
||||
|
||||
if ( !Core.AOS && o is Item )
|
||||
((Item)o).OnSingleClick( from );
|
||||
if (!Core.AOS)
|
||||
item.OnSingleClick( from );
|
||||
|
||||
return ( o is Item );
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue