Release 1.31

master
Kasi 2019-07-06 20:05:45 +01:00
parent 3fa3091584
commit fe5f661279
6 changed files with 12 additions and 55 deletions

View File

@ -27,6 +27,7 @@ namespace Internal
std::int32_t GetBoxIndex() const; std::int32_t GetBoxIndex() const;
std::vector<Widget> GetChildren() const; std::vector<Widget> GetChildren() const;
Widget GetChildren(std::int32_t I) const; Widget GetChildren(std::int32_t I) const;
bool GetHasListener() const;
std::int32_t GetHeight() const; std::int32_t GetHeight() const;
bool GetHidden() const; bool GetHidden() const;
std::int32_t GetID() const; std::int32_t GetID() const;

View File

@ -81,34 +81,7 @@ namespace Globals
// grandchild 0 = proper widget bounds, grandchild 1 = text // grandchild 0 = proper widget bounds, grandchild 1 = text
//************ Chat.cpp ************// //************ Chat.cpp ************//
typedef struct ChatDialogWidgetDef const WidgetDef CHAT_DIALOGUE_NEST_PARENT = { 162, 37 };
{
std::int32_t Parent = -1;
std::int32_t TitleChild = -1;
std::int32_t ContinueChild = -1;
std::int32_t ContentChild = -1;
} ChatDialogWidgetDef;
typedef struct SpriteChatDialogWidgetDef
{
std::int32_t Parent = -1;
std::int32_t SpriteChild = -1;
std::int32_t ContentChild = -1;
std::int32_t OptionsContainerChild = -1; // Options are found via grandchildren of this widget
std::int32_t OptionsContainerChildStart = -1; // Child to add an Index to (193, 0, 2 + Index)
} SpriteChatDialogWidgetDef;
const ChatDialogWidgetDef CHAT_NPC_CHAT_WIDGETS = { 231, 2, 3, 4 }; // Appears when a NPC is talking (NPC head is visible in dialogue)
const ChatDialogWidgetDef CHAT_PLAYER_CHAT_WIDGETS = { 217, 2, 3, 4 }; // Appears when a Player is talking (Player head is visible in dialogue)
const SpriteChatDialogWidgetDef CHAT_SPRITE_WIDGETS = { 193, 1, 2, 0, 2 }; // Appears when a sprite is shown, mainly quest dialogues
const ChatDialogWidgetDef CHAT_LEVEL_UP_CHAT_WIDGETS = { 233, 1, 3, 2 }; // Appears when leveling up
const ChatDialogWidgetDef CHAT_BANK_PIN_ERROR_WIDGETS = { 229, 1, 2 }; // Appears when entering the bank pin wrong
const WidgetDef CHAT_SELECT_OPTION_CONTAINER = { 219, 1 }; // Container for all Select Option options
const WidgetDef CHAT_SELECT_OPTION_TITLE = { CHAT_SELECT_OPTION_CONTAINER.Parent, CHAT_SELECT_OPTION_CONTAINER.Child, 0 };
const WidgetDef CHAT_ENTER_AMOUNT_TITLE = { 162, 44 };
const WidgetDef CHAT_ENTER_AMOUNT = { 162, 45 }; // Input widget (* when blank)
//************ DepositBox.cpp ************// //************ DepositBox.cpp ************//
const std::int32_t DEPOSIT_BOX_PARENT = 192; const std::int32_t DEPOSIT_BOX_PARENT = 192;

View File

@ -27,6 +27,9 @@ namespace Interactable
bool IsHidden() const; bool IsHidden() const;
bool IsVisible() const; bool IsVisible() const;
std::vector<Interactable::Widget> GetInteractableChildren() const; std::vector<Interactable::Widget> GetInteractableChildren() const;
std::vector<Interactable::Widget> GetDynamicInteractableChildren() const;
std::vector<Interactable::Widget> GetStaticInteractableChildren() const;
std::vector<Interactable::Widget> GetNestedInteractableChildren() const;
std::vector<std::int32_t> GetNormalizedItemIDs() const; std::vector<std::int32_t> GetNormalizedItemIDs() const;
Box GetBox() const; Box GetBox() const;

