Release 0.60

master
Kasi 2018-06-28 03:22:43 +01:00
parent a494886213
commit 39b7d88b0e
27 changed files with 442 additions and 290 deletions

View File

@ -0,0 +1,20 @@
#ifndef FONT_HPP_INCLUDED
#define FONT_HPP_INCLUDED
#include "FontFamily.hpp"
#include "../JavaClass/Class.hpp"
namespace Internal
{
class Font : public FontFamily
{
public:
Font();
Font(const void* Obj);
Font(const Font& F);
static Class GetClass();
};
}
#endif // FONT_HPP_INCLUDED

View File

@ -0,0 +1,28 @@
#ifndef FONTFAMILY_HPP_INCLUDED
#define FONTFAMILY_HPP_INCLUDED
#include "Rasterizer2D.hpp"
#include "../JavaClass/Class.hpp"
#include <vector>
#include <cstdint>
namespace Internal
{
class FontFamily : public Rasterizer2D
{
public:
FontFamily();
FontFamily(const void* Obj);
FontFamily(const FontFamily& F);
static Class GetClass();
std::vector<std::int32_t> GetGlyphHeightOffsets() const;
std::vector<std::int32_t> GetGlyphHeights() const;
std::vector<std::int32_t> GetGlyphWidthOffsets() const;
std::vector<std::int32_t> GetGlyphWidths() const;
std::vector<std::vector<std::int8_t>> GetGlyphs() const;
};
}
#endif // FONTFAMILY_HPP_INCLUDED

View File

@ -0,0 +1,24 @@
#ifndef FONTNAME_HPP_INCLUDED
#define FONTNAME_HPP_INCLUDED
#include "../JavaClass/Object.hpp"
#include "../JavaClass/Class.hpp"
#include <string>
namespace Internal
{
class FontName : public Object
{
public:
FontName();
FontName(const void* Obj);
FontName(const FontName& F);
static Class GetClass();
std::string GetKeyName() const;
std::string GetName() const;
};
}
#endif // FONTNAME_HPP_INCLUDED

View File

@ -0,0 +1,22 @@
#ifndef FONTS_HPP_INCLUDED
#define FONTS_HPP_INCLUDED
#include "../JavaClass/Object.hpp"
#include "../JavaClass/Class.hpp"
#include "../JavaClass/Map.hpp"
namespace Internal
{
class Fonts : public Object
{
public:
Fonts();
Fonts(const void* Obj);
Fonts(const Fonts& F);
static Class GetClass();
Map GetFontMap() const;
};
}
#endif // FONTS_HPP_INCLUDED

View File

@ -0,0 +1,20 @@
#ifndef RASTERIZER2D_HPP_INCLUDED
#define RASTERIZER2D_HPP_INCLUDED
#include "CacheableNode.hpp"
#include "../JavaClass/Class.hpp"
namespace Internal
{
class Rasterizer2D : public CacheableNode
{
public:
Rasterizer2D();
Rasterizer2D(const void* Obj);
Rasterizer2D(const Rasterizer2D& R);
static Class GetClass();
};
}
#endif // RASTERIZER2D_HPP_INCLUDED

View File

