AlpacaLibary  1.63
A closed source C++ bot for OSRS
Item.hpp
Go to the documentation of this file.
1 #ifndef INTERACTABLEITEM_CPP_INCLUDED
2 #define INTERACTABLEITEM_CPP_INCLUDED
3 
4 #include "../../Core/Classes/ItemInfo.hpp"
5 #include "../../Core/Classes/Sprite.hpp"
6 #include "../../Core/Types/Point.hpp"
7 #include "../../Core/Types/Box.hpp"
8 #include "../../Core/Types/Convex.hpp"
9 #include "../../Core/Input.hpp"
10 #include <cstdint>
11 #include <functional>
12 
13 namespace Interactable
14 {
15  class Item
16  {
17  public:
18  typedef enum ITEM_SOURCE
19  {
22  BANK
24 
25  Item();
26  Item(std::int32_t Index, std::int32_t ID, ITEM_SOURCE Source);
28 
29  bool Exists() const;
30 
31  bool IsInterfaceOpen() const;
32  bool OpenInterface() const;
33 
34  std::int32_t GetID() const;
35  std::int32_t GetIndex() const;
37  std::string GetName() const;
38  std::int32_t GetStackAmount() const;
40 
42  Convex GetConvex() const;
43  Box GetBox() const;
44  Point GetPoint() const;
45  Point GetPoint(double PointGenAccuracy) const;
46 
47  bool Hover() const;
48  bool Interact(const Button& B = BUTTON_LEFT) const;
49  bool Interact(const std::string& Option, bool CheckTarget = false) const;
50  bool Interact(const std::vector<std::string>& Options, bool CheckTarget = false) const;
51  bool Interact(const std::function<bool (const Convex&)>& InteractMethod) const;
52 
53  bool Valid() const;
54  operator bool() const;
55 
56  private:
57  std::int32_t Index;
58  std::int32_t ID;
59  ITEM_SOURCE Source;
60  };
61 }
62 
63 #endif // INTERACTABLEITEM_CPP_INCLUDED
Button
Definition: Input.hpp:16
@ BUTTON_LEFT
Definition: Input.hpp:18
Definition: Box.hpp:11
Definition: Convex.hpp:9
Item(std::int32_t Index, std::int32_t ID, ITEM_SOURCE Source)
bool Interact(const Button &B=BUTTON_LEFT) const
bool Hover() const
std::string GetName() const
std::int32_t GetID() const
Box GetBox() const
Item(const Interactable::Item &Item)
Internal::ItemInfo GetInfo() const
Point GetPoint() const
Point GetPoint(double PointGenAccuracy) const
bool Exists() const
std::int32_t GetIndex() const
bool IsInterfaceOpen() const
bool OpenInterface() const
bool Interact(const std::function< bool(const Convex &)> &InteractMethod) const
bool Interact(const std::string &Option, bool CheckTarget=false) const
ITEM_SOURCE GetSource() const
Internal::Sprite GetSprite() const
Convex GetConvex() const
std::int32_t GetStackAmount() const
bool Valid() const
bool Interact(const std::vector< std::string > &Options, bool CheckTarget=false) const
Definition: Point.hpp:10