AlpacaLibary  1.63
A closed source C++ bot for OSRS
Inventory.hpp
Go to the documentation of this file.
1 #ifndef INVENTORY_HPP_INCLUDED
2 #define INVENTORY_HPP_INCLUDED
3 
4 #include "../../../Core/Types/Box.hpp"
5 #include "../../../Core/Types/Convex.hpp"
6 #include "../../../Game/Interactable/Item.hpp"
7 #include <functional>
8 #include <vector>
9 #include <cstdint>
10 #include <string>
11 
12 namespace Inventory
13 {
14  bool IsOpen();
15  bool Open(bool UseHotkey = false);
16  std::int32_t GetTabHotkey();
17 
18  std::vector<std::int32_t> GetItemIDs();
19  std::vector<std::string> GetItemNames();
20  std::vector<std::int32_t> GetItemAmounts();
21 
22  std::vector<Interactable::Item> GetItems();
23  std::vector<Interactable::Item> GetItems(std::int32_t ID);
24  std::vector<Interactable::Item> GetItems(const std::string& Name);
25  std::vector<Interactable::Item> GetItems(const std::vector<std::int32_t>& IDs);
26  std::vector<Interactable::Item> GetItems(const std::vector<std::string>& Names);
27  std::vector<Interactable::Item> GetItems(const std::function<bool (const Interactable::Item&)>& Filter);
28 
29  Interactable::Item GetItem(std::int32_t ID);
30  Interactable::Item GetItem(const std::string& Name);
31  Interactable::Item GetItem(const std::vector<std::int32_t>& IDs);
32  Interactable::Item GetItem(const std::vector<std::string>& Names);
33  Interactable::Item GetItem(const std::function<bool (const Interactable::Item&)>& Filter);
34 
35  bool IsEmpty();
36  bool IsFull();
37 
39  bool IsItemSelected(std::int32_t ID);
40  bool IsItemSelected(const std::string& Name);
42 
43  std::string GetItemSelectedName();
44 
45  std::int32_t Count(std::int32_t ID);
46  std::int32_t Count(const std::string& Name);
47  std::int32_t Count(const Interactable::Item& Item);
48  std::int32_t Count(const std::vector<std::int32_t>& IDs);
49  std::int32_t Count(const std::vector<std::string>& Names);
50  std::int32_t Count(const std::vector<Interactable::Item>& Items);
51 
52  std::int32_t CountOccupied();
53  std::int32_t CountEmpty();
54 
55  std::int32_t GetIndexOf(std::int32_t ID);
56  std::int32_t GetIndexOf(const std::string& Name);
57  std::int32_t GetIndexOf(const std::vector<std::int32_t>& IDs); // Returns first found ID index
58  std::int32_t GetIndexOf(const std::vector<std::string>& Names); // Returns first found Name Index
59 
60  std::vector<std::int32_t> GetIndicesOf(std::int32_t ID);
61  std::vector<std::int32_t> GetIndicesOf(const std::string& Name);
62  std::vector<std::int32_t> GetIndicesOf(const std::vector<std::int32_t>& IDs);
63  std::vector<std::int32_t> GetIndicesOf(const std::vector<std::string>& Names);
64 
65  std::vector<Box> GetSlotBoxes();
66  std::vector<Box> GetBoxesOf(std::int32_t ID);
67  std::vector<Box> GetBoxesOf(const std::string& Name);
68 
69  bool Contains(std::int32_t ID);
70  bool Contains(const std::string& Name);
71  bool Contains(const Interactable::Item& Item);
72  bool Contains(const std::vector<std::int32_t>& IDs); // true if all items are found at least once
73  bool Contains(const std::vector<std::string>& Names); // true if all items are found at least once
74  bool Contains(const std::vector<Interactable::Item>& Items);
75 
76  bool ContainsAny(const std::vector<std::int32_t>& IDs);
77  bool ContainsAny(const std::vector<std::string>& Names);
78  bool ContainsAny(const std::vector<Interactable::Item>& Items);
79 
80  bool ContainsOnly(std::int32_t ID);
81  bool ContainsOnly(const std::string& Name);
82  bool ContainsOnly(const Interactable::Item& Item);
83  bool ContainsOnly(const std::vector<std::int32_t>& IDs);
84  bool ContainsOnly(const std::vector<std::string>& Names);
85  bool ContainsOnly(const std::vector<Interactable::Item>& Items);
86 
87  bool Use(std::int32_t ID, std::int32_t ID2 = -1, bool UseSecondFirst = false);
88  bool Use(const std::string& Name, const std::string& Name2 = "", bool UseSecondFirst = false);
89  bool Use(const Interactable::Item& Item, const Interactable::Item& Item2 = Interactable::Item(), bool UseSecondFirst = false);
90 
91  bool Equip(std::int32_t ID);
92  bool Equip(const std::string& Name);
93  bool Equip(const Interactable::Item& Item);
94 
95  bool Drop(std::int32_t ID, bool AllowShiftClick = true);
96  bool Drop(const std::string& Name, bool AllowShiftClick = true);
97  bool Drop(const Interactable::Item& Item, bool AllowShiftClick = true);
98 }
99 
100 #endif // INVENTORY_HPP_INCLUDED
std::vector< std::int32_t > GetItemIDs()
bool IsEmpty()
std::vector< std::int32_t > GetIndicesOf(std::int32_t ID)
Interactable::Item GetItem(std::int32_t ID)
std::int32_t CountOccupied()
std::vector< std::string > GetItemNames()
bool Use(std::int32_t ID, std::int32_t ID2=-1, bool UseSecondFirst=false)
bool IsItemSelected()
std::int32_t Count(std::int32_t ID)
std::int32_t CountEmpty()
std::string GetItemSelectedName()
std::int32_t GetIndexOf(std::int32_t ID)
bool ContainsAny(const std::vector< std::int32_t > &IDs)
std::vector< Interactable::Item > GetItems()
std::int32_t GetTabHotkey()
bool Open(bool UseHotkey=false)
std::vector< Box > GetBoxesOf(std::int32_t ID)
bool ContainsOnly(std::int32_t ID)
std::vector< std::int32_t > GetItemAmounts()
std::vector< Box > GetSlotBoxes()
bool IsFull()
bool Contains(std::int32_t ID)
bool Drop(std::int32_t ID, bool AllowShiftClick=true)
bool IsOpen()
bool Equip(std::int32_t ID)