@ -3,10 +3,6 @@
#include "../../Include/Core/Types/Logger.hpp" #include "../../Include/Core/Types/Logger.hpp"
#ifndef VERBOSE_LOG_MACRO
#define VERBOSE Debug::Verbose << __PRETTY_FUNCTION__ << " > "
#endif // VERBOSE_LOG_MACRO
class Debug class Debug
{ {
public: public:

View File

@ -45,6 +45,10 @@
#include "Classes/DirectByteBuffer.hpp" #include "Classes/DirectByteBuffer.hpp"
#include "Classes/DynamicObject.hpp" #include "Classes/DynamicObject.hpp"
#include "Classes/ExchangeOffer.hpp" #include "Classes/ExchangeOffer.hpp"
#include "Classes/Font.hpp"
#include "Classes/FontFamily.hpp"
#include "Classes/FontName.hpp"
#include "Classes/Fonts.hpp"
#include "Classes/Frame.hpp" #include "Classes/Frame.hpp"
#include "Classes/FrameMap.hpp" #include "Classes/FrameMap.hpp"
#include "Classes/Frames.hpp" #include "Classes/Frames.hpp"
@ -103,6 +107,7 @@ namespace Internal
std::int32_t GetCameraYaw(); std::int32_t GetCameraYaw();
std::int32_t GetCameraZ(); std::int32_t GetCameraZ();
Map GetChatLineCache(); Map GetChatLineCache();
Map GetClientFonts();
std::int32_t GetClientPlane(); std::int32_t GetClientPlane();
Preferences GetClientPreferences(); Preferences GetClientPreferences();
std::int32_t GetClientX(); std::int32_t GetClientX();

View File

@ -8,74 +8,25 @@
/** @addtogroup Types /** @addtogroup Types
* @{ */ * @{ */
class Area : public Convex class Area
{ {
public: private:
/** std::int32_t Plane;
* @brief The Plane the Area is located on std::vector<Tile> Vertices;
* @par Description
* The Plane the Area is located on
*/
std::int32_t Plane;
/** public:
* @brief Default Constructor, constructs an Area with -1 as the TopLeft and BottomRight Tile
* @par Description
* Default Constructor, constructs an Area with -1 as the TopLeft and BottomRight Tile
*/
Area(); Area();
/** Area(const Tile& TopLeft, const Tile& BottomRight);
* @brief Constructs an Area based on a TopLeft tile and a BottomRight tile, sets the internal Plane to the plane of the TopLeft tile Area(const std::vector<Tile>& Vertices);
* @param Tile TopLeft Top Left tile of the Area
* @param Tile BottomRight Bottom Right tile of the Area
*/
Area(Tile TopLeft, Tile BottomRight);
/**
* @brief Constructs an Area based on a TopLeft tile and a BottomRight tile, sets the internal Plane to the plane of the TopLeft tile
* @param std::vector<Tile> TileVertices
*/
Area(std::vector<Tile> TileVertices);
/**
* @brief Constructs an Area, by copying another
* @param const Area& A The Area to "copy"
*/
Area(const Area& A); Area(const Area& A);
/** bool Valid() const;
* @brief Returns True if the Area contains a Tile, does check the Tiles Plane
* @return True if the Area contains a Tile, does check the Tiles Plane
* @par Example
* @code
* Area A(Tile(100, 100, 0), Tile(200, 200, 0));
* Debug::Info << A.contains(Tile(150, 150, 0));
* @endcode
*/
bool Contains(const Tile& T) const; bool Contains(const Tile& T) const;
/**
* @brief Returns the middle Tile of the Area
* @return The middle Tile of the Area
* @par Example
* @code
* Area A(Tile(100, 100, 0), Tile(200, 200, 0));
* Debug::Info << A.GetMiddle());
* @endcode
*/
Tile GetMiddle() const; Tile GetMiddle() const;
/** std::int32_t GetPlane() const;
* @brief Returns a random Tile using Hybrid Distribution std::vector<Tile> GetVertices() const;
* @return A random Tile using Hybrid Distribution
* @par Example
* @code
* Area A(Tile(100, 100, 0), Tile(200, 200, 0));
* Debug::Info << A.GetHybridRandomTile(0.20, 0.20, 0.50, false));
* @endcode
* @see @ref HybridRandomDocs
* @see @ref MissChanceFollowupDocs
*/
Tile GetHybridRandomTile(double ProbabilityX, double ProbabilityY, double StandardDeviationX, double StandardDeviationY, bool CheckPointGenAccuracyChance = true) const;
friend std::ostream& operator<<(std::ostream& OS, const Area& A); friend std::ostream& operator<<(std::ostream& OS, const Area& A);
~Area(); ~Area();
}; };

View File

@ -78,13 +78,10 @@ class Box
* @see @ref MissChanceFollowupDocs * @see @ref MissChanceFollowupDocs
*/ */
Point GetNormalRandomPoint(double PercentageDeviationX, double PercentageDeviationY) const; Point GetNormalRandomPoint(double PercentageDeviationX, double PercentageDeviationY) const;
/**
* @brief Returns a random Point using Hybrid Distribution Point GetHybridRandomPoint(double ProbabilityX, double ProbabilityY, double StandardDeviationX, double StandardDeviationY, double PointGenAccuracy) const;
* @return A random Point using Hybrid Distribution Point GetProfileHybridRandomPoint() const;
* @see @ref HybridRandomDocs Point GetProfileHybridRandomPoint(double PointGenAccuracy) const;
* @see @ref MissChanceFollowupDocs
*/
Point GetHybridRandomPoint(double ProbabilityX, double ProbabilityY, double StandardDeviationX, double StandardDeviationY, bool CheckPointGenAccuracyChance = true) const;
/** /**
* @brief Returns True if the Box contains a Point * @brief Returns True if the Box contains a Point

View File

@ -11,47 +11,16 @@ class Convex
{ {
public: public:
std::vector<Point> Vertices; std::vector<Point> Vertices;
/**
* @brief Default Constructor, constructs a Convex with null Vertices
* @par Description
* Default Constructor, constructs a Convex with null Vertices
*/
Convex(); Convex();
Convex(const std::vector<Point>& Vertices); Convex(const std::vector<Point>& Vertices);
/**
* @brief Constructs a Convex, by copying another
* @param const Convex& C The Convex to "copy"
*/
Convex(const Convex& C); Convex(const Convex& C);
bool Valid() const;
/** bool Contains(const Point& P) const;
* @brief Returns True if the Convex has more than two Vertices
* @return True if the Convex has more than two Vertices
*/
virtual bool Valid() const;
/**
* @brief Returns True if the Convex contains a Point
* @return True if the Convex contains a Point
*/
virtual bool Contains(const Point& P) const;
/**
* @brief Returns the middle Point of the Convex
* @return The middle Point of the Convex
*/
Point GetMiddle() const; Point GetMiddle() const;
/**
* @brief Returns a Box of the Convex
* @return A Box of the Convex
*/
Box GetBox() const; Box GetBox() const;
/** Point GetHybridRandomPoint(double ProbabilityX, double ProbabilityY, double StandardDeviationX, double StandardDeviationY, double PointGenAccuracy) const;
* @brief Returns a random Point using Hybrid Distribution Point GetProfileHybridRandomPoint() const;
* @return A random Point using Hybrid Distribution Point GetProfileHybridRandomPoint(double PointGenAccuracy) const;
* @see @ref HybridRandomDocs
* @see @ref MissChanceFollowupDocs
*/
Point GetHybridRandomPoint(double ProbabilityX, double ProbabilityY, double StandardDeviationX, double StandardDeviationY, bool CheckPointGenAccuracyChance = true) const;
Convex operator+(const Point& P) const; Convex operator+(const Point& P) const;
Convex operator-(const Point& P) const; Convex operator-(const Point& P) const;

View File

@ -17,6 +17,7 @@
#include "Interfaces/DepositBox.hpp" #include "Interfaces/DepositBox.hpp"
#include "Interfaces/Login.hpp" #include "Interfaces/Login.hpp"
#include "Interfaces/Mainscreen.hpp" #include "Interfaces/Mainscreen.hpp"
#include "Interfaces/Makescreen.hpp"
#include "Interfaces/Menu.hpp" #include "Interfaces/Menu.hpp"
#include "Interfaces/Minimap.hpp" #include "Interfaces/Minimap.hpp"
#include "Interfaces/Trade.hpp" #include "Interfaces/Trade.hpp"
@ -47,88 +48,12 @@
#include "Interactable/GameObject.hpp" #include "Interactable/GameObject.hpp"
#include "Interactable/GroundItem.hpp" #include "Interactable/GroundItem.hpp"
#include "Interactable/GroundObject.hpp" #include "Interactable/GroundObject.hpp"
#include "Interactable/Item.hpp"
#include "Interactable/NPC.hpp" #include "Interactable/NPC.hpp"
#include "Interactable/Player.hpp" #include "Interactable/Player.hpp"
#include "Interactable/WallObject.hpp" #include "Interactable/WallObject.hpp"
#include "Interactable/Widget.hpp" #include "Interactable/Widget.hpp"
//
// DoxyGen
//=======================================================
// Pages
//=======================================================
/**
* @mainpage
* Mainpage Docs
*
* @page About About
* About
*
* @page GettingStarted Getting Started
* Getting Started
*
* @page RandomMethodDocs Random Distribution Methods
* @tableofcontents
* @section UniformRandomDocs Uniform Random Distribution
* Uniform Random Documentation
* @section BinomialRandomDocs Binomial Random Distribution
* Binomial Random Documentation
* @section NormalRandomDocs Normal Random Distribution
* Normal Random Documentation
* @section HybridRandomDocs Hybrid Random Distribution
* Hybrid Random Documentation
* @section MissChanceFollowupDocs MissChanceFollowup
* MissChanceFollowupDocs
*
* @page DetailedFuncDocs Detailed Function Documentation
* @tableofcontents
* @section ItemContainers Item Containers
* @subsection ICUsing Using Item Containers
* @subsection ICLibFunctions Lib functions that use an Internal Item Container
* Some classes have functions that Interface a class-related Item Container, an example
* being Bank::GetItemIDs(), which return an array of all ItemIDs found in the Bank Item Container. These interfaced-functions
* can be found in @ref Bank, @ref Inventory, and @ref Equipment
*
* Element positions in the returned arrays (ItemIDs, ItemNames, ItemAmounts) almost always correspond to their positions in the
* visual Game Interface. If there isn't an Item in a Container position, it's -1 for ItemIDs and Amounts, and simply a blank
* String ("") for ItemNames. Remember, arrays in C++ start at 0.
*
* Classes that Interface an Item Container will have a GetIndexOf() function, @ref Inventory::GetIndexOf() and
* @ref Bank::GetIndexOf() are examples. These two functions will return the Index of the passed Item (By ID, or Name)
* relative to the Item Container array, for example if Coins are in Inventory slot 5, using @ref Inventory::GetIndexOf("Coins")
* should return 4.
*
* Here is a more extensive example, where we grab the Item amount of Coins in our Inventory;
*
* @code
* std::int32_t CoinsIndex = Inventory::GetIndexOf("Coins");
* std::vector<std::int32_t> Amounts = Inventory::GetItemAmounts();
* if ((CoinsIndex != -1) && (CoindsIndex <= Amounts.size())) //A range check will never hurt
* {
* std::cout << "Coins has an Index of " << CoinsIndex << " relative to the Inventory Item Container Array" << std::endl;
* std::cout << "There are " << Amounts[Index] << " coins in our Inventory" << std::endl;
* }
* @endcode
*
* Here is a list of all class functions that Interface an internally-used Item Container.
* - Item IDs
* - @ref Bank::GetItemIDs()
* - @ref Inventory::GetItemIDs()
* - @ref Equipment::GetItemIDs()
* .
* - Item Names
* - @ref Bank::GetItemNames()
* - @ref Inventory::GetItemNames()
* - @ref Equipment::GetItemNames()
* .
* - Item Amounts
* - @ref Bank::GetItemAmounts()
* - @ref Inventory::GetItemAmounts()
* - @ref Equipment::GetItemAmounts()
* .
* @subsection Examples
*
*/
//======================================================= //=======================================================
// Groups // Groups
//======================================================= //=======================================================
@ -171,11 +96,5 @@
* @ingroup Interfaces * @ingroup Interfaces
* *
**/ **/
//=======================================================
// Examples
//=======================================================
/**
* @example ScriptExample.cpp
**/
#endif // CORE_HPP_INCLUDED #endif // CORE_HPP_INCLUDED

View File

@ -8,6 +8,7 @@
#include "../../Core/Types/Box.hpp" #include "../../Core/Types/Box.hpp"
#include "../../Core/Types/Convex.hpp" #include "../../Core/Types/Convex.hpp"
#include "../../Core/Input.hpp" #include "../../Core/Input.hpp"
#include "../../Game/Tools/Camera.hpp"
#include <cstdint> #include <cstdint>
namespace Interactable namespace Interactable
@ -26,15 +27,17 @@ namespace Interactable
Convex GetConvex() const; Convex GetConvex() const;
Box GetBox() const; Box GetBox() const;
Point GetPoint() const; Point GetPoint() const;
Point GetPoint(double PointGenAccuracy) const;
double GetVisibility() const; double GetVisibility() const;
Tile GetTile() const; Tile GetTile() const;
// Angle - Calculates the angle you the tile to be in relation to your player, 0 = north, 90 = east, 180 = south, 270 = west bool RotateTo(std::int32_t Angle = 0) const;
void RotateTo(std::int32_t Angle = 0) const; bool RotateTo(Camera::COMPASS_DIRECTION Direction) const;
bool Hover() const;
bool Interact(const Button& B = BUTTON_LEFT) const; bool Interact(const Button& B = BUTTON_LEFT) const;
bool Interact(const std::string& Option) const; bool Interact(const std::string& Option, bool CheckTarget = true) const;
bool Interact(const std::vector<std::string>& Options) const; bool Interact(const std::vector<std::string>& Options, bool CheckTarget = true) const;
operator Internal::DecorativeObject() const; operator Internal::DecorativeObject() const;
}; };

View File

@ -8,6 +8,7 @@
#include "../../Core/Types/Box.hpp" #include "../../Core/Types/Box.hpp"
#include "../../Core/Types/Convex.hpp" #include "../../Core/Types/Convex.hpp"
#include "../../Core/Input.hpp" #include "../../Core/Input.hpp"
#include "../../Game/Tools/Camera.hpp"
#include <cstdint> #include <cstdint>
namespace Interactable namespace Interactable
@ -26,15 +27,17 @@ namespace Interactable
Convex GetConvex() const; Convex GetConvex() const;
Box GetBox() const; Box GetBox() const;
Point GetPoint() const; Point GetPoint() const;
Point GetPoint(double PointGenAccuracy) const;
double GetVisibility() const; double GetVisibility() const;
Tile GetTile() const; Tile GetTile() const;
// Angle - Calculates the angle you the tile to be in relation to your player, 0 = north, 90 = east, 180 = south, 270 = west bool RotateTo(std::int32_t Angle = 0) const;
void RotateTo(std::int32_t Angle = 0) const; bool RotateTo(Camera::COMPASS_DIRECTION Direction) const;
bool Hover() const;
bool Interact(const Button& B = BUTTON_LEFT) const; bool Interact(const Button& B = BUTTON_LEFT) const;
bool Interact(const std::string& Option) const; bool Interact(const std::string& Option, bool CheckTarget = true) const;
bool Interact(const std::vector<std::string>& Options) const; bool Interact(const std::vector<std::string>& Options, bool CheckTarget = true) const;
operator Internal::GameObject() const; operator Internal::GameObject() const;
}; };

