public static void AddLoot(Hunt h, Item item, int itemCount) { h.AddItem(item, itemCount); int stamp = TimestampManager.getDayStamp(); Tuple <int, int> time = TimestampManager.getCurrentTime(); LootDatabaseManager.InsertMessage(h, stamp, time.Item1, time.Item2, String.Format("{0}:{1} Loot of a non-existent creature: {2} {3}", time.Item1, time.Item2, itemCount, item.GetName())); LootDatabaseManager.UpdateLoot(); }
public void ClearItems(int clearMinutes) { string currentTime = TimestampManager.getCurrentTime(); lock (hashSets) { for (int i = 0; i < hashSets.Count; i++) { if (TimestampManager.Distance(currentTime, hashSets[i].Item1) > clearMinutes) { hashSets.RemoveAt(i); i--; } } } }