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
{
2018-10-04 07:21:36 +00:00
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
2017-12-25 23:49:48 +00:00
} CHAT_TYPE ;
2018-11-22 14:39:29 +00:00
static std : : vector < Internal : : MessageNode > GetMessages ( CHAT_TYPE Type , bool Sort = true ) ;
static std : : vector < Internal : : MessageNode > GetMessages ( const std : : vector < CHAT_TYPE > & Type , bool Sort = true ) ;
2018-03-18 14:38:29 +00:00
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