View File

@ -8,6 +8,7 @@
#include "../../Core/Types/Box.hpp" #include "../../Core/Types/Box.hpp"
#include "../../Core/Types/Convex.hpp" #include "../../Core/Types/Convex.hpp"
#include "../../Core/Input.hpp" #include "../../Core/Input.hpp"
#include "../../Game/Tools/Camera.hpp"
#include <cstdint> #include <cstdint>
namespace Interactable namespace Interactable
@ -28,16 +29,18 @@ namespace Interactable
Convex GetConvex() const; Convex GetConvex() const;
Box GetBox() const; Box GetBox() const;
Point GetPoint() const; Point GetPoint() const;
Point GetPoint(double PointGenAccuracy) const;
double GetVisibility() const; double GetVisibility() const;
Tile GetTile() const; Tile GetTile() const;
Tile GetLocalTile() const; Tile GetLocalTile() const;
// Angle - Calculates the angle you the tile to be in relation to your player, 0 = north, 90 = east, 180 = south, 270 = west bool RotateTo(std::int32_t Angle = 0) const;
void RotateTo(std::int32_t Angle = 0) const; bool RotateTo(Camera::COMPASS_DIRECTION Direction) const;
bool Hover() const;
bool Interact(const Button& B = BUTTON_LEFT) const; bool Interact(const Button& B = BUTTON_LEFT) const;
bool Interact(const std::string& Option) const; bool Interact(const std::string& Option, bool CheckTarget = true) const;
bool Interact(const std::vector<std::string>& Options) const; bool Interact(const std::vector<std::string>& Options, bool CheckTarget = true) const;
operator Internal::GroundItem() const; operator Internal::GroundItem() const;
}; };

