|
Mana
|
Deals with incoming messages related to character selection. More...
#include <charhandler.h>
Classes | |
| struct | CachedAttribute |
| Character information needs to be cached since we receive it before we have loaded the dynamic data, so we can't resolve load any sprites yet. More... | |
| struct | CachedCharacterInfo |
| struct | EquipmentSlot |
Public Member Functions | |
| CharHandler () | |
| ~CharHandler () override | |
| void | handleMessage (MessageIn &msg) override |
| void | setCharSelectDialog (CharSelectDialog *window) override |
| void | setCharCreateDialog (CharCreateDialog *window) override |
| Sets the character create dialog. | |
| void | requestCharacters () override |
| void | chooseCharacter (Net::Character *character) override |
| void | newCharacter (const std::string &name, int slot, Gender gender, int hairstyle, int hairColor, const std::vector< int > &stats) override |
| void | deleteCharacter (Net::Character *character) override |
| void | switchCharacter () override |
| unsigned int | baseSprite () const override |
| unsigned int | hairSprite () const override |
| unsigned int | maxSprite () const override |
| int | getCharCreateMaxHairColorId () const override |
| Returns the max permitted hair color Id at character creation time, or 0 if no limit should be applied. | |
| int | getCharCreateMaxHairStyleId () const override |
| Returns the max permitted hair style Id at character creation time, or 0 if no limit should be applied. | |
| void | clear () |
Public Member Functions inherited from ManaServ::MessageHandler | |
| ~MessageHandler () override | |
Public Member Functions inherited from Net::CharHandler | |
| virtual int | getCharCreateMinHairColorId () const |
| Returns the min permitted hair color Id at character creation time, or 0 if there is no minimum. | |
Private Member Functions | |
| void | handleCharacterInfo (MessageIn &msg) |
| void | handleCharacterCreateResponse (MessageIn &msg) |
| void | handleCharacterDeleteResponse (MessageIn &msg) |
| void | handleCharacterSelectResponse (MessageIn &msg) |
| void | updateCharacters () |
Private Attributes | |
| std::vector< CachedCharacterInfo > | mCachedCharacterInfos |
| Cached character information. | |
Additional Inherited Members | |
Public Attributes inherited from Net::MessageHandler | |
| const uint16_t * | handledMessages = _no_messages |
Protected Member Functions inherited from Net::CharHandler | |
| CharHandler ()=default | |
| void | updateCharSelectDialog () |
| void | unlockCharSelectDialog () |
Protected Attributes inherited from Net::CharHandler | |
| Net::Characters | mCharacters |
| The list of available characters. | |
| Net::Character * | mSelectedCharacter = nullptr |
| The selected character. | |
| CharSelectDialog * | mCharSelectDialog = nullptr |
| CharCreateDialog * | mCharCreateDialog = nullptr |
Deals with incoming messages related to character selection.
Definition at line 39 of file charhandler.h.
| ManaServ::CharHandler::CharHandler | ( | ) |
Definition at line 61 of file charhandler.cpp.
|
overridevirtual |
Reimplemented from Net::CharHandler.
Definition at line 74 of file charhandler.cpp.
|
overridevirtual |
Implements Net::CharHandler.
Definition at line 365 of file charhandler.cpp.
|
overridevirtual |
Implements Net::CharHandler.
Definition at line 321 of file charhandler.cpp.
| void ManaServ::CharHandler::clear | ( | ) |
Definition at line 433 of file charhandler.cpp.
|
overridevirtual |
Implements Net::CharHandler.
Definition at line 351 of file charhandler.cpp.
|
inlineoverridevirtual |
Returns the max permitted hair color Id at character creation time, or 0 if no limit should be applied.
Implements Net::CharHandler.
Definition at line 76 of file charhandler.h.
|
inlineoverridevirtual |
Returns the max permitted hair style Id at character creation time, or 0 if no limit should be applied.
Implements Net::CharHandler.
Definition at line 80 of file charhandler.h.
|
overridevirtual |
Implements Net::CharHandler.
Definition at line 370 of file charhandler.cpp.
|
private |
Definition at line 135 of file charhandler.cpp.
|
private |
Definition at line 203 of file charhandler.cpp.
|
private |
Definition at line 101 of file charhandler.cpp.
|
private |
Definition at line 243 of file charhandler.cpp.
|
overridevirtual |
Implements ManaServ::MessageHandler.
Definition at line 79 of file charhandler.cpp.
|
overridevirtual |
Implements Net::CharHandler.
Definition at line 375 of file charhandler.cpp.
|
overridevirtual |
Implements Net::CharHandler.
Definition at line 330 of file charhandler.cpp.
|
overridevirtual |
Implements Net::CharHandler.
Definition at line 308 of file charhandler.cpp.
|
overridevirtual |
Sets the character create dialog.
The handler will clean up this dialog when a new character is succesfully created, and will unlock the dialog when a new character failed to be created.
Implements Net::CharHandler.
Definition at line 295 of file charhandler.cpp.
|
overridevirtual |
Implements Net::CharHandler.
Definition at line 289 of file charhandler.cpp.
|
overridevirtual |
Implements Net::CharHandler.
Definition at line 360 of file charhandler.cpp.
|
private |
Definition at line 382 of file charhandler.cpp.
|
private |
Cached character information.
Definition at line 121 of file charhandler.h.