AlpacaLibrary/Include/Game/Interfaces/Chat.hpp

76 lines
2.3 KiB
C++
Raw Normal View History

2017-12-25 23:49:48 +00:00
#ifndef CHAT_HPP_INCLUDED
#define CHAT_HPP_INCLUDED
#include "../../Core/Classes/MessageNode.hpp"
#include <cstdint>
#include <string>
#include <vector>
/** @addtogroup Interfaces
* @{ */
class Chat
{
public:
typedef enum DIALOGUE_STATE
{
IDLE,
CLICK_CONTINUE,
SELECT_OPTION,
2018-05-17 01:18:17 +00:00
PLEASE_WAIT,
2018-04-04 00:54:59 +00:00
ENTER_AMOUNT,
LEVEL_UP
2017-12-25 23:49:48 +00:00
} DIALOGUE_STATE;
typedef enum CHAT_TYPE
{
SYSTEM = 200,
PUBLIC_CHAT = 201,
PRIVATE_CHAT = 202,
CLAN_CHAT = 203,
_SYSTEM = 0,
_PUBLIC_CHAT = 2,
_PRIVATE_CHAT_INCOMING = 3,
_PRIVATE_CHAT_SYSTEM = 5,
_PRIVATE_CHAT_OUTGOING = 6,
_CLAN_CHAT = 9,
_CLAN_CHAT_SYSTEM = 11,
_BROADCAST_SYSTEM = 14,
_EXAMINE_ITEM = 27,
_EXAMINE_NPC = 28,
_EXAMINE_GAMEOBJECT = 29,
_PRIVATE_CHAT_SYSTEM2 = 30,
_AUTO_CHAT = 90,
_TRADE_INCOMING = 101,
_TRADE = 102
} CHAT_TYPE;
2018-03-18 14:38:29 +00:00
static std::vector<Internal::MessageNode> GetMessages(CHAT_TYPE Type);
static std::vector<Internal::MessageNode> GetMessages(CHAT_TYPE Type, bool Sort);
static Internal::MessageNode GetLastMessage(CHAT_TYPE Type);
2017-12-25 23:49:48 +00:00
static DIALOGUE_STATE GetDialogueState();
static std::vector<std::string> GetDialogueOptions();
static std::string GetDialogueTitle();
2018-07-31 12:20:27 +00:00
static std::string GetDialogueContent();
2018-05-17 01:18:17 +00:00
static std::int32_t GetDialogueOptionIndexOf(const std::string& Option);
static std::int32_t GetDialogueOptionIndexOf(const std::vector<std::string>& Options);
2018-05-10 14:03:33 +00:00
static bool ClickContinue(bool UseKeyboard = false);
2017-12-25 23:49:48 +00:00
static bool EnterAmount(std::int32_t Amount);
2018-05-17 01:18:17 +00:00
2018-05-19 01:48:01 +00:00
static bool SelectDialogueOption(std::int32_t Index, bool UseKeyboard = false); // Index starts at 0
2018-05-10 14:03:33 +00:00
static bool SelectDialogueOption(const std::string& Option, bool UseKeyboard = false);
static bool SelectDialogueOption(const std::vector<std::string>& Options, bool UseKeyboard = false);
2018-05-17 01:18:17 +00:00
static 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
2017-12-25 23:49:48 +00:00
};
/** @} */
#endif // CHAT_HPP_INCLUDED