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

BringToHome() public méthode

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

			for ( int i = 0; i < m_Spawned.Count; ++i )
			{
				ISpawnable e = m_Spawned[i];

				e.MoveToWorld( this.Location, this.Map );
			}
		}

Usage Example

        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
            {
                m_Spawner.SpawnNames = CreateArray(info, state.Mobile);

                break;
            }

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

                break;
            }

            case 3:     // Total 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.RemoveSpawned(entry.Text);
                    }

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

                break;
            }
            }

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