View File

@ -8,6 +8,7 @@
#include "../../Core/Types/Box.hpp" #include "../../Core/Types/Box.hpp"
#include "../../Core/Types/Convex.hpp" #include "../../Core/Types/Convex.hpp"
#include "../../Core/Input.hpp" #include "../../Core/Input.hpp"
#include "../../Game/Tools/Camera.hpp"
#include <cstdint> #include <cstdint>
namespace Interactable namespace Interactable
@ -26,16 +27,17 @@ namespace Interactable
Convex GetConvex() const; Convex GetConvex() const;
Box GetBox() const; Box GetBox() const;
Point GetPoint() const; Point GetPoint() const;
Point GetPoint(double PointGenAccuracy) const;
double GetVisibility() const; double GetVisibility() const;
Tile GetTile() const; Tile GetTile() const;
// Angle - Calculates the angle you the tile to be in relation to your player, 0 = north, 90 = east, 180 = south, 270 = west bool RotateTo(std::int32_t Angle = 0) const;
void RotateTo(std::int32_t Angle = 0) const; bool RotateTo(Camera::COMPASS_DIRECTION Direction) const;
bool Hover() const;
bool Interact(const Button& B = BUTTON_LEFT) const; bool Interact(const Button& B = BUTTON_LEFT) const;
bool Interact(const std::string& Option) const; bool Interact(const std::string& Option, bool CheckTarget = true) const;
bool Interact(const std::vector<std::string>& Options) const; bool Interact(const std::vector<std::string>& Options, bool CheckTarget = true) const;
operator Internal::GroundObject() const; operator Internal::GroundObject() const;
}; };

View File

@ -0,0 +1,61 @@
#ifndef INTERACTABLEITEM_CPP_INCLUDED
#define INTERACTABLEITEM_CPP_INCLUDED
#include "../../Core/Classes/ItemInfo.hpp"
#include "../../Core/Classes/Sprite.hpp"
#include "../../Core/Types/Point.hpp"
#include "../../Core/Types/Box.hpp"
#include "../../Core/Types/Convex.hpp"
#include "../../Core/Input.hpp"
#include <cstdint>
namespace Interactable
{
class Item
{
public:
typedef enum ITEM_SOURCE
{
INVENTORY,
EQUIPMENT,
BANK
} ITEM_SOURCE;
Item();
Item(std::int32_t Index, std::int32_t ID, ITEM_SOURCE Source);
Item(const Interactable::Item& Item);
bool Exists() const;
static bool ItemsExist(const std::vector<Interactable::Item>& Items);
bool IsInterfaceOpen() const;
std::int32_t GetID() const;
std::int32_t GetIndex() const;
ITEM_SOURCE GetSource() const;
std::string GetName() const;
std::int32_t GetStackAmount() const;
Internal::ItemInfo GetInfo() const;
Internal::Sprite GetSprite() const;
Convex GetConvex() const;
Box GetBox() const;
Point GetPoint() const;
Point GetPoint(double PointGenAccuracy) const;
bool Hover() const;
bool Interact(const Button& B = BUTTON_LEFT) const;
bool Interact(const std::string& Option, bool CheckTarget = false) const;
bool Interact(const std::vector<std::string>& Options, bool CheckTarget = false) const;
bool Valid() const;
operator bool() const;
virtual ~Item();
private:
std::int32_t Index;
std::int32_t ID;
ITEM_SOURCE Source;
};
}
#endif // INTERACTABLEITEM_CPP_INCLUDED

View File

@ -8,6 +8,7 @@
#include "../../Core/Types/Box.hpp" #include "../../Core/Types/Box.hpp"
#include "../../Core/Types/Convex.hpp" #include "../../Core/Types/Convex.hpp"
#include "../../Core/Input.hpp" #include "../../Core/Input.hpp"
#include "../../Game/Tools/Camera.hpp"
#include <cstdint> #include <cstdint>
namespace Interactable namespace Interactable
@ -26,19 +27,21 @@ namespace Interactable
Convex GetConvex() const; Convex GetConvex() const;
Box GetBox() const; Box GetBox() const;
Point GetPoint() const; Point GetPoint() const;
Point GetPoint(double PointGenAccuracy) const;
double GetVisibility() const; double GetVisibility() const;
Tile GetTile() const; Tile GetTile() const;
// Angle - Calculates the angle you the tile to be in relation to your player, 0 = north, 90 = east, 180 = south, 270 = west bool RotateTo(std::int32_t Angle = 0) const;
void RotateTo(std::int32_t Angle = 0) const; bool RotateTo(Camera::COMPASS_DIRECTION Direction) const;
Internal::Character GetInteracting() const; Internal::Character GetInteracting() const;
bool Interacting() const; bool Interacting() const;
bool Interacting(const Internal::Character& C) const; bool Interacting(const Internal::Character& C) const;
bool Hover() const;
bool Interact(const Button& B = BUTTON_LEFT) const; bool Interact(const Button& B = BUTTON_LEFT) const;
bool Interact(const std::string& Option) const; bool Interact(const std::string& Option, bool CheckTarget = true) const;
bool Interact(const std::vector<std::string>& Options) const; bool Interact(const std::vector<std::string>& Options, bool CheckTarget = true) const;
operator Internal::NPC() const; operator Internal::NPC() const;
}; };

View File

@ -8,6 +8,7 @@
#include "../../Core/Types/Box.hpp" #include "../../Core/Types/Box.hpp"
#include "../../Core/Types/Convex.hpp" #include "../../Core/Types/Convex.hpp"
#include "../../Core/Input.hpp" #include "../../Core/Input.hpp"
#include "../../Game/Tools/Camera.hpp"
#include <cstdint> #include <cstdint>
namespace Interactable namespace Interactable
@ -25,19 +26,21 @@ namespace Interactable
Convex GetConvex() const; Convex GetConvex() const;
Box GetBox() const; Box GetBox() const;
Point GetPoint() const; Point GetPoint() const;
Point GetPoint(double PointGenAccuracy) const;
double GetVisibility() const; double GetVisibility() const;
Tile GetTile() const; Tile GetTile() const;
// Angle - Calculates the angle you the tile to be in relation to your player, 0 = north, 90 = east, 180 = south, 270 = west bool RotateTo(std::int32_t Angle = 0) const;
void RotateTo(std::int32_t Angle = 0) const; bool RotateTo(Camera::COMPASS_DIRECTION Direction) const;
Internal::Character GetInteracting() const; Internal::Character GetInteracting() const;
bool Interacting() const; bool Interacting() const;
bool Interacting(const Internal::Character& C) const; bool Interacting(const Internal::Character& C) const;
bool Hover() const;
bool Interact(const Button& B = BUTTON_LEFT) const; bool Interact(const Button& B = BUTTON_LEFT) const;
bool Interact(const std::string& Option) const; bool Interact(const std::string& Option, bool CheckTarget = true) const;
bool Interact(const std::vector<std::string>& Options) const; bool Interact(const std::vector<std::string>& Options, bool CheckTarget = true) const;
operator Internal::Player() const; operator Internal::Player() const;
}; };

