/*public override void OnDoubleClick(Mobile from) * { * if (Owner == null) * Owner = from; * * if (!IsChildOf(from.Backpack)) * from.SendLocalizedMessage(1042001); * * else if (from != Owner) * from.SendMessage("Only the owner can view this ticket."); * * else * { * if (from.HasGump(typeof(TicketGump))) * from.CloseGump(typeof(TicketGump)); * * from.SendGump(new TicketGump(this, from)); * } * * base.OnDoubleClick(from); * }*/ public void AddEntry(TicketEntry entry) { if (!m_Entries.Contains(entry)) { m_Entries.Add(entry); } }
public override void Serialize(GenericWriter writer) { base.Serialize(writer); writer.Write((int)0); //Version writer.Write(m_Game); writer.Write(m_Entries.Count); for (int i = 0; i < m_Entries.Count; ++i) { TicketEntry entry = m_Entries[i]; writer.Write(entry.One); writer.Write(entry.Two); writer.Write(entry.Three); writer.Write(entry.Four); writer.Write(entry.Five); writer.Write(entry.PowerBall); writer.Write(entry.Winner); } }