More cast conversion fixes
This commit is contained in:
parent
3f45bd57b9
commit
aba9452161
46 changed files with 359 additions and 506 deletions
|
|
@ -49,7 +49,7 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
public static void OnSpun( ISpinningWheel wheel, Mobile from, int hue )
|
||||
public virtual void OnSpun( ISpinningWheel wheel, Mobile from, int hue )
|
||||
{
|
||||
Item item = new SpoolOfThread( 6 );
|
||||
item.Hue = hue;
|
||||
|
|
@ -74,13 +74,11 @@ namespace Server.Items
|
|||
|
||||
ISpinningWheel wheel = targeted as ISpinningWheel;
|
||||
|
||||
if ( wheel == null && targeted is AddonComponent )
|
||||
wheel = ((AddonComponent)targeted).Addon as ISpinningWheel;
|
||||
if ( wheel == null && targeted is AddonComponent component )
|
||||
wheel = component.Addon as ISpinningWheel;
|
||||
|
||||
if ( wheel is Item )
|
||||
{
|
||||
Item item = (Item)wheel;
|
||||
|
||||
if ( !m_Flax.IsChildOf( from.Backpack ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
|
||||
|
|
@ -92,7 +90,7 @@ namespace Server.Items
|
|||
else
|
||||
{
|
||||
m_Flax.Consume();
|
||||
wheel.BeginSpin( new SpinCallback( Flax.OnSpun ), from, m_Flax.Hue );
|
||||
wheel.BeginSpin( m_Flax.OnSpun, from, m_Flax.Hue );
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -102,4 +100,4 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue