public Spell GetSpellSpecific( Type type )
{
int i;
for( i=0; i< m_arSpellAttack.Count; i++ )
{
if( m_arSpellAttack[i] == type )
{
object[] args = { this, null };
return Activator.CreateInstance( type, args ) as Spell;
}
}
for ( i=0; i< m_arSpellDefense.Count; i++ )
{
if ( m_arSpellDefense[i] == type )
{
object[] args = {this, null};
return Activator.CreateInstance( type, args ) as Spell;
}
}
return null;
}