Fixes unavailable syntax for Mono.
This commit is contained in:
parent
f674ec2be0
commit
6ef32ce910
7 changed files with 99 additions and 144 deletions
|
|
@ -573,10 +573,10 @@ namespace Server.Factions
|
|||
StartBandage();
|
||||
}
|
||||
|
||||
if ( m_Mobile.Spell == null && Core.TickCount - m_Mobile.NextSpellTime >= 0 )
|
||||
{
|
||||
Spell spell = null;
|
||||
Spell spell = m_Mobile.Spell as Spell;
|
||||
|
||||
if ( spell == null && Core.TickCount - m_Mobile.NextSpellTime >= 0 )
|
||||
{
|
||||
DateTime toRelease = DateTime.MinValue;
|
||||
|
||||
if ( IsPoisoned )
|
||||
|
|
@ -678,7 +678,7 @@ namespace Server.Factions
|
|||
if ( types.Count > 1 )
|
||||
spell = new BlessSpell( m_Guard, null );
|
||||
else if ( types.Count == 1 )
|
||||
spell = (Spell) Activator.CreateInstance( types[0], new object[]{ m_Guard, null } );
|
||||
spell = Activator.CreateInstance( types[0], new object[]{ m_Guard, null } ) as Spell;
|
||||
}
|
||||
else if ( types.Count > 0 )
|
||||
{
|
||||
|
|
@ -757,7 +757,7 @@ namespace Server.Factions
|
|||
if ( spell == null || !spell.Cast() )
|
||||
EquipWeapon();
|
||||
}
|
||||
else if ( m_Mobile.Spell is Spell spell && spell.State == SpellState.Sequencing )
|
||||
else if ( spell?.State == SpellState.Sequencing )
|
||||
{
|
||||
EquipWeapon();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,17 +43,20 @@ namespace Server.Engines.MLQuests.Items
|
|||
|
||||
public static void Enhance( Item loot )
|
||||
{
|
||||
switch (loot)
|
||||
if (loot is BaseWeapon weapon)
|
||||
{
|
||||
case BaseWeapon weapon:
|
||||
BaseRunicTool.ApplyAttributesTo( weapon, Utility.RandomMinMax( 1, 5 ), 10, 80 );
|
||||
break;
|
||||
case BaseArmor armor:
|
||||
BaseRunicTool.ApplyAttributesTo( armor, Utility.RandomMinMax( 1, 5 ), 10, 80 );
|
||||
break;
|
||||
default:
|
||||
BaseRunicTool.ApplyAttributesTo((BaseJewel)loot, Utility.RandomMinMax( 1, 5 ), 10, 80 );
|
||||
break;
|
||||
BaseRunicTool.ApplyAttributesTo( weapon, Utility.RandomMinMax( 1, 5 ), 10, 80 );
|
||||
return;
|
||||
}
|
||||
|
||||
if (loot is BaseArmor armor)
|
||||
{
|
||||
BaseRunicTool.ApplyAttributesTo( armor, Utility.RandomMinMax( 1, 5 ), 10, 80 );
|
||||
}
|
||||
|
||||
if (loot is BaseJewel jewel)
|
||||
{
|
||||
BaseRunicTool.ApplyAttributesTo(jewel, Utility.RandomMinMax( 1, 5 ), 10, 80 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue