revert forced 4.0 migration -- many users are still dependent on 2.0
This commit is contained in:
parent
7b48ebb7e6
commit
4bcde77cc2
13 changed files with 531 additions and 46 deletions
|
|
@ -25,7 +25,7 @@ namespace Server.Commands
|
|||
else
|
||||
{
|
||||
SkillName skill;
|
||||
|
||||
#if Framework_4_0
|
||||
if( Enum.TryParse( arg.GetString( 0 ), true, out skill ) )
|
||||
{
|
||||
arg.Mobile.Target = new SkillTarget( skill, arg.GetDouble( 1 ) );
|
||||
|
|
@ -34,6 +34,18 @@ namespace Server.Commands
|
|||
{
|
||||
arg.Mobile.SendLocalizedMessage( 1005631 ); // You have specified an invalid skill to set.
|
||||
}
|
||||
#else
|
||||
try
|
||||
{
|
||||
skill = (SkillName)Enum.Parse( typeof( SkillName ), arg.GetString( 0 ), true );
|
||||
}
|
||||
catch
|
||||
{
|
||||
arg.Mobile.SendLocalizedMessage( 1005631 ); // You have specified an invalid skill to set.
|
||||
return;
|
||||
}
|
||||
arg.Mobile.Target = new SkillTarget( skill, arg.GetDouble( 1 ) );
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -62,7 +74,7 @@ namespace Server.Commands
|
|||
else
|
||||
{
|
||||
SkillName skill;
|
||||
|
||||
#if Framework_4_0
|
||||
if( Enum.TryParse( arg.GetString( 0 ), true, out skill ) )
|
||||
{
|
||||
arg.Mobile.Target = new SkillTarget( skill );
|
||||
|
|
@ -71,6 +83,19 @@ namespace Server.Commands
|
|||
{
|
||||
arg.Mobile.SendMessage( "You have specified an invalid skill to get." );
|
||||
}
|
||||
#else
|
||||
try
|
||||
{
|
||||
skill = (SkillName)Enum.Parse( typeof( SkillName ), arg.GetString( 0 ), true );
|
||||
}
|
||||
catch
|
||||
{
|
||||
arg.Mobile.SendLocalizedMessage( 1005631 ); // You have specified an invalid skill to set.
|
||||
return;
|
||||
}
|
||||
|
||||
arg.Mobile.Target = new SkillTarget( skill );
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue