public override void OnResponse(Server.Network.NetState sender, RelayInfo info) { switch (info.ButtonID) { case 1: // No: make a new jail entry JailSystem.InitJail(m_User, m_Offender, true); break; case 2: // Yes: set current jail entry to full account m_ExistingJail.FullJail = true; m_ExistingJail.AddComment(m_User, "Turning on full jail to jail {0}", m_Offender.Name); m_User.SendGump(new JailViewGump(m_User, m_ExistingJail, null)); break; } }
public override void OnResponse(Server.Network.NetState sender, RelayInfo info) { switch (info.ButtonID) { case 1: // Previous page m_User.SendGump(new JailSearchGump(m_List, m_User, m_Page - 1, m_Callback)); break; case 2: // Next page m_User.SendGump(new JailSearchGump(m_List, m_User, m_Page + 1, m_Callback)); break; case 0: // Close if (m_Callback != null) { try { m_Callback.DynamicInvoke(new object[] { m_User }); } catch {} } break; default: int type = info.ButtonID / 10; int index = info.ButtonID % 10; Mobile m = m_List[m_Page * 10 + index] as Mobile; Account acc = m_List[m_Page * 10 + index] as Account; if (acc == null && m != null) { acc = m.Account as Account; } if (m == null && acc != null) { m = JailSystem.GetOnlineMobile(acc); } switch (type) { case 1: // View Account details m_User.SendGump(new JailSearchGump(m_List, m_User, m_Page, m_Callback)); if (acc != null) { m_User.SendGump(new AdminGump(m_User, AdminGumpPage.AccountDetails_Information, 0, null, "Returned from the jail system", acc)); } break; case 2: // View Mobile props m_User.SendGump(new JailSearchGump(m_List, m_User, m_Page, m_Callback)); if (m_User.AccessLevel < AccessLevel.Lead) { return; } if (m != null) { m_User.SendGump(new PropertiesGump(m_User, m)); } break; case 3: // View Client gump m_User.SendGump(new JailSearchGump(m_List, m_User, m_Page, m_Callback)); if (m_User.AccessLevel < AccessLevel.Lead) { return; } if (m != null && m.NetState != null) { m_User.SendGump(new ClientGump(m_User, m.NetState)); } else { m_User.SendMessage("That mobile is no longer online"); } break; case 4: // Jail button object obj = m_List[m_Page * 10 + index]; if (obj is Mobile) { // Requesting a jail on a mobile JailSystem.InitJail(m_User, obj as Mobile); } else if (obj is Account) { // Jail an account JailSystem.InitJail(m_User, obj as Account); } break; case 5: // History button if (acc != null) { ArrayList history = JailSystem.SearchHistory(acc); if (history.Count > 0) { m_User.SendGump(new JailListingGump(m_User, history, new JailGumpCallback(JailSearchCallback))); } else { m_User.SendMessage("No jail entries have been found for that account"); m_User.SendGump(new JailSearchGump(m_List, m_User, m_Page, m_Callback)); } } break; } break; } }