public override void OnResponse(NetState sender, RelayInfo info) { if (m_Deed == null || m_Deed.Deleted) { return; } Mobile from = sender.Mobile; if (!m_Deed.IsChildOf(from.Backpack)) { from.SendLocalizedMessage(1042038); // You must have the object in your backpack to use it return; } int index = info.ButtonID - 1; if (index >= 0 && index <= 4) { HolidayPottedPlant plant = new HolidayPottedPlant(0x11C8 + index); if (!from.PlaceInBackpack(plant)) { plant.Delete(); from.SendLocalizedMessage(1078837); // Your backpack is full! Please make room and try again. } else { m_Deed.Delete(); } } }
public override void OnResponse( NetState sender, RelayInfo info ) { if ( m_Deed == null || m_Deed.Deleted ) return; Mobile from = sender.Mobile; if ( !m_Deed.IsChildOf( from.Backpack ) ) { from.SendLocalizedMessage( 1042038 ); // You must have the object in your backpack to use it return; } int index = info.ButtonID - 1; if ( index >= 0 && index <= 4 ) { HolidayPottedPlant plant = new HolidayPottedPlant( 0x11C8 + index ); if ( !from.PlaceInBackpack( plant ) ) { plant.Delete(); from.SendLocalizedMessage( 1078837 ); // Your backpack is full! Please make room and try again. } else { m_Deed.Delete(); } } }