57 : mResult(nResult), mNews(pszNews), mEula(pszEula), mChatroom(chatroom) {
66 void *
operator new(
size_t nSize) {
67 return PoolMemAlloc(
static_cast<int>(nSize),
"LoginResultMsg", 0);
75 void operator delete(
void *pBlock) {
103 return "LoginResultMsg";
void PrintExtra(PrnStream &stream) const override
Write the result, and after a success the chatroom, the news, and the licence agreement.
LoginResultMsg(int nResult, const char *pszNews, const char *pszEula, const NetChatroomInfo &chatroom)
Construct a result.
Definition loginresultmsg.h:53
LoginResultMsg(int nResult)
Construct a failure, whose chatroom has the identifier -1.
Definition loginresultmsg.h:40
const NetChatroomInfo & GetChatroom() const
Definition loginresultmsg.h:116
Message * Clone() override
Produce a heap copy of this message.
Definition loginresultmsg.h:84
int Type() override
Report this message's registered identity.
Definition loginresultmsg.h:93
~LoginResultMsg() override=default
Destroy the object.
const char * GetEula() const
Definition loginresultmsg.h:121
int GetResult() const
Definition loginresultmsg.h:131
const char * GetName() const override
Report this message's class name.
Definition loginresultmsg.h:102
const char * GetNews() const
Definition loginresultmsg.h:126
Result
Values of mResult.
Definition loginresultmsg.h:24
@ kResultStatsFailed
Definition loginresultmsg.h:29
@ kResultServerError
Definition loginresultmsg.h:25
@ kResultInvalidPassword
Definition loginresultmsg.h:27
@ kResultAlreadyLoggedIn
Definition loginresultmsg.h:28
@ kResultSuccess
Definition loginresultmsg.h:30
@ kResultAccountNotFound
Definition loginresultmsg.h:26
Base of every event the game passes between a MsgSource and a MsgSink.
Definition message.h:40
Text output stream.
Definition prnstream.h:16
int g_nLoginResultMsgType
Identity that LoginResultMsg::Type() reports.
void * PoolMemAlloc(int nSize, const char *pszTag, int nAlign)
Allocate a block from the pool heaps and bill it to a tag.
void PoolMemFree(void *pBlock)
Return a block PoolMemAlloc() handed out to the pool heap that owns it.
The description of one chat room of the online lobby.
Definition netchatroominfo.h:11