62 const uint32_t code =
msg.readInt32(
"error");
63 msg.readString(20,
"error message");
64 logger->
log(
"Login::error code: %u", code);
88 "the game. Please contact the GM team.");
93 "Please update client on http://manaplus.org");
98 "banned from the game until "
99 "%s.\nPlease contact the GM "
100 "team via the forums."),
101 msg.readString(20,
"date").c_str());
139 const int len =
msg.readInt16(
"len") - 4;
140 const std::string updateHost =
msg.readString(len,
"host");
147 logger->
log1(
"Warning: incorrect update server name");
153 logger->
log(
"Received update hosts \"%s\" from login server.",
162 const int len =
msg.readInt16(
"len");
163 msg.readInt32(
"unused");
173 logger->
log(
"autofix Hercules packet version to: %d",
203 const int sz =
msg.readInt16(
"len") - 4;
204 msg.readString(sz,
"coding key");
210 const uint8_t errMsg =
msg.readUInt8(
"result code");
224 _(
"Account was not found. Please re-login.");
245 msg.readInt16(
"len");
251 if (
msg.getVersion() >= 20170315)
254 serverLen = 32 + 128;
262 const int worldCount = (
msg.getLength() - offset) / serverLen;
267 msg.readInt32(
"old ip");
269 msg.readInt16(
"unused");
273 msg.readUInt8(
"gender") & 3U));
275 if (
msg.getVersion() >= 20170315)
277 msg.readString(16,
"twitter auth token");
278 msg.readUInt8(
"twitter flag");
281 for (
int i = 0; i < worldCount; i++)
286 world->
port =
msg.readInt16(
"port");
287 world->
name =
msg.readString(20,
"name");
291 msg.readInt16(
"maintenance");
292 msg.readInt16(
"new");
293 if (
msg.getVersion() >= 20170315)
295 for (
int f = 0; f < 32; f ++)
296 msg.readInt32(
"unused2");
299 logger->
log(
"Network: Server: %s (%s:%d)", world->
name.c_str(),
310 const int tokenLen =
msg.readInt16(
"len") - 8;
311 msg.readInt32(
"login flag");
312 msg.readString(tokenLen,
"token");
318 const int tokenLen =
msg.readInt16(
"len") - 14;
319 msg.readInt32(
"login flag");
320 msg.readString(6,
"login flag2");
321 msg.readString(tokenLen,
"token");
327 const int tokenLen =
msg.readInt16(
"len") - 28;
328 msg.readInt32(
"login flag");
329 msg.readString(20,
"login flag2");
330 msg.readString(tokenLen,
"token");
336 msg.readBeingId(
"accound id");
static GenderT intToGender(const uint8_t sex) A_CONST
void setState(const StateT state)
void setValue(const std::string &key, const std::string &value)
void log(const char *const log_text,...)
void log1(const char *const log_text)
static std::string savedPassword
virtual void clearWorlds() const =0
#define FOR_EACH(type, iter, array)
#define UNIMPLEMENTEDPACKETFIELD(field)
#define UNIMPLEMENTEDPACKET
Net::LoginHandler * loginHandler
bool msg(InputEvent &event)
void processLoginOtp2(Net::MessageIn &msg)
void processServerVersion(Net::MessageIn &msg)
void processMobileOtp(Net::MessageIn &msg)
void processLoginOtp1(Net::MessageIn &msg)
void processLoginOtp3(Net::MessageIn &msg)
void processLoginError2(Net::MessageIn &msg)
void processUpdateHost2(Net::MessageIn &msg)
void processLoginData(Net::MessageIn &msg)
void processCharPasswordResponse(Net::MessageIn &msg)
void processCondingKey(Net::MessageIn &msg)
bool checkPath(const std::string &path)
std::string strprintf(const char *const format,...)
void splitToStringVector(StringVect &tokens, const std::string &text, const char separator)
const char * ipToString(const uint32_t address)
StringVect::iterator StringVectIter