public static bool CanGetBulkOrder(Mobile m, BODType type) { BODContext context = GetContext(m); if (context != null && context.Entries.ContainsKey(type)) { BODEntry entry = context.Entries[type]; if (entry != null) { entry.CheckCache(); if (entry.LastBulkOrder + TimeSpan.FromHours(Delay) < DateTime.UtcNow) { entry.LastBulkOrder = DateTime.UtcNow; return(true); } else if (entry.CachedDeeds > 0) { entry.CachedDeeds--; return(true); } } } return(false); }
public BODContext(GenericReader reader) { int version = reader.ReadInt(); ConfigEntries(); this.PointsMode = (PointsMode)reader.ReadInt(); BOBFilter = new BOBFilter(reader); int count = reader.ReadInt(); for (int i = 0; i < count; i++) { BODType type = (BODType)reader.ReadInt(); BODEntry entry = new BODEntry(reader); if (Entries.ContainsKey(type)) { Entries[type] = entry; } } }