Server.Spells.SpellRegistry.NewSpell C# (CSharp) Méthode

NewSpell() public static méthode

public static NewSpell ( int spellID, Mobile caster, System.Item scroll ) : Spell
spellID int
caster Mobile
scroll System.Item
Résultat Spell
		public static Spell NewSpell( int spellID, Mobile caster, Item scroll )
		{
			if ( spellID < 0 || spellID >= m_Types.Length )
				return null;

			Type t = m_Types[spellID];

			if( t != null )
			{
				m_Params[0] = caster;
				m_Params[1] = scroll;

				try
				{
					return (Spell)Activator.CreateInstance( t, m_Params );
				}
				catch
				{
				}
			}

			return null;
		}

Same methods

SpellRegistry::NewSpell ( string name, Mobile caster, System.Item scroll ) : Spell