Fixes more casting and other formatting issues.
This commit is contained in:
parent
03dd5f1926
commit
61937d9c97
67 changed files with 325 additions and 570 deletions
|
|
@ -158,22 +158,12 @@ namespace Server.Engines.Plants
|
|||
|
||||
public override bool StackWith( Mobile from, Item dropped, bool playSound )
|
||||
{
|
||||
if ( dropped is Seed )
|
||||
{
|
||||
Seed other = (Seed)dropped;
|
||||
|
||||
if ( other.PlantType == m_PlantType && other.PlantHue == m_PlantHue && other.ShowType == m_ShowType )
|
||||
return base.StackWith( from, dropped, playSound );
|
||||
}
|
||||
|
||||
return false;
|
||||
return dropped is Seed other && other.PlantType == m_PlantType && other.PlantHue == m_PlantHue && other.ShowType == m_ShowType && base.StackWith( from, other, playSound );
|
||||
}
|
||||
|
||||
public override void OnAfterDuped( Item newItem )
|
||||
{
|
||||
Seed newSeed = newItem as Seed;
|
||||
|
||||
if ( newSeed == null )
|
||||
if ( !(newItem is Seed newSeed) )
|
||||
return;
|
||||
|
||||
newSeed.PlantType = m_PlantType;
|
||||
|
|
@ -202,15 +192,13 @@ namespace Server.Engines.Plants
|
|||
return;
|
||||
}
|
||||
|
||||
if ( targeted is PlantItem )
|
||||
if ( targeted is PlantItem plant )
|
||||
{
|
||||
PlantItem plant = (PlantItem)targeted;
|
||||
|
||||
plant.PlantSeed( from, m_Seed );
|
||||
}
|
||||
else if ( targeted is Item )
|
||||
else if ( targeted is Item item )
|
||||
{
|
||||
((Item)targeted).LabelTo( from, 1061919 ); // You must use a seed on a bowl of dirt!
|
||||
item.LabelTo( from, 1061919 ); // You must use a seed on a bowl of dirt!
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue