public override void GetProperties(ObjectPropertyList list) { base.GetProperties(list); if (m_Stone == null || !m_Stone.IsActive) { list.Add(1060658, "Status\tOffline"); } else { list.Add(1060658, "Status\tActive"); } if (ScratcherStats.Stats.Count > 0) { try { int index = ScratcherStats.Stats.Count - 1; string jackpotAmount = String.Format("{0:##,###,###}", ScratcherStats.Stats[index].Payout); list.Add(1060659, "Last Big Win\t{0}", ScratcherStats.Stats[index].Winner.Name); list.Add(1060660, "Date\t{0}", ScratcherStats.Stats[index].WinTime); list.Add(1060661, "Amount\t{0}", jackpotAmount); list.Add(1060662, "Game\t{0}", ScratcherLotto.GetGameType(ScratcherStats.Stats[index].Type)); } catch { } } }
public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.ReadInt(); m_Stone = (ScratcherLotto)reader.ReadItem(); if (m_Stone != null) { m_Stone.AddToSatList(this); } }
public ScratcherLottoSatellite() : base(0xED4) { Name = "Lottery Scratch Tickets"; Hue = Utility.RandomSlimeHue(); Movable = false; if (ScratcherLotto.Stone != null) { m_Stone = ScratcherLotto.Stone; m_Stone.AddToSatList(this); } else { Delete(); } }
public ScratcherLotto() : base(0xED4) { if (CheckForScratcherStone()) { Console.WriteLine("You can only have one Lotto Scratcher Stone Item."); Delete(); return; } Name = "Lottery Scratch Tickets"; Hue = Utility.RandomSlimeHue(); Movable = false; m_Active = true; m_Stone = this; m_SkiesProgressive = 500000; m_DeleteTicket = true; m_WipeStats = TimeSpan.FromDays(90); m_StatStart = DateTime.Now; }
public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.ReadInt(); switch (version) { case 2: { m_WipeStats = reader.ReadTimeSpan(); m_StatStart = reader.ReadDateTime(); goto case 1; } case 1: { m_DeleteTicket = reader.ReadBool(); goto case 0; } case 0: { m_Active = reader.ReadBool(); m_GoldSink = reader.ReadInt(); m_SkiesProgressive = reader.ReadInt(); int statsCount = reader.ReadInt(); for (int i = 0; i < statsCount; i++) { new ScratcherStats(reader); } break; } } m_Stone = this; }