wavelength 1.0.0
Loading...
Searching...
No Matches
LoginResultMsg Class Reference

Result of NetLobby::Login(). More...

#include <loginresultmsg.h>

Inheritance diagram for LoginResultMsg:
Collaboration diagram for LoginResultMsg:

Public Types

enum  Result {
  kResultServerError = -86 , kResultAccountNotFound = -85 , kResultInvalidPassword = -84 , kResultAlreadyLoggedIn = -83 ,
  kResultStatsFailed = -78 , kResultSuccess = 0
}
 Values of mResult. More...

Public Member Functions

 ~LoginResultMsg () override=default
 Destroy the object.
 LoginResultMsg (int nResult)
 Construct a failure, whose chatroom has the identifier -1.
 LoginResultMsg (int nResult, const char *pszNews, const char *pszEula, const NetChatroomInfo &chatroom)
 Construct a result.
void * operator new (size_t nSize)
 Allocate a message, billed to the class name.
void operator delete (void *pBlock)
 Release a message.
Message * Clone () override
 Produce a heap copy of this message.
int Type () override
 Report this message's registered identity.
const char * GetName () const override
 Report this message's class name.
void PrintExtra (PrnStream &stream) const override
 Write the result, and after a success the chatroom, the news, and the licence agreement.
const NetChatroomInfo & GetChatroom () const
const char * GetEula () const
const char * GetNews () const
int GetResult () const
Public Member Functions inherited from Message
virtual ~Message ()
 Vtable slot 1.
virtual void saveGuts (BinStream &stream) const
 Write this message's payload to a stream.
virtual void restoreGuts (BinStream &stream)
 Read this message's payload from a stream.
virtual ~Message ()
virtual void Unused1 ()
 Not called by the control.

Additional Inherited Members

Static Public Member Functions inherited from Message
static Message * NewMessage (int nType)
 Produce a message of the identified class through the factory list.

Detailed Description

Result of NetLobby::Login().

The RTTI includes the class name and records Message as the base.

Member Enumeration Documentation

◆ Result

Values of mResult.

Enumerator
kResultServerError 

The login server failed.

kResultAccountNotFound 

The account does not exist.

kResultInvalidPassword 

The password is wrong.

kResultAlreadyLoggedIn 

The account is logged in elsewhere.

kResultStatsFailed 

The server did not take the statistics.

kResultSuccess 

The player is logged in.

Constructor & Destructor Documentation

◆ ~LoginResultMsg()

LoginResultMsg::~LoginResultMsg ( )
overridedefault

Destroy the object.

Ghidra address:
NTSC-U/C: 0x0039e2e0
Ghidra address:
PAL: 0x0040cfc0

◆ LoginResultMsg() [1/2]

LoginResultMsg::LoginResultMsg ( int nResult)
inlineexplicit

Construct a failure, whose chatroom has the identifier -1.

Inline. The texts and the counts of the chatroom are not set.

Parameters
nResultThe error.

◆ LoginResultMsg() [2/2]

LoginResultMsg::LoginResultMsg ( int nResult,
const char * pszNews,
const char * pszEula,
const NetChatroomInfo & chatroom )
inline

Construct a result.

Inline.

Parameters
nResultOne of Result.
pszNewsThe news.
pszEulaThe licence agreement.
chatroomThe chatroom the login places the player in.

Member Function Documentation

◆ operator new()

void * LoginResultMsg::operator new ( size_t nSize)
inline

Allocate a message, billed to the class name.

Parameters
nSizeThe object size the compiler supplies.
Returns
The block.

◆ operator delete()

void LoginResultMsg::operator delete ( void * pBlock)
inline

Release a message.

Parameters
pBlockThe block.

◆ Clone()

Message * LoginResultMsg::Clone ( )
inlineoverridevirtual

Produce a heap copy of this message.

Returns
The copy.

Implements Message.

◆ Type()

int LoginResultMsg::Type ( )
inlineoverridevirtual

Report this message's registered identity.

Returns
g_nLoginResultMsgType.

Implements Message.

◆ GetName()

const char * LoginResultMsg::GetName ( ) const
inlineoverridevirtual

Report this message's class name.

Returns
The literal LoginResultMsg.

Implements Message.

◆ PrintExtra()

void LoginResultMsg::PrintExtra ( PrnStream & stream) const
overridevirtual

Write the result, and after a success the chatroom, the news, and the licence agreement.

Parameters
streamThe stream to write to.
Ghidra address:
NTSC-U/C: 0x00268c28
Ghidra address:
PAL: 0x00272830

Reimplemented from Message.

◆ GetChatroom()

const NetChatroomInfo & LoginResultMsg::GetChatroom ( ) const
inline
Returns
The chatroom the login places the player in.

◆ GetEula()

const char * LoginResultMsg::GetEula ( ) const
inline
Returns
The licence agreement the EULA screen shows.

◆ GetNews()

const char * LoginResultMsg::GetNews ( ) const
inline
Returns
The news the welcome screen shows.

◆ GetResult()

int LoginResultMsg::GetResult ( ) const
inline
Returns
One of Result, or another negative error.

The documentation for this class was generated from the following file: