eolib-cpp 0.1.0-beta.7
Core C++ library for writing Endless Online applications
Loading...
Searching...
No Matches
eolib::protocol::net::server::CharacterMapInfo Class Referencefinal

Information about a nearby character. The official client skips these if they're under 42 bytes in length. More...

#include <eolib/protocol/net/server/structs.hpp>

Inherits eolib::protocol::Serializable.

Public Member Functions

int ByteSize () const noexcept override
 Gets the size of the data that this object was deserialized from.
void Serialize (data::EoWriter &writer) const override
 Serializes this object to the provided writer.
void Deserialize (data::EoReader &reader) override
 Deserializes this object from the provided reader, replacing its current data.
std::string ToString () const override
 Gets a human-readable representation of this object, for debugging purposes.
bool operator== (const CharacterMapInfo &other) const
 Compares this object with another for equality.
bool operator!= (const CharacterMapInfo &other) const
 Compares this object with another for inequality.
Public Member Functions inherited from eolib::protocol::Serializable
virtual ~Serializable ()=default

Public Attributes

std::string name {}
int player_id {}
int map_id {}
BigCoords coords {}
protocol::Direction direction {}
int class_id {}
std::string guild_tag {}
int level {}
protocol::Gender gender {}
int hair_style {}
int hair_color {}
int skin {}
int max_hp {}
int hp {}
int max_tp {}
int tp {}
EquipmentMapInfo equipment {}
SitState sit_state {}
bool invisible {}
std::optional< WarpEffect > warp_effect {}

Additional Inherited Members

Protected Member Functions inherited from eolib::protocol::Serializable
 Serializable ()=default
 Serializable (const Serializable &)=default
 Serializable (Serializable &&)=default
Serializable & operator= (const Serializable &)=default
Serializable & operator= (Serializable &&)=default

Detailed Description

Information about a nearby character. The official client skips these if they're under 42 bytes in length.

Member Function Documentation

◆ ByteSize()

int eolib::protocol::net::server::CharacterMapInfo::ByteSize ( ) const
overridevirtualnoexcept

Gets the size of the data that this object was deserialized from.

Returns
the deserialized size in bytes, or 0 for an object that was not deserialized.

Implements eolib::protocol::Serializable.

◆ Serialize()

void eolib::protocol::net::server::CharacterMapInfo::Serialize ( data::EoWriter & writer) const
overridevirtual

Serializes this object to the provided writer.

Parameters
writerthe writer that the data will be written to.
Exceptions
SerializationErrorif the object's data is invalid for serialization.

Implements eolib::protocol::Serializable.

◆ Deserialize()

void eolib::protocol::net::server::CharacterMapInfo::Deserialize ( data::EoReader & reader)
overridevirtual

Deserializes this object from the provided reader, replacing its current data.

Parameters
readerthe reader that the data will be read from.

Implements eolib::protocol::Serializable.

◆ ToString()

std::string eolib::protocol::net::server::CharacterMapInfo::ToString ( ) const
overridevirtual

Gets a human-readable representation of this object, for debugging purposes.

Returns
the object's fields and values, as a string.

Implements eolib::protocol::Serializable.

◆ operator==()

bool eolib::protocol::net::server::CharacterMapInfo::operator== ( const CharacterMapInfo & other) const

Compares this object with another for equality.

The deserialized byte size is not compared.

Parameters
otherthe object to compare with.
Returns
true if all fields are equal, otherwise false.

◆ operator!=()

bool eolib::protocol::net::server::CharacterMapInfo::operator!= ( const CharacterMapInfo & other) const

Compares this object with another for inequality.

The deserialized byte size is not compared.

Parameters
otherthe object to compare with.
Returns
true if any field differs, otherwise false.

Member Data Documentation

◆ name

std::string eolib::protocol::net::server::CharacterMapInfo::name {}

◆ player_id

int eolib::protocol::net::server::CharacterMapInfo::player_id {}
Note
  • Value range is 0-64008.

◆ map_id

int eolib::protocol::net::server::CharacterMapInfo::map_id {}
Note
  • Value range is 0-64008.

◆ coords

BigCoords eolib::protocol::net::server::CharacterMapInfo::coords {}

◆ direction

protocol::Direction eolib::protocol::net::server::CharacterMapInfo::direction {}

◆ class_id

int eolib::protocol::net::server::CharacterMapInfo::class_id {}
Note
  • Value range is 0-252.

◆ guild_tag

std::string eolib::protocol::net::server::CharacterMapInfo::guild_tag {}
Note
  • Length must be 3.

◆ level

int eolib::protocol::net::server::CharacterMapInfo::level {}
Note
  • Value range is 0-252.

◆ gender

protocol::Gender eolib::protocol::net::server::CharacterMapInfo::gender {}

◆ hair_style

int eolib::protocol::net::server::CharacterMapInfo::hair_style {}
Note
  • Value range is 0-252.

◆ hair_color

int eolib::protocol::net::server::CharacterMapInfo::hair_color {}
Note
  • Value range is 0-252.

◆ skin

int eolib::protocol::net::server::CharacterMapInfo::skin {}
Note
  • Value range is 0-252.

◆ max_hp

int eolib::protocol::net::server::CharacterMapInfo::max_hp {}
Note
  • Value range is 0-64008.

◆ hp

int eolib::protocol::net::server::CharacterMapInfo::hp {}
Note
  • Value range is 0-64008.

◆ max_tp

int eolib::protocol::net::server::CharacterMapInfo::max_tp {}
Note
  • Value range is 0-64008.

◆ tp

int eolib::protocol::net::server::CharacterMapInfo::tp {}
Note
  • Value range is 0-64008.

◆ equipment

EquipmentMapInfo eolib::protocol::net::server::CharacterMapInfo::equipment {}

◆ sit_state

SitState eolib::protocol::net::server::CharacterMapInfo::sit_state {}

◆ invisible

bool eolib::protocol::net::server::CharacterMapInfo::invisible {}

◆ warp_effect

std::optional<WarpEffect> eolib::protocol::net::server::CharacterMapInfo::warp_effect {}