View File

@ -2,6 +2,7 @@
#define CHAT_HPP_INCLUDED #define CHAT_HPP_INCLUDED
#include "../../Core/Classes/MessageNode.hpp" #include "../../Core/Classes/MessageNode.hpp"
#include "../../Game/Interactable/Widget.hpp"
#include <cstdint> #include <cstdint>
#include <string> #include <string>
#include <vector> #include <vector>
@ -16,7 +17,7 @@ namespace Chat
PLEASE_WAIT, PLEASE_WAIT,
ENTER_AMOUNT, ENTER_AMOUNT,
LEVEL_UP, LEVEL_UP,
SPRITE_SELECT_OPTION PLEASE_WAIT_TIMED
} DIALOGUE_STATE; } DIALOGUE_STATE;
typedef enum CHAT_TYPE typedef enum CHAT_TYPE
@ -84,22 +85,19 @@ namespace Chat
Internal::MessageNode GetLastMessage(); Internal::MessageNode GetLastMessage();
Internal::MessageNode GetLastMessage(CHAT_TYPE Type); Internal::MessageNode GetLastMessage(CHAT_TYPE Type);
std::vector<Interactable::Widget> GetDialogueWidgets();
DIALOGUE_STATE GetDialogueState(); DIALOGUE_STATE GetDialogueState();
std::vector<std::string> GetDialogueOptions(); std::vector<std::string> GetDialogueOptions();
std::string GetDialogueTitle();
std::string GetDialogueContent();
std::int32_t GetDialogueOptionIndexOf(const std::string& Option); bool WaitDialogueState(std::uint32_t Duration, std::uint32_t Step, Chat::DIALOGUE_STATE State, bool Result = true); // Waits until the current chat state equals State
std::int32_t GetDialogueOptionIndexOf(const std::vector<std::string>& Options);
bool DialogueContains(const std::string& Text);
bool DialogueContains(const std::vector<std::string>& Texts);
bool ClickContinue(bool UseKeyboard = false); bool ClickContinue(bool UseKeyboard = false);
bool EnterAmount(std::int32_t Amount); bool EnterAmount(std::int32_t Amount);
bool SelectDialogueOption(std::int32_t Index, bool UseKeyboard = false); // Index starts at 0
bool SelectDialogueOption(const std::string& Option, bool UseKeyboard = false); bool SelectDialogueOption(const std::string& Option, bool UseKeyboard = false);
bool SelectDialogueOption(const std::vector<std::string>& Options, bool UseKeyboard = false); bool SelectDialogueOption(const std::vector<std::string>& Options, bool UseKeyboard = false);
bool WaitDialogueState(std::uint32_t Duration, std::uint32_t Step, Chat::DIALOGUE_STATE State, bool Result = true); // Waits until the current chat state equals State
} }
#endif // CHAT_HPP_INCLUDED #endif // CHAT_HPP_INCLUDED

View File

@ -39,24 +39,6 @@ namespace Menu
*/ */
std::int32_t GetCount(); std::int32_t GetCount();
/**
* @brief Get the raw, un-filtered menu actions
* @return std::vector<std::string> of raw menu actions
* @note The game includes color code in some menu actions or targets
* @warning The result can be inaccurate if the menu isn't open before calling this function
*/
[[deprecated("Use Internal::GetMenuActions() instead")]]
std::vector<std::string> GetActionsRaw();
/**
* @brief Get the raw, un-touched menu targets
* @return std::vector<std::string> of targets
* @note The game includes color code in some menu actions or targets
* @warning The result can be inaccurate if the menu isn't open before calling this function
*/
[[deprecated("Use Internal::GetMenuTargets() instead")]]
std::vector<std::string> GetTargetsRaw();
/** /**
* @brief Attempts to verify the order of the passed menu actions and targets * @brief Attempts to verify the order of the passed menu actions and targets
* @return true if the passed menu actions and targets are in the correct order * @return true if the passed menu actions and targets are in the correct order

Binary file not shown.