Isolated the problem with .NET 4.0 to the networking code changes; no reason to disallow support for .NET 4.0, and restoring default .NET FX 4.0 support

This commit is contained in:
asayre 2012-03-05 11:38:02 +00:00
parent 287bacac0e
commit b13718ca01
13 changed files with 46 additions and 531 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 )