View File

@ -8,6 +8,7 @@
#include "../../Core/Types/Box.hpp" #include "../../Core/Types/Box.hpp"
#include "../../Core/Types/Convex.hpp" #include "../../Core/Types/Convex.hpp"
#include "../../Core/Input.hpp" #include "../../Core/Input.hpp"
#include "../../Game/Tools/Camera.hpp"
#include <cstdint> #include <cstdint>
namespace Interactable namespace Interactable
@ -26,15 +27,17 @@ namespace Interactable
Convex GetConvex() const; Convex GetConvex() const;
Box GetBox() const; Box GetBox() const;
Point GetPoint() const; Point GetPoint() const;
Point GetPoint(double PointGenAccuracy) const;
double GetVisibility() const; double GetVisibility() const;
Tile GetTile() const; Tile GetTile() const;
// Angle - Calculates the angle you the tile to be in relation to your player, 0 = north, 90 = east, 180 = south, 270 = west bool RotateTo(std::int32_t Angle = 0) const;
void RotateTo(std::int32_t Angle = 0) const; bool RotateTo(Camera::COMPASS_DIRECTION Direction) const;
bool Hover() const;
bool Interact(const Button& B = BUTTON_LEFT) const; bool Interact(const Button& B = BUTTON_LEFT) const;
bool Interact(const std::string& Option) const; bool Interact(const std::string& Option, bool CheckTarget = true) const;
bool Interact(const std::vector<std::string>& Options) const; bool Interact(const std::vector<std::string>& Options, bool CheckTarget = true) const;
operator Internal::WallObject() const; operator Internal::WallObject() const;
}; };

View File

@ -24,7 +24,9 @@ namespace Interactable
Box GetBox() const; Box GetBox() const;
Point GetPoint() const; Point GetPoint() const;
Point GetPoint(double PointGenAccuracy) const;
bool Hover() const;
bool Interact(const Button& B = BUTTON_LEFT) const; bool Interact(const Button& B = BUTTON_LEFT) const;
bool Interact(const std::string& Option) const; bool Interact(const std::string& Option) const;
bool Interact(const std::vector<std::string>& Options) const; bool Interact(const std::vector<std::string>& Options) const;

View File

