#ifndef CHAT_HPP_INCLUDED #define CHAT_HPP_INCLUDED #include "../../Core/Classes/MessageNode.hpp" #include #include #include /** @addtogroup Interfaces * @{ */ class Chat { public: typedef enum DIALOGUE_STATE { IDLE, CLICK_CONTINUE, SELECT_OPTION, PLEASE_WAIT, ENTER_AMOUNT, LEVEL_UP } DIALOGUE_STATE; 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; static std::vector GetMessages(CHAT_TYPE Type, bool Sort = true); static std::vector GetMessages(const std::vector& Type, bool Sort = true); static Internal::MessageNode GetLastMessage(CHAT_TYPE Type); static DIALOGUE_STATE GetDialogueState(); static std::vector GetDialogueOptions(); static std::string GetDialogueTitle(); static std::string GetDialogueContent(); static std::int32_t GetDialogueOptionIndexOf(const std::string& Option); static std::int32_t GetDialogueOptionIndexOf(const std::vector& Options); static bool ClickContinue(bool UseKeyboard = false); static bool EnterAmount(std::int32_t Amount); static bool SelectDialogueOption(std::int32_t Index, bool UseKeyboard = false); // Index starts at 0 static bool SelectDialogueOption(const std::string& Option, bool UseKeyboard = false); static bool SelectDialogueOption(const std::vector& Options, bool UseKeyboard = false); 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 }; /** @} */ #endif // CHAT_HPP_INCLUDED