AlpacaLibrary/Include/Game/Interfaces/Chat.hpp

76 lines
2.2 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
* @{ */
2018-12-27 18:17:09 +00:00
namespace Chat
2017-12-25 23:49:48 +00:00
{
2018-12-27 18:17:09 +00:00
typedef enum DIALOGUE_STATE
{
IDLE,
CLICK_CONTINUE,
SELECT_OPTION,
PLEASE_WAIT,
ENTER_AMOUNT,
LEVEL_UP
} DIALOGUE_STATE;
2017-12-25 23:49:48 +00:00
2018-12-27 18:17:09 +00:00
typedef enum CHAT_TYPE
{
SERVER = 0,
PUBLIC_MOD = 1,
PUBLIC = 2,
PRIVATE_MESSAGE_RECEIVED = 3,
TRADE_RECEIVED = 4,
PRIVATE_MESSAGE_INFO = 5,
PRIVATE_MESSAGE_SENT = 6,
PRIVATE_MESSAGE_RECEIVED_MOD = 7,
CLANCHAT = 9,
CLANCHAT_INFO = 11,
TRADE_SENT = 12,
ABUSE_REPORT = 26,
EXAMINE_ITEM = 27,
EXAMINE_NPC = 28,
EXAMINE_OBJECT = 29,
FRIENDS_LIST_ADD = 30,
IGNORE_LIST_ADD = 31,
AUTOCHAT = 90,
GAME = 99,
TRADE = 101,
DUEL = 103,
FILTERED = 105,
ACTION = 109,
UNKNOWN = -1
} CHAT_TYPE;
2017-12-25 23:49:48 +00:00
2018-12-27 18:17:09 +00:00
std::vector<Internal::MessageNode> GetMessages(CHAT_TYPE Type, bool Sort = true);
std::vector<Internal::MessageNode> GetMessages(const std::vector<CHAT_TYPE>& Type, bool Sort = true);
Internal::MessageNode GetLastMessage(CHAT_TYPE Type);
2017-12-25 23:49:48 +00:00
2018-12-27 18:17:09 +00:00
DIALOGUE_STATE GetDialogueState();
std::vector<std::string> GetDialogueOptions();
std::string GetDialogueTitle();
std::string GetDialogueContent();
2017-12-25 23:49:48 +00:00
2018-12-27 18:17:09 +00:00
std::int32_t GetDialogueOptionIndexOf(const std::string& Option);
std::int32_t GetDialogueOptionIndexOf(const std::vector<std::string>& Options);
2017-12-25 23:49:48 +00:00
2018-12-27 18:17:09 +00:00
bool ClickContinue(bool UseKeyboard = false);
bool EnterAmount(std::int32_t Amount);
2018-05-17 01:18:17 +00:00
2018-12-27 18:17:09 +00:00
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::vector<std::string>& Options, bool UseKeyboard = false);
2018-05-17 01:18:17 +00:00
2018-12-27 18:17:09 +00:00
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