@ -2,89 +2,124 @@
#define BANK_HPP_INCLUDED #define BANK_HPP_INCLUDED
#include "../../Core/Types/Convex.hpp" #include "../../Core/Types/Convex.hpp"
#include "../../Game/Interactable/Item.hpp"
#include <functional>
#include <string> #include <string>
#include <cstdint> #include <cstdint>
#include <vector> #include <vector>
/** @addtogroup Interfaces /** @addtogroup Interfaces
* @{ */ * @{
/**
* @note All methods require the Bank to be currently Open to successfully return a proper result
*/ */
class Bank class Bank
{ {
public: public:
enum BANK_AMOUNT
{
ALL = -1,
ALL_BUT_ONE = 0
};
typedef enum WITHDRAW_MODE typedef enum WITHDRAW_MODE
{ {
ITEM, ITEM,
NOTED NOTED
} WITHDRAW_MODE; } WITHDRAW_MODE;
typedef enum PIN_STEP
{
FIRST,
SECOND,
THIRD,
FOURTH,
SUBMITTING,
TOO_MANY_ATTEMPTS,
BANK_OPEN
} PIN_STEP;
static bool IsOpen(); static bool IsOpen();
static bool Close(); static bool Close();
static bool EnterPin();
static std::vector<std::int32_t> GetItemIDs(); static std::vector<std::int32_t> GetItemIDs();
static std::vector<std::string> GetItemNames(); static std::vector<std::string> GetItemNames();
static std::vector<std::int32_t> GetItemAmounts(); static std::vector<std::int32_t> GetItemAmounts();
static std::int32_t GetItemAmount(std::int32_t ID); static std::vector<Interactable::Item> GetItems();
static std::int32_t GetItemAmount(const std::string& Name); static std::vector<Interactable::Item> GetItems(std::int32_t ID);
static std::vector<Interactable::Item> GetItems(const std::string& Name);
static std::vector<Interactable::Item> GetItems(const std::vector<std::int32_t>& IDs);
static std::vector<Interactable::Item> GetItems(const std::vector<std::string>& Names);
static std::vector<Interactable::Item> GetItems(const std::function<bool (const Interactable::Item&)>& Filter);
static Interactable::Item GetItem();
static Interactable::Item GetItem(std::int32_t ID);
static Interactable::Item GetItem(const std::string& Name);
static Interactable::Item GetItem(const std::vector<std::int32_t>& IDs);
static Interactable::Item GetItem(const std::vector<std::string>& Names);
static Interactable::Item GetItem(const std::function<bool (const Interactable::Item&)>& Filter);
static std::int32_t Count(std::int32_t ID);
static std::int32_t Count(const std::string& Name);
static std::int32_t Count(const Interactable::Item& Item);
static std::int32_t GetIndexOf(std::int32_t ID); static std::int32_t GetIndexOf(std::int32_t ID);
static std::int32_t GetIndexOf(const std::string& Name); static std::int32_t GetIndexOf(const std::string& Name);
static Convex GetConvexByIndex(std::int32_t Index);
static Convex GetConvexOf(std::int32_t ID);
static Convex GetConvexOf(const std::string& Name);
static bool Contains(std::int32_t ID); static bool Contains(std::int32_t ID);
static bool Contains(const std::string& Name); static bool Contains(const std::string& Name);
static bool Contains(const std::vector<std::int32_t>& IDs); static bool Contains(const Interactable::Item& Item);
static bool Contains(const std::vector<std::string>& Names); static bool Contains(const std::vector<std::int32_t>& IDs); // true if all items are found at least once
static bool Contains(const std::vector<std::string>& Names); // true if all items are found at least once
static bool Contains(const std::vector<Interactable::Item>& Items);
static bool ContainsAny(const std::vector<std::int32_t>& IDs); static bool ContainsAny(const std::vector<std::int32_t>& IDs);
static bool ContainsAny(const std::vector<std::string>& Names); static bool ContainsAny(const std::vector<std::string>& Names);
static bool ContainsAny(const std::vector<Interactable::Item>& Items);
static bool ContainsOnly(std::int32_t ID); static bool ContainsOnly(std::int32_t ID);
static bool ContainsOnly(const std::string& Name); static bool ContainsOnly(const std::string& Name);
static bool ContainsOnly(const Interactable::Item& Item);
static bool ContainsOnly(const std::vector<std::int32_t>& IDs); static bool ContainsOnly(const std::vector<std::int32_t>& IDs);
static bool ContainsOnly(const std::vector<std::string>& Names); static bool ContainsOnly(const std::vector<std::string>& Names);
static bool ContainsOnly(const std::vector<Interactable::Item>& Items);
static std::int32_t GetCurrentTab(); static std::int32_t GetCurrentTab();
static std::int32_t GetTabOf(std::int32_t ID); static std::int32_t GetTabOf(std::int32_t ID);
static std::int32_t GetTabOf(const std::string& Name); static std::int32_t GetTabOf(const std::string& Name);
static std::int32_t GetTabOf(const Interactable::Item& Item);
static bool OpenTab(std::int32_t Tab); static bool OpenTab(std::int32_t Tab);
static bool ScrollTo(std::int32_t ID, bool OpenRespectiveTab = false); static bool ScrollTo(std::int32_t ID, bool OpenRespectiveTab = false);
static bool ScrollTo(const std::string& Name, bool OpenRespectiveTab = false); static bool ScrollTo(const std::string& Name, bool OpenRespectiveTab = false);
static bool ScrollTo(const Interactable::Item& Item, bool OpenRespectiveTab = false);
static bool InteractItemByIndex(std::int32_t ID, const std::string& Option); // -1 = all, 0 = all-but-one
static bool InteractItem(std::int32_t ID, const std::string& Option, bool OpenRespectiveTab = false); static bool Withdraw(std::int32_t ID, std::int32_t Amount, bool OpenRespectiveTab = false);
static bool InteractItem(const std::string& Name, const std::string& Option, bool OpenRespectiveTab = false); static bool Withdraw(const std::string& Name, std::int32_t Amount, bool OpenRespectiveTab = false);
static bool Withdraw(const Interactable::Item& Item, std::int32_t Amount, bool OpenRespectiveTab = false);
static bool WithdrawXOf(std::int32_t ID, std::int32_t Amount, bool OpenRespectiveTab = false); // -1 = all
static bool WithdrawXOf(const std::string& Name, std::int32_t Amount, bool OpenRespectiveTab = false); static bool Deposit(std::int32_t ID, std::int32_t Amount);
static bool WithdrawAllOf(std::int32_t ID, bool OpenRespectiveTab = false); static bool Deposit(const std::string& Name, std::int32_t Amount);
static bool WithdrawAllOf(const std::string& Name, bool OpenRespectiveTab = false); static bool Deposit(const Interactable::Item& Item, std::int32_t Amount);
static bool WithdrawAllButOneOf(std::int32_t ID, bool OpenRespectiveTab = false);
static bool WithdrawAllButOneOf(const std::string& Name, bool OpenRespectiveTab = false);
static bool DepositAllOf(std::int32_t ID);
static bool DepositAllOf(const std::string& Name);
static bool DepositXOf(std::int32_t ID, std::int32_t Amount);
static bool DepositXOf(const std::string& Name, std::int32_t Amount);
static bool DepositAllExcept(const std::string& Name);
static bool DepositAllExcept(const std::vector<std::string>& Names);
static bool DepositAllExcept(std::int32_t ID); static bool DepositAllExcept(std::int32_t ID);
static bool DepositAllExcept(const std::string& Name);
static bool DepositAllExcept(const Interactable::Item& Item);
static bool DepositAllExcept(const std::vector<std::int32_t>& IDs); static bool DepositAllExcept(const std::vector<std::int32_t>& IDs);
static bool DepositAllExcept(const std::vector<std::string>& Names);
static bool DepositAllExcept(const std::vector<Interactable::Item>& Items);
static bool DepositAll(); static bool DepositAll();
static bool DepositEquipment(); static bool DepositEquipment();
static WITHDRAW_MODE GetWithdrawMode(); static WITHDRAW_MODE GetWithdrawMode();
static bool SetWithdrawMode(WITHDRAW_MODE Mode); static bool SetWithdrawMode(WITHDRAW_MODE Mode);
static PIN_STEP GetEnterPinStep();
static bool IsEnterPinOpen();
static bool EnterPin(bool Terminate = true);
}; };
/** @} */ /** @} */

View File

@ -1,16 +1,18 @@
#ifndef EQUIPMENT_HPP_INCLUDED #ifndef EQUIPMENT_HPP_INCLUDED
#define EQUIPMENT_HPP_INCLUDED #define EQUIPMENT_HPP_INCLUDED
#include "../../../Game/Interactable/Item.hpp"
#include <cstdint> #include <cstdint>
#include <vector> #include <vector>
#include <string> #include <string>
#include <functional>
/** @addtogroup GameTabs /** @addtogroup GameTabs
* @{ */ * @{ */
class Equipment class Equipment
{ {
public: public:
typedef enum SLOTS typedef enum SLOT
{ {
HEAD, HEAD,
CAPE, CAPE,
@ -23,7 +25,7 @@ class Equipment
FEET, FEET,
RING, RING,
AMMO AMMO
} SLOTS; } SLOT;
static bool IsOpen(); static bool IsOpen();
static bool Open(); static bool Open();
@ -33,36 +35,54 @@ class Equipment
static std::vector<std::string> GetItemNames(); static std::vector<std::string> GetItemNames();
static std::vector<std::int32_t> GetItemAmounts(); static std::vector<std::int32_t> GetItemAmounts();
static std::int32_t GetItemID(SLOTS Slot); static std::vector<Interactable::Item> GetItems();
static std::string GetItemName(SLOTS Slot); static std::vector<Interactable::Item> GetItems(std::int32_t ID);
static std::vector<Interactable::Item> GetItems(const std::string& Name);
static std::vector<Interactable::Item> GetItems(const std::vector<SLOT>& Slots);
static std::vector<Interactable::Item> GetItems(const std::vector<std::int32_t>& IDs);
static std::vector<Interactable::Item> GetItems(const std::vector<std::string>& Names);
static std::vector<Interactable::Item> GetItems(const std::function<bool (const Interactable::Item&)>& Filter);
static std::int32_t GetItemAmount(SLOTS Slot); static Interactable::Item GetItem();
static std::int32_t GetItemAmount(std::int32_t ID); static Interactable::Item GetItem(SLOT Slot);
static std::int32_t GetItemAmount(const std::string& Name); static Interactable::Item GetItem(std::int32_t ID);
static Interactable::Item GetItem(const std::string& Name);
static Interactable::Item GetItem(const std::vector<std::int32_t>& IDs);
static Interactable::Item GetItem(const std::vector<std::string>& Names);
static Interactable::Item GetItem(const std::function<bool (const Interactable::Item&)>& Filter);
static SLOTS GetSlotOf(std::int32_t ID); static std::int32_t Count(SLOT Slot);
static SLOTS GetSlotOf(const std::string& Name); static std::int32_t Count(std::int32_t ID);
static std::int32_t Count(const std::string& Name);
static std::int32_t Count(const Interactable::Item& Item);
static std::int32_t Count(const std::vector<std::int32_t>& IDs);
static std::int32_t Count(const std::vector<std::string>& Names);
static std::int32_t Count(const std::vector<Interactable::Item>& Items);
static SLOT GetSlotOf(std::int32_t ID);
static SLOT GetSlotOf(const std::string& Name);
static bool Contains(std::int32_t ID); static bool Contains(std::int32_t ID);
static bool Contains(const std::string& Name); static bool Contains(const std::string& Name);
static bool Contains(const std::vector<std::int32_t>& IDs); static bool Contains(const Interactable::Item& Item);
static bool Contains(const std::vector<std::string>& Names); static bool Contains(const std::vector<std::int32_t>& IDs); // true if all items are found at least once
static bool Contains(const std::vector<std::string>& Names); // true if all items are found at least once
static bool Contains(const std::vector<Interactable::Item>& Items);
static bool ContainsAny(const std::vector<std::int32_t>& IDs); static bool ContainsAny(const std::vector<std::int32_t>& IDs);
static bool ContainsAny(const std::vector<std::string>& Names); static bool ContainsAny(const std::vector<std::string>& Names);
static bool ContainsAny(const std::vector<Interactable::Item>& Items);
static bool ContainsOnly(std::int32_t ID); static bool ContainsOnly(std::int32_t ID);
static bool ContainsOnly(const std::string& Name); static bool ContainsOnly(const std::string& Name);
static bool ContainsOnly(const Interactable::Item& Item);
static bool ContainsOnly(const std::vector<std::int32_t>& IDs); static bool ContainsOnly(const std::vector<std::int32_t>& IDs);
static bool ContainsOnly(const std::vector<std::string>& Names); static bool ContainsOnly(const std::vector<std::string>& Names);
static bool ContainsOnly(const std::vector<Interactable::Item>& Items);
static bool InteractItemBySlot(SLOTS Slot, const std::string& Option); static bool Unequip(std::int32_t ID);
static bool InteractItem(std::int32_t ID, const std::string& Option); static bool Unequip(const std::string& Name);
static bool InteractItem(const std::string& Name, const std::string& Option); static bool Unequip(const Interactable::Item& Item);
static bool UnequipItem(SLOTS Slot);
static bool UnequipItem(std::int32_t ID);
static bool UnequipItem(const std::string& Name);
}; };
/** @} */ /** @} */

View File

@ -3,6 +3,8 @@
#include "../../../Core/Types/Box.hpp" #include "../../../Core/Types/Box.hpp"
#include "../../../Core/Types/Convex.hpp" #include "../../../Core/Types/Convex.hpp"
#include "../../../Game/Interactable/Item.hpp"
#include <functional>
#include <vector> #include <vector>
#include <cstdint> #include <cstdint>
#include <string> #include <string>
@ -20,19 +22,36 @@ class Inventory
static std::vector<std::string> GetItemNames(); static std::vector<std::string> GetItemNames();
static std::vector<std::int32_t> GetItemAmounts(); static std::vector<std::int32_t> GetItemAmounts();
static std::vector<Interactable::Item> GetItems();
static std::vector<Interactable::Item> GetItems(std::int32_t ID);
static std::vector<Interactable::Item> GetItems(const std::string& Name);
static std::vector<Interactable::Item> GetItems(const std::vector<std::int32_t>& IDs);
static std::vector<Interactable::Item> GetItems(const std::vector<std::string>& Names);
static std::vector<Interactable::Item> GetItems(const std::function<bool (const Interactable::Item&)>& Filter);
static Interactable::Item GetItem();
static Interactable::Item GetItem(std::int32_t ID);
static Interactable::Item GetItem(const std::string& Name);
static Interactable::Item GetItem(const std::vector<std::int32_t>& IDs);
static Interactable::Item GetItem(const std::vector<std::string>& Names);
static Interactable::Item GetItem(const std::function<bool (const Interactable::Item&)>& Filter);
static bool IsEmpty(); static bool IsEmpty();
static bool IsFull(); static bool IsFull();
static bool IsItemSelected(); static bool IsItemSelected();
static bool IsItemSelected(std::int32_t ID); static bool IsItemSelected(std::int32_t ID);
static bool IsItemSelected(const std::string& Name); static bool IsItemSelected(const std::string& Name);
static bool IsItemSelected(const Interactable::Item& Item);
static std::string GetItemSelectedName(); static std::string GetItemSelectedName();
static std::int32_t Count(std::int32_t ID); static std::int32_t Count(std::int32_t ID);
static std::int32_t Count(const std::string& Name); static std::int32_t Count(const std::string& Name);
static std::int32_t Count(const Interactable::Item& Item);
static std::int32_t Count(const std::vector<std::int32_t>& IDs); static std::int32_t Count(const std::vector<std::int32_t>& IDs);
static std::int32_t Count(const std::vector<std::string>& Names); static std::int32_t Count(const std::vector<std::string>& Names);
static std::int32_t Count(const std::vector<Interactable::Item>& Items);
static std::int32_t CountOccupied(); static std::int32_t CountOccupied();
static std::int32_t CountEmpty(); static std::int32_t CountEmpty();
@ -44,18 +63,8 @@ class Inventory
static std::vector<std::int32_t> GetIndicesOf(std::int32_t ID); static std::vector<std::int32_t> GetIndicesOf(std::int32_t ID);
static std::vector<std::int32_t> GetIndicesOf(const std::string& Name); static std::vector<std::int32_t> GetIndicesOf(const std::string& Name);
static std::vector<std::int32_t> GetIndicesOf(const std::vector<std::int32_t>& IDs);
static Convex GetConvexByIndex(std::int32_t Index); static std::vector<std::int32_t> GetIndicesOf(const std::vector<std::string>& Names);
static Convex GetConvexOf(std::int32_t ID);
static Convex GetConvexOf(const std::string& Name);
static Convex GetConvexOf(const std::vector<std::int32_t>& IDs); // Returns first found ID Convex
static Convex GetConvexOf(const std::vector<std::string>& Names); // Returns first found Name Convex
static Box GetBoxByIndex(std::int32_t Index);
static Box GetBoxOf(std::int32_t ID);
static Box GetBoxOf(const std::string& Name);
static Box GetBoxOf(const std::vector<std::int32_t>& IDs); // Returns first found ID box
static Box GetBoxOf(const std::vector<std::string>& Names); // Returns first found Name box
static std::vector<Box> GetSlotBoxes(); static std::vector<Box> GetSlotBoxes();
static std::vector<Box> GetBoxesOf(std::int32_t ID); static std::vector<Box> GetBoxesOf(std::int32_t ID);
@ -63,34 +72,33 @@ class Inventory
static bool Contains(std::int32_t ID); static bool Contains(std::int32_t ID);
static bool Contains(const std::string& Name); static bool Contains(const std::string& Name);
static bool Contains(const Interactable::Item& Item);
static bool Contains(const std::vector<std::int32_t>& IDs); // true if all items are found at least once static bool Contains(const std::vector<std::int32_t>& IDs); // true if all items are found at least once
static bool Contains(const std::vector<std::string>& Names); // true if all items are found at least once static bool Contains(const std::vector<std::string>& Names); // true if all items are found at least once
static bool Contains(const std::vector<Interactable::Item>& Items);
static bool ContainsAny(const std::vector<std::int32_t>& IDs); static bool ContainsAny(const std::vector<std::int32_t>& IDs);
static bool ContainsAny(const std::vector<std::string>& Names); static bool ContainsAny(const std::vector<std::string>& Names);
static bool ContainsAny(const std::vector<Interactable::Item>& Items);
static bool ContainsOnly(std::int32_t ID); static bool ContainsOnly(std::int32_t ID);
static bool ContainsOnly(const std::string& Name); static bool ContainsOnly(const std::string& Name);
static bool ContainsOnly(const Interactable::Item& Item);
static bool ContainsOnly(const std::vector<std::int32_t>& IDs); static bool ContainsOnly(const std::vector<std::int32_t>& IDs);
static bool ContainsOnly(const std::vector<std::string>& Names); static bool ContainsOnly(const std::vector<std::string>& Names);
static bool ContainsOnly(const std::vector<Interactable::Item>& Items);
static bool InteractItemByIndex(std::int32_t Index, const std::string& Option); static bool Use(std::int32_t ID, std::int32_t ID2 = -1, bool UseSecondFirst = false);
static bool InteractItemByIndex(std::int32_t Index, const std::vector<std::string>& Options); static bool Use(const std::string& Name, const std::string& Name2 = "", bool UseSecondFirst = false);
static bool InteractItem(std::int32_t ID, const std::string& Option); static bool Use(const Interactable::Item& Item, const Interactable::Item& Item2 = Interactable::Item(), bool UseSecondFirst = false);
static bool InteractItem(const std::string& Name, const std::string& Option);
static bool InteractItem(std::int32_t ID, const std::vector<std::string>& Options);
static bool InteractItem(const std::string& Name, const std::vector<std::string>& Options);
static bool InteractItem(const std::vector<std::int32_t>& IDs, const std::vector<std::string>& Options); //Interacts with first found ID
static bool InteractItem(const std::vector<std::string>& Names, const std::vector<std::string>& Options); //Interacts with first found Name
static bool DropItemByIndex(std::int32_t Index, bool AllowShiftClick = true); static bool Equip(std::int32_t ID);
static bool DropItem(std::int32_t ID, bool AllowShiftClick = true); static bool Equip(const std::string& Name);
static bool DropItem(const std::string& Name, bool AllowShiftClick = true); static bool Equip(const Interactable::Item& Item);
static bool UseItem(std::int32_t ID); static bool Drop(std::int32_t ID, bool AllowShiftClick = true);
static bool UseItem(const std::string& Name); static bool Drop(const std::string& Name, bool AllowShiftClick = true);
static bool UseItemOn(std::int32_t FirstItemID, std::int32_t SecondItemID); static bool Drop(const Interactable::Item& Item, bool AllowShiftClick = true);
static bool UseItemOn(const std::string& FirstItemName, const std::string& SecondItemName);
}; };
/** @} */ /** @} */

