Corrected error causing CommandEngine commands to not work.

This commit is contained in:
Scionwest_cp 2011-09-19 17:04:41 -07:00
parent 7bc89b294b
commit 974cc0f9b8
3 changed files with 13 additions and 1 deletions

View file

@ -149,7 +149,12 @@ namespace MudEngine.GameManagement
foreach (Type t in commandLibrary.GetTypes())
{
if (t.GetInterface(typeof(IGameCommand).FullName) != null)
if (t.IsAbstract)
continue;
Type inter = t.GetInterface("IGameCommand");
if (inter != null)
{
//Use activator to create an instance
IGameCommand command = (IGameCommand)Activator.CreateInstance(t);