private void Main_KeyDown(object sender, KeyEventArgs e) { if (ModifierKeys != Keys.Control) { return; } switch (e.KeyCode) { case Keys.O: { Menu_Open(sender, e); break; } case Keys.I: { var items = new Item[40]; for (int i = 0; i < items.Length; i++) { items[i] = new Item(Item.NONE); } using var editor = new PlayerItemEditor <Item>(items, 10, 4, true); editor.ShowDialog(); break; } case Keys.H: { using var editor = new SysBotRAMEdit(InjectionType.Generic); editor.ShowDialog(); break; } } }
private void B_EditPlayerItems_Click(object sender, EventArgs e) { var player = SAV.Players[PlayerIndex]; if (ModifierKeys == Keys.Control) { using var editor = new InventoryEditor(player); editor.ShowDialog(); } else { var pers = player.Personal; var p1 = pers.Pocket1; var p2 = pers.Pocket2; var items = p2.Concat(p1).ToArray(); using var editor = new PlayerItemEditor(items, 10, 4); if (editor.ShowDialog() != DialogResult.OK) { return; } pers.Pocket2 = items.Take(p2.Count).ToArray(); pers.Pocket1 = items.Skip(p2.Count).Take(p1.Count).ToArray(); } }
private void B_RecycleBin_Click(object sender, EventArgs e) { var items = SAV.Main.RecycleBin; using var editor = new PlayerItemEditor(items, 10, 4); if (editor.ShowDialog() == DialogResult.OK) { SAV.Main.RecycleBin = items; } }
private void B_EditFurniture_Click(object sender, EventArgs e) { var v = Villagers[VillagerIndex]; var items = v.FtrStockList; using var editor = new PlayerItemEditor(items, 8, 4); if (editor.ShowDialog() == DialogResult.OK) { v.FtrStockList = items; } }
private void B_Storage_Click(object sender, EventArgs e) { var player = SAV.Players[PlayerIndex]; var pers = player.Personal; var p1 = pers.ItemChest; using var editor = new PlayerItemEditor(p1, 10, 5); if (editor.ShowDialog() == DialogResult.OK) { pers.ItemChest = p1; } }
private void B_EditFurniture_Click(object sender, EventArgs e) { var v = SAV.Main.GetVillager(VillagerIndex); var items = v.Furniture; using var editor = new PlayerItemEditor <VillagerItem>(items, 8, 2); if (editor.ShowDialog() != DialogResult.OK) { return; } v.Furniture = items; SAV.Main.SetVillager(v, VillagerIndex); }
private void Main_KeyDown(object sender, KeyEventArgs e) { if (ModifierKeys != Keys.Control) { #if DEBUG if (ModifierKeys == (Keys.Control | Keys.Alt) && e.KeyCode == Keys.D) { DevUtil.UpdateAll(); } #endif return; } switch (e.KeyCode) { case Keys.O: { Menu_Open(sender, e); break; } case Keys.I: { ItemSprite.Initialize(GameInfo.GetStrings("en").itemlist); var items = new Item[40]; for (int i = 0; i < items.Length; i++) { items[i] = new Item(Item.NONE); } using var editor = new PlayerItemEditor(items, 10, 4, true); editor.ShowDialog(); break; } case Keys.H: { using var editor = new SysBotRAMEdit(InjectionType.Generic); editor.ShowDialog(); break; } case Keys.P: { using var editor = new SettingsEditor(); editor.ShowDialog(); break; } } }
private void B_EditPlayerItems_Click(object sender, EventArgs e) { var player = SAV.Players[PlayerIndex]; { var pers = player.Personal; var bag = pers.Bag; var pocket = pers.Pocket; var items = pocket.Concat(bag).ToArray(); using var editor = new PlayerItemEditor(items, 10, 4, sysbot: true); if (editor.ShowDialog() != DialogResult.OK) { return; } pers.Pocket = items.Take(pocket.Count).ToArray(); pers.Bag = items.Skip(pocket.Count).Take(bag.Count).ToArray(); } }
private void B_EditPlayerItems_Click(object sender, EventArgs e) { var player = SAV.Players[PlayerIndex]; { var pers = player.Personal; var p1 = pers.Pocket1; var p2 = pers.Pocket2; var items = p2.Concat(p1).ToArray(); using var editor = new PlayerItemEditor <Item>(items, 10, 4, sysbot: true); if (editor.ShowDialog() != DialogResult.OK) { return; } pers.Pocket2 = items.Take(p2.Count).ToArray(); pers.Pocket1 = items.Skip(p2.Count).Take(p1.Count).ToArray(); } }