View File

@ -42,6 +42,8 @@ class Mainscreen
static bool IsUpText(const std::vector<std::string>& UpTexts); static bool IsUpText(const std::vector<std::string>& UpTexts);
static bool WaitIsUpText(std::uint32_t Duration, std::uint32_t Step, const std::string& UpText); static bool WaitIsUpText(std::uint32_t Duration, std::uint32_t Step, const std::string& UpText);
static bool WaitUpTextContains(std::uint32_t Duration, std::uint32_t Step, const std::string& UpText); static bool WaitUpTextContains(std::uint32_t Duration, std::uint32_t Step, const std::string& UpText);
static bool WaitUpTextContains(std::uint32_t Duration, std::uint32_t Step, const std::vector<std::string>& UpTexts);
}; };
/** @} */ /** @} */

View File

@ -0,0 +1,46 @@
#ifndef MAKESCREEN_HPP_INCLUDED
#define MAKESCREEN_HPP_INCLUDED
#include <cstdint>
#include <string>
/** @addtogroup Interfaces
* @{ */
class Makescreen
{
public:
enum MAKE_AMOUNT
{
ALL = -1
};
/**
* @brief Returns true if the Makescreen is open
*
* @return true if the makescreen is open
*/
static bool IsOpen();
/**
* @brief Selects or enters the amount passed, and clicks the middle "Make" button, before returning true
*
* @param Amount The amount to select, before clicking the middle "Make" button, passing -1 will use the All button
* @param ClickButtonOverride Forces the function to click the needed amount button again, regardless if it's already selected
* @return true if the function succesfully clicks the "Make" button
* @return false if the makescreen isn't open, or interaction fails
*/
static bool Make(std::int32_t Amount, bool ClickButtonOverride = false);
/**
* @brief Returns the text of the middle widget when the Makescreen is open
*
* @return Text of the middle widget when the Makescreen is open
*/
static std::string GetCraftingName();
};
/** @} */
#endif // MAKESCREEN_HPP_INCLUDED

View File

@ -58,6 +58,13 @@ class Minimap
* @return true if the function succesfully clicks the compass, and the camera angle is 0 / North * @return true if the function succesfully clicks the compass, and the camera angle is 0 / North
*/ */
static bool ClickCompass(); // Clicks north static bool ClickCompass(); // Clicks north
/**
* @brief Clicks the quick-prayer orb
*
* @return true if the function succesfully clicked the orb
*/
static bool ClickQuickPrayer();
}; };
/** @} */ /** @} */

Binary file not shown.