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

Record of Inn data in an Endless Inn File. More...

#include <eolib/protocol/pub/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 InnRecord &other) const
 Compares this object with another for equality.
bool operator!= (const InnRecord &other) const
 Compares this object with another for inequality.
Public Member Functions inherited from eolib::protocol::Serializable
virtual ~Serializable ()=default

Public Attributes

int behavior_id {}
 Behavior ID of the NPC that runs the inn.
std::string name {}
int spawn_map {}
 ID of the map the player is sent to after respawning.
int spawn_x {}
 X coordinate of the map the player is sent to after respawning.
int spawn_y {}
 Y coordinate of the map the player is sent to after respawning.
int sleep_map {}
 ID of the map the player is sent to after sleeping at the inn.
int sleep_x {}
 X coordinate of the map the player is sent to after sleeping at the inn.
int sleep_y {}
 Y coordinate of the map the player is sent to after sleeping at the inn.
bool alternate_spawn_enabled {}
 Flag for an alternate spawn point. If true, the server will use this alternate spawn map, x, and, y based on some other condition. In the official server, this is used to respawn new characters on the noob island until they reach a certain level.
int alternate_spawn_map {}
int alternate_spawn_x {}
int alternate_spawn_y {}
std::vector< InnQuestionRecord > questions {}

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

Record of Inn data in an Endless Inn File.

Member Function Documentation

◆ ByteSize()

int eolib::protocol::pub::server::InnRecord::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::pub::server::InnRecord::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::pub::server::InnRecord::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::pub::server::InnRecord::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::pub::server::InnRecord::operator== ( const InnRecord & 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::pub::server::InnRecord::operator!= ( const InnRecord & 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

◆ behavior_id

int eolib::protocol::pub::server::InnRecord::behavior_id {}

Behavior ID of the NPC that runs the inn.

0 for default inn

Note
  • Value range is 0-64008.

◆ name

std::string eolib::protocol::pub::server::InnRecord::name {}
Note
  • Length must be 252 or less.

◆ spawn_map

int eolib::protocol::pub::server::InnRecord::spawn_map {}

ID of the map the player is sent to after respawning.

Note
  • Value range is 0-64008.

◆ spawn_x

int eolib::protocol::pub::server::InnRecord::spawn_x {}

X coordinate of the map the player is sent to after respawning.

Note
  • Value range is 0-252.

◆ spawn_y

int eolib::protocol::pub::server::InnRecord::spawn_y {}

Y coordinate of the map the player is sent to after respawning.

Note
  • Value range is 0-252.

◆ sleep_map

int eolib::protocol::pub::server::InnRecord::sleep_map {}

ID of the map the player is sent to after sleeping at the inn.

Note
  • Value range is 0-64008.

◆ sleep_x

int eolib::protocol::pub::server::InnRecord::sleep_x {}

X coordinate of the map the player is sent to after sleeping at the inn.

Note
  • Value range is 0-252.

◆ sleep_y

int eolib::protocol::pub::server::InnRecord::sleep_y {}

Y coordinate of the map the player is sent to after sleeping at the inn.

Note
  • Value range is 0-252.

◆ alternate_spawn_enabled

bool eolib::protocol::pub::server::InnRecord::alternate_spawn_enabled {}

Flag for an alternate spawn point. If true, the server will use this alternate spawn map, x, and, y based on some other condition. In the official server, this is used to respawn new characters on the noob island until they reach a certain level.

◆ alternate_spawn_map

int eolib::protocol::pub::server::InnRecord::alternate_spawn_map {}
Note
  • Value range is 0-64008.

◆ alternate_spawn_x

int eolib::protocol::pub::server::InnRecord::alternate_spawn_x {}
Note
  • Value range is 0-252.

◆ alternate_spawn_y

int eolib::protocol::pub::server::InnRecord::alternate_spawn_y {}
Note
  • Value range is 0-252.

◆ questions

std::vector<InnQuestionRecord> eolib::protocol::pub::server::InnRecord::questions {}
Note
  • Size must be 3.