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; } } }
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)); }
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)); }