public void EndMobileCombine(Mobile from, object o) { if (o is Item && ((Item)o).IsChildOf(from.Backpack)) { if (o is SmallMobileBOD) { SmallMobileBOD small = (SmallMobileBOD)o; LargeMobileBulkEntry entry = null; for (int i = 0; entry == null && i < m_Entries.Length; ++i) { if (m_Entries[i].Details.Type == small.Type) { entry = m_Entries[i]; } } if (entry == null) { from.SendLocalizedMessage(1045160); // That is not a bulk order for this large request. } else if (m_AmountMax != small.AmountMax) { from.SendLocalizedMessage(1045163); // The two orders have different requested amounts and cannot be combined. } else if (small.AmountCur < small.AmountMax) { from.SendLocalizedMessage(1045164); // The order to combine with is not completed. } else if (entry.Amount >= m_AmountMax) { from.SendLocalizedMessage(1045166); // The maximum amount of requested items have already been combined to this deed. } else { entry.Amount += small.AmountCur; small.Delete(); from.SendLocalizedMessage(1045165); // The orders have been combined. from.SendGump(new LargeMobileBODGump(from, this)); if (!Complete) { BeginMobileCombine(from); } } } else { from.SendLocalizedMessage(1045159); // That is not a bulk order. } } else { from.SendLocalizedMessage(1045158); // You must have the item in your backpack to target it. } }
public override void OnResponse(NetState sender, RelayInfo info) { if (info.ButtonID == 1) // Ok { if (m_From.PlaceInBackpack(m_Deed)) { m_From.SendLocalizedMessage(1045152); // The bulk order deed has been placed in your backpack. } else { m_From.SendLocalizedMessage(1045150); // There is not enough room in your backpack for the deed. m_Deed.Delete(); } } else { m_Deed.Delete(); } }