Horizon Official Technical Documentation
|
|
#include <CharClientInterface.hpp>
Public Member Functions | |
CharClientInterface (std::shared_ptr< CharSession > s) | |
~CharClientInterface () | |
bool | authorize_new_connection (uint32_t account_id, uint32_t auth_code, uint32_t account_level, uint8_t gender) |
bool | make_new_character (std::string name, uint8_t slot, uint32_t hair_color, uint32_t hair_style, uint32_t job_class, uint8_t gender) |
bool | make_new_character (std::string name, uint8_t slot, uint8_t hair_color, uint8_t hair_style) |
character_delete_result | character_delete_soft (uint32_t character_id) |
bool | character_delete_reserve (uint32_t character_id) |
bool | character_delete_email (uint32_t character_id, std::string email) |
bool | character_delete_birthdate (uint32_t character_id, std::string birthdate) |
bool | character_delete_cancel (uint32_t character_id) |
bool | pincode_create (uint32_t account_id, char *new_pin) |
bool | pincode_change (uint32_t account_id, char *old_pin, char *new_pin) |
bool | pincode_verify (uint32_t account_id, char *pincode) |
void | pincode_decrypt (uint32_t seed, char *input, char *output) |
bool | select_character (int slot) |
bool | update_session (int32_t account_id) |
![]() | |
ClientInterface (std::shared_ptr< CharSession > s) | |
~ClientInterface () | |
std::shared_ptr< CharSession > | get_session () |
void | set_session (std::shared_ptr< CharSession > s) |
Protected Attributes | |
char | _pincode_confirm [MAX_PINCODE_STRING_LENGTH] |
CharClientInterface::CharClientInterface | ( | std::shared_ptr< CharSession > | s | ) |
CharClientInterface::~CharClientInterface | ( | ) |
bool CharClientInterface::authorize_new_connection | ( | uint32_t | account_id, |
uint32_t | auth_code, | ||
uint32_t | account_level, | ||
uint8_t | gender | ||
) |
References Horizon::Char::s_session_data::_account_id, Horizon::Char::s_session_data::_auth_id, Horizon::Char::s_session_data::_character_slots, Horizon::Char::s_session_data::_connect_time, Horizon::Char::s_session_data::_group_id, Horizon::Char::CHAR_ERR_REJECTED_FROM_SERVER, Horizon::Char::HC_ACCEPT_ENTER::deliver(), Horizon::Char::HC_BLOCK_CHARACTER::deliver(), Horizon::Char::HC_REFUSE_ENTER::deliver(), Horizon::Char::HC_SECOND_PASSWD_LOGIN::deliver(), Horizon::Char::HC_ACCOUNT_ID::deliver(), Horizon::Char::HC_ACCEPT_ENTER2::deliver(), Horizon::ClientInterface< CharSession >::get_session(), HLog, MAX_CHARACTER_SLOTS, Horizon::Char::PINCODE_REQUEST_CHANGE, Horizon::Char::PINCODE_REQUEST_NEW, Horizon::Char::PINCODE_REQUEST_PIN, Horizon::Char::HC_ACCEPT_ENTER::prepare(), and sChar.
bool CharClientInterface::character_delete_birthdate | ( | uint32_t | character_id, |
std::string | birthdate | ||
) |
References CHAR_DEL_ACCEPT_RESULT_BIRTHDAY_ERR, CHAR_DEL_ACCEPT_RESULT_SUCCESS, CHAR_DEL_ACCEPT_RESULT_SYSTEM_ERR, GridTypeListIterator::count(), Horizon::Char::HC_ACK_CHARINFO_PER_PAGE::deliver(), Horizon::Char::HC_DELETE_CHAR3::deliver(), Horizon::ClientInterface< CharSession >::get_session(), HLog, Horizon::Char::HC_ACK_CHARINFO_PER_PAGE::prepare(), and sChar.
bool CharClientInterface::character_delete_cancel | ( | uint32_t | character_id | ) |
References Horizon::Char::CHAR3_DEL_CANCEL_FAILURE, Horizon::Char::CHAR3_DEL_CANCEL_SUCCESS, Horizon::Char::HC_DELETE_CHAR3_CANCEL::deliver(), Horizon::ClientInterface< CharSession >::get_session(), HLog, and sChar.
bool CharClientInterface::character_delete_email | ( | uint32_t | character_id, |
std::string | |||
) |
References CHAR_DEL_RESULT_SUCCESS, character_delete_soft(), Horizon::Char::HC_ACCEPT_DELETECHAR::deliver(), Horizon::Char::HC_REFUSE_DELETECHAR::deliver(), Horizon::ClientInterface< CharSession >::get_session(), HLog, and sChar.
bool CharClientInterface::character_delete_reserve | ( | uint32_t | character_id | ) |
References CHAR_DEL_RESULT_SUCCESS, character_delete_soft(), Horizon::Char::HC_DELETE_CHAR3_RESERVED::deliver(), Horizon::ClientInterface< CharSession >::get_session(), and sChar.
character_delete_result CharClientInterface::character_delete_soft | ( | uint32_t | character_id | ) |
References CHAR_DEL_RESULT_DATABASE_ERR, CHAR_DEL_RESULT_GUILD_ERR, CHAR_DEL_RESULT_PARTY_ERR, CHAR_DEL_RESULT_SUCCESS, CHAR_DEL_RESULT_SYSTEM_ERR, HLog, and sChar.
Referenced by character_delete_email(), and character_delete_reserve().
bool CharClientInterface::make_new_character | ( | std::string | name, |
uint8_t | slot, | ||
uint32_t | hair_color, | ||
uint32_t | hair_style, | ||
uint32_t | job_class, | ||
uint8_t | gender | ||
) |
References Horizon::Char::HC_REFUSE_MAKECHAR::deliver(), Horizon::Char::HC_ACCEPT_MAKECHAR::deliver(), Horizon::ClientInterface< CharSession >::get_session(), Horizon::Char::HC_CREATE_ERROR_ALREADY_EXISTS, Horizon::Char::HC_CREATE_ERROR_CHAR_SLOT, HLog, and sChar.
Referenced by make_new_character().
bool CharClientInterface::make_new_character | ( | std::string | name, |
uint8_t | slot, | ||
uint8_t | hair_color, | ||
uint8_t | hair_style | ||
) |
References make_new_character().
bool CharClientInterface::pincode_change | ( | uint32_t | account_id, |
char * | old_pin, | ||
char * | new_pin | ||
) |
References Horizon::Char::HC_SECOND_PASSWD_LOGIN::deliver(), Horizon::Char::HC_EDIT_SECOND_PASSWD::deliver(), Horizon::ClientInterface< CharSession >::get_session(), HLog, Horizon::Char::PINCODE_CORRECT, pincode_decrypt(), Horizon::Char::PINCODE_EDIT_FAILED, Horizon::Char::PINCODE_EDIT_SUCCESS, Horizon::Char::PINCODE_INCORRECT, Horizon::Char::PINCODE_LOGIN_FLAG_WRONG, and sChar.
bool CharClientInterface::pincode_create | ( | uint32_t | account_id, |
char * | new_pin | ||
) |
References _pincode_confirm, Horizon::Char::HC_SECOND_PASSWD_LOGIN::deliver(), Horizon::Char::HC_MAKE_SECOND_PASSWD::deliver(), Horizon::ClientInterface< CharSession >::get_session(), HLog, MAX_PINCODE_STRING_LENGTH, pincode_decrypt(), Horizon::Char::PINCODE_MAKE_SUCCESS, Horizon::Char::PINCODE_REQUEST_PIN, and sChar.
void CharClientInterface::pincode_decrypt | ( | uint32_t | seed, |
char * | input, | ||
char * | output | ||
) |
Referenced by pincode_change(), pincode_create(), and pincode_verify().
bool CharClientInterface::pincode_verify | ( | uint32_t | account_id, |
char * | pincode | ||
) |
References Horizon::Char::CHAR_ERR_REJECTED_FROM_SERVER, Horizon::Char::HC_REFUSE_ENTER::deliver(), Horizon::Char::HC_SECOND_PASSWD_LOGIN::deliver(), Horizon::ClientInterface< CharSession >::get_session(), HLog, Horizon::Char::PINCODE_CORRECT, pincode_decrypt(), Horizon::Char::PINCODE_INCORRECT, Horizon::Char::PINCODE_LOGIN_FLAG_LOCKED, Horizon::Char::PINCODE_LOGIN_FLAG_WRONG, Horizon::Char::PINCODE_LOGIN_RESTRICT, and sChar.
bool CharClientInterface::select_character | ( | int | slot | ) |
References Horizon::Char::CHAR_ERR_REJECTED_FROM_SERVER, Horizon::Char::HC_REFUSE_ENTER::deliver(), Horizon::Char::HC_NOTIFY_ZONESVR::deliver(), Horizon::ClientInterface< CharSession >::get_session(), HLog, and sChar.
bool CharClientInterface::update_session | ( | int32_t | account_id | ) |
References Horizon::Char::CHAR_ERR_REJECTED_FROM_SERVER, Horizon::Char::HC_REFUSE_ENTER::deliver(), Horizon::ClientInterface< CharSession >::get_session(), HLog, and sChar.
|
protected |
Referenced by pincode_create().