66 if (character ==
nullptr)
80 msg.readInt32(
"job level");
82 const int shoes =
msg.readInt16(
"shoes");
83 const int gloves =
msg.readInt16(
"gloves");
84 const int cape =
msg.readInt16(
"cape");
85 const int misc1 =
msg.readInt16(
"misc1");
87 msg.readInt32(
"option");
90 msg.readInt16(
"character points left");
97 msg.readInt16(
"speed");
98 const uint16_t race =
msg.readInt16(
"class");
99 const uint8_t hairStyle =
msg.readUInt8(
"hair style");
100 const uint16_t look =
msg.readUInt8(
"look");
102 const uint16_t weapon =
msg.readInt16(
"weapon");
109 msg.readInt16(
"skill point");
110 const int bottomClothes =
msg.readInt16(
"bottom clothes");
111 const int shield =
msg.readInt16(
"shield");
113 const int hat =
msg.readInt16(
"hat");
114 const int topClothes =
msg.readInt16(
"top clothes");
118 msg.readUInt8(
"unused");
127 ItemDB::get(-hairStyle).getDyeColorsString(hairColor));
131 const int misc2 =
msg.readInt16(
"misc2");
132 tempPlayer->
setName(
msg.readString(24,
"name"));
134 character->
dummy = tempPlayer;
162 character->
slot =
msg.readUInt8(
"slot");
163 const uint8_t sex =
CAST_U8(
msg.readUInt8(
"gender"));
174 msg.readInt16(
"len");
175 const int slots =
msg.readInt16(
"slots");
176 if (slots > 0 && slots < 30)
179 msg.skip(18,
"unused");
185 const int count = (
msg.getLength() - 24) / 106;
187 for (
int i = 0; i < count; ++i)
192 if (character->
dummy !=
nullptr)
194 logger->
log(
"CharServer: Player: %s (%d)",
200 BLOCK_END(
"CharServerRecv::processCharLogin")
212 msg.readInt32(
"ip address");
219 server.
port =
msg.readInt16(
"port");
231 if (network !=
nullptr)
234 BLOCK_END(
"CharServerRecv::processCharMapInfo")
241 BLOCK_START(
"CharServerRecv::processChangeMapServer")
242 if (network ==
nullptr)
244 BLOCK_END(
"CharServerRecv::processChangeMapServer")
248 const int x =
msg.readInt16(
"x");
249 const int y =
msg.readInt16(
"y");
252 msg.readInt32(
"ip address");
259 server.
port =
msg.readInt16(
"port");
268 BLOCK_END(
"CharServerRecv::processChangeMapServer")
283 BLOCK_END(
"CharServerRecv::processCharCreate")
288 BLOCK_START(
"CharServerRecv::processCharDeleteFailed")
290 msg.readUInt8(
"error");
295 _(
"Failed to delete character."),
303 BLOCK_END(
"CharServerRecv::processCharDeleteFailed")
const BeingTypeId BeingTypeId_zero
Net::CharServerHandler * charServerHandler
void setKarma(const int karma)
void setWeaponId(const int id)
static GenderT intToGender(const uint8_t sex) A_CONST
void setName(const std::string &name)
void setSubtype(const BeingTypeId subtype, const uint16_t look)
void setHairColor(const unsigned int slot, const ItemColor color)
const std::string & getName() const
void setSpriteId(const unsigned int slot, const int id)
virtual void setGender(const GenderT gender)
void unSetSprite(const unsigned int slot)
void setManner(const int manner)
void setSpriteColor(const unsigned int slot, const int id, const std::string &color)
void setState(const StateT state)
bool getBoolValue(const std::string &key) const
static void setMap(const std::string &map)
void setTileCoords(const int x, const int y)
void setMap(Map *const map)
void log(const char *const log_text,...)
static void unlockCharSelectDialog()
static void updateCharSelectDialog()
virtual void clear() const =0
static Net::Character * mSelectedCharacter
static Net::Characters mCharacters
static CharCreateDialog * mCharCreateDialog
virtual bool haveCreateCharGender() const =0
static Network * mInstance
virtual void scheduleDelete()
void delete_all(Container &c)
#define fromInt(val, name)
LocalPlayer * localPlayer
Net::LoginHandler * loginHandler
bool msg(InputEvent &event)
bool hat(InputEvent &event)
void readPlayerData(Net::MessageIn &msg, Net::Character *const character)
const ItemInfo & get(const int id)
void setBackend(const PlayerInfoBackend &backend)
void setCharId(const int charId)
void processCharLogin(Net::MessageIn &msg)
void readPlayerData(Net::MessageIn &msg, Net::Character *const character)
void processChangeMapServer(Net::MessageIn &msg)
void processCharMapInfo(Net::MessageIn &msg)
void processCharDeleteFailed(Net::MessageIn &msg)
void processCharCreate(Net::MessageIn &msg)
Net::ServerFeatures * serverFeatures
#define BLOCK_START(name)
const bool ShowCenter_true
const char * ipToString(const uint32_t address)