private static void RecycleItem(ISession session, ItemUiData item, int amount, CancellationToken cts) { long uidLong = -1; var uid = (ulong)uidLong; session.AddActionToQueue(async() => { await RecycleSpecificItemTask.Execute(session, item.Id, amount, cts); return(true); }, $"{TranslationEngine.GetDynamicTranslationString("%RECYCLE_ITEM%", "Recycle item")}: {item.Id}x{amount}", uid); }
private static void SeedItems(BotWindowData bot) { var inc = new ItemUiData(ItemId.ItemIncenseOrdinary, "Incense", 5, bot); bot.ItemList.Add(inc); bot.UsedItem(ItemId.ItemIncenseOrdinary, DateTime.UtcNow.AddMinutes(19).ToUnixTime()); var luckyEgg = new ItemUiData(ItemId.ItemLuckyEgg, "Lucky Egg", 5, bot); bot.ItemList.Add(luckyEgg); bot.UsedItem(ItemId.ItemLuckyEgg, DateTime.UtcNow.AddMinutes(0.2).ToUnixTime()); bot.ItemList.Add(new ItemUiData(ItemId.ItemSpecialCamera, "Camera", 1, bot)); }
private static void UseItem(ItemUiData item) { if (item.OwnerBot.Started || _debugMode) { item.OwnerBot.Session.AddActionToQueue( async() => { await UseItemTask.Execute(item.OwnerBot.Session, item.Id, item.OwnerBot.CancellationToken); return(true); }, $"{TranslationEngine.GetDynamicTranslationString("%USING%", "Using")}: {item.Name}", 0); } }
private async void RecycleItem(ISession session, ItemUiData item, int amount, CancellationToken cts) { await RecycleSpecificItemTask.Execute(session, item.Id, amount, cts); }