RunUO 2.4 will be the latest release supporting the 2.0 .NET Framework.

Framework_4_0 preprocessors have been removed. ScriptCompiler will set Framework_4_0 as legacy.
This commit is contained in:
Mark Sturgill 2013-10-30 11:28:34 -07:00
parent 951f8b7d01
commit e67faba4d8
20 changed files with 43 additions and 623 deletions

View file

@ -121,29 +121,13 @@ namespace Server.Misc
private static void ChangeSkill( Mobile from, string name, double value )
{
SkillName index;
#if Framework_4_0
if( !Enum.TryParse( name, true, out index ) || (!Core.SE && (int)index > 51) || (!Core.AOS && (int)index > 48) )
{
from.SendLocalizedMessage( 1005631 ); // You have specified an invalid skill to set.
return;
}
#else
try
{
index = (SkillName)Enum.Parse( typeof( SkillName ), name, true );
}
catch
{
from.SendLocalizedMessage( 1005631 ); // You have specified an invalid skill to set.
return;
}
if ( ( !Core.SE && (int)index > 51 ) || ( !Core.AOS && (int)index > 48 ) )
{
from.SendLocalizedMessage( 1005631 ); // You have specified an invalid skill to set.
return;
}
#endif
Skill skill = from.Skills[index];
if ( skill != null )