Server.Mobiles.Spawner.Spawn C# (CSharp) Méthode

Spawn() public méthode

public Spawn ( ) : void
Résultat void
		public virtual void Spawn()
		{
			if ( SpawnNamesCount > 0 )
				Spawn( Utility.Random( SpawnNamesCount ) );
		}

Same methods

Spawner::Spawn ( int index ) : void
Spawner::Spawn ( string creatureName ) : void

Usage Example

Exemple #1
0
        public override void OnResponse(NetState state, RelayInfo info)
        {
            if (m_Spawner.Deleted)
            {
                return;
            }

            switch (info.ButtonID)
            {
            case 0:                     // Closed
            {
                break;
            }

            case 1:                     // Okay
            {
                m_Spawner.CreaturesName = CreateArray(info, state.Mobile);

                break;
            }

            case 2:                     // Bring everything home
            {
                m_Spawner.BringToHome();

                break;
            }

            case 3:                     // Complete respawn
            {
                m_Spawner.Respawn();

                break;
            }

            default:
            {
                int buttonID = info.ButtonID - 4;
                int index    = buttonID / 2;
                int type     = buttonID % 2;

                TextRelay entry = info.GetTextEntry(index);

                if (entry != null && entry.Text.Length > 0)
                {
                    if (type == 0)                                       // Spawn creature
                    {
                        m_Spawner.Spawn(entry.Text);
                    }
                    else                                     // Remove creatures
                    {
                        m_Spawner.RemoveCreatures(entry.Text);
                    }

                    m_Spawner.CreaturesName = CreateArray(info, state.Mobile);
                }

                break;
            }
            }
        }
All Usage Examples Of Server.Mobiles.Spawner::Spawn