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

RemoveSpawned() public méthode

public RemoveSpawned ( ) : void
Résultat void
		public void RemoveSpawned()
		{
			Defrag();

			for ( int i = m_Spawned.Count - 1; i >= 0; --i )
				m_Spawned[i].Delete();

			InvalidateProperties();
		}

Same methods

Spawner::RemoveSpawned ( string creatureName ) : void

Usage Example

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

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

            case 1:     // Apply
            {
                UpdateSpawnObjects(info, state.Mobile);

                break;
            }

            case 2:     // Bring to Home
            {
                m_Spawner.BringToHome();

                break;
            }

            case 3:     // Total Respawn
            {
                m_Spawner.Respawn();

                break;
            }

            case 1000:
            {
                if (m_Spawner.Group)
                {
                    m_Spawner.Group = false;
                }
                else
                {
                    m_Spawner.Group = true;
                }
                break;
            }

            case 1025:
            {
                state.Mobile.SendGump(new PropertiesGump(state.Mobile, m_Spawner));
                break;
            }

            case 1500:
            {
                if (m_Spawner.Running)
                {
                    m_Spawner.Running = false;
                }
                else
                {
                    m_Spawner.Running = true;
                }
                break;
            }

            case 1750:
            {
                m_Spawner.RemoveSpawned();
                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)
                {
                    UpdateSpawnObjects(info, state.Mobile);

                    if (type == 0)         // Spawn creature
                    {
                        m_Spawner.Spawn(index);
                    }
                    else         // Remove creatures
                    {
                        m_Spawner.RemoveSpawned(index);
                    }
                }

                break;
            }
            }

            state.Mobile.SendGump(new SpawnerGump(m_Spawner));
        }
All Usage Examples Of Server.Mobiles.Spawner::RemoveSpawned