public static void AddEntry(TownCryerGuildEntry entry) { GuildEntries.Add(entry); CheckTimer(); entry.GetExpiration(); }
public static void Load(GenericReader reader) { int version = reader.ReadInt(); int count = reader.ReadInt(); for (int i = 0; i < count; i++) { var entry = new TownCryerModeratorEntry(reader); if (!entry.Expired) { ModeratorEntries.Add(entry); } } count = reader.ReadInt(); for (int i = 0; i < count; i++) { var entry = new TownCryerCityEntry(reader); if (!entry.Expired) { CityEntries.Add(entry); } } count = reader.ReadInt(); for (int i = 0; i < count; i++) { var entry = new TownCryerGuildEntry(reader); if (!entry.Expired) { GuildEntries.Add(entry); } } count = reader.ReadInt(); for (int i = 0; i < count; i++) { Mobile m = reader.ReadMobile(); DateTime dt = reader.ReadDateTime(); if (m != null) { if (MysteriousPotionEffects == null) { MysteriousPotionEffects = new Dictionary <Mobile, DateTime>(); } MysteriousPotionEffects[m] = dt; } } CheckTimer(); }
public static void Load(GenericReader reader) { int version = reader.ReadInt(); int greetingsCount = 0; switch (version) { case 1: greetingsCount = reader.ReadInt(); int count = reader.ReadInt(); for (int i = 0; i < count; i++) { PlayerMobile pm = reader.ReadMobile() as PlayerMobile; if (pm != null) { AddExempt(pm); } } count = reader.ReadInt(); for (int i = 0; i < count; i++) { TownCryerGreetingEntry entry = new TownCryerGreetingEntry(reader); if (!entry.Expired) { GreetingsEntries.Add(entry); } } goto case 0; case 0: count = reader.ReadInt(); for (int i = 0; i < count; i++) { TownCryerModeratorEntry entry = new TownCryerModeratorEntry(reader); if (!entry.Expired) { ModeratorEntries.Add(entry); } } count = reader.ReadInt(); for (int i = 0; i < count; i++) { TownCryerCityEntry entry = new TownCryerCityEntry(reader); if (!entry.Expired) { CityEntries.Add(entry); } } count = reader.ReadInt(); for (int i = 0; i < count; i++) { TownCryerGuildEntry entry = new TownCryerGuildEntry(reader); if (!entry.Expired) { GuildEntries.Add(entry); } } count = reader.ReadInt(); for (int i = 0; i < count; i++) { Mobile m = reader.ReadMobile(); DateTime dt = reader.ReadDateTime(); if (m != null) { if (MysteriousPotionEffects == null) { MysteriousPotionEffects = new Dictionary <Mobile, DateTime>(); } MysteriousPotionEffects[m] = dt; } } break; } if (greetingsCount < GreetingsEntries.Count) { NewGreeting = true; } CheckTimer(); }