public override void OnResponse(Server.Network.NetState sender, RelayInfo info) { switch (info.ButtonID) { case 1: // Place in bank if (!m_Check.Deliver(sender.Mobile)) { sender.Mobile.SendGump(new AuctionDeliveryGump(m_Check)); } break; case 2: // View auction if (m_Check.Auction != null) { sender.Mobile.SendGump(new AuctionViewGump(sender.Mobile, m_Check.Auction, null)); } else { sender.Mobile.SendGump(new AuctionDeliveryGump(m_Check)); } break; } }
public override void OnResponse(Server.Network.NetState sender, RelayInfo info) { int buttonid = info.ButtonID; if (buttonid < 0 || buttonid > 2) { sender.Mobile.SendMessage("Invalid option. Please try again."); return; } switch (info.ButtonID) { case 1: // Place in bank if (!m_Check.Deliver(sender.Mobile)) { sender.Mobile.SendGump(new AuctionDeliveryGump(m_Check)); } break; case 2: // View auction if (m_Check.Auction != null) { sender.Mobile.CloseGump(typeof(AuctionViewGump)); sender.Mobile.SendGump(new AuctionViewGump(sender.Mobile, m_Check.Auction, null)); } else { sender.Mobile.SendGump(new AuctionDeliveryGump(m_Check)); } break; } }
public override void OnResponse(Server.Network.NetState sender, RelayInfo info) { if (!m_Buttons.Contains(info.ButtonID)) { Console.WriteLine(@"The auction system located a potential exploit. Player {0} (Acc. {1}) tried to press an unregistered button in a gump of type: {2}" , sender.Mobile != null ? sender.Mobile.ToString() : "Unkown", sender.Mobile != null && sender.Mobile.Account != null ? (sender.Mobile.Account as Server.Accounting.Account).Username : "******", this.GetType().Name); return; } switch (info.ButtonID) { case 1: // Place in bank if (!m_Check.Deliver(sender.Mobile)) { sender.Mobile.SendGump(new AuctionDeliveryGump(m_Check)); } break; case 2: // View auction if (m_Check.Auction != null) { sender.Mobile.SendGump(new AuctionViewGump(sender.Mobile, m_Check.Auction, null)); } else { sender.Mobile.SendGump(new AuctionDeliveryGump(m_Check)); } break; } }