private static void Timer_Tick(object source, EventArgs e) { var firstEntry = LootQueue.FirstOrDefault(); if (firstEntry is null) { Timer.Stop(); return; } var border = FloatingTextHelper.CreateFloatingTextLootBorder(firstEntry.LootName, firstEntry.LootRarity, firstEntry.LootIconKind, firstEntry.Quantity); (Application.Current.MainWindow as GameWindow).CreateFloatingTextLoot(border); LootQueue.Remove(firstEntry); if (LootQueue.Count == 0) { Timer.Stop(); } else { MergeQueue(); } }
public override void RemoveItem(int amount = 1) { CollectionsHelper.RemoveItemFromCollection(this, User.Instance.Ingots, amount); if (amount != 0) { (Application.Current.MainWindow as GameWindow).CreateFloatingTextUtility($"-{amount}", ColorsHelper.GetRarityColor(Rarity), FloatingTextHelper.GetIngotRarityPosition(Rarity)); } InterfaceHelper.RefreshSpecificEquipmentPanelTabOnCurrentPage(typeof(Ingot)); }
public override void AddItem(int amount = 1, bool displayFloatingText = true) { CollectionsHelper.AddItemToCollection(this, User.Instance.Ingots, amount); if (amount != 0) { (Application.Current.MainWindow as GameWindow)?.CreateFloatingTextUtility($"+{amount}", ColorsHelper.GetRarityColor(Rarity), FloatingTextHelper.GetIngotRarityPosition(Rarity)); } AddAchievementProgress(); InterfaceHelper.RefreshSpecificEquipmentPanelTabOnCurrentPage(typeof(Ingot)); }