fix items, map, protocls

This commit is contained in:
ErikasKontenis
2022-04-09 13:45:27 +03:00
parent 18bd56496e
commit 396464b940
933 changed files with 215171 additions and 1 deletions

View File

@@ -136,12 +136,14 @@ void ProtocolLogin::onRecvFirstMessage(NetworkMessage& msg)
enableXTEAEncryption();
setXTEAKey(key);
/*
if (!isProtocolAllowed(version)) {
std::ostringstream ss;
ss << "Only clients with protocol " << getClientVersionString(g_game.getClientVersion()) << " allowed!";
disconnectClient(ss.str(), version);
return;
}
*/
if (g_game.getGameState() == GAME_STATE_STARTUP) {
disconnectClient("Gameworld is starting up. Please wait.", version);
@@ -176,6 +178,7 @@ void ProtocolLogin::onRecvFirstMessage(NetworkMessage& msg)
return;
}
uint32_t accountNumberOtClientShallow = msg.get<uint32_t>();
if (!accountNumber || accountNumberOtClientShallow != accountNumber) {
std::ostringstream ss;
@@ -183,7 +186,7 @@ void ProtocolLogin::onRecvFirstMessage(NetworkMessage& msg)
disconnectClient(ss.str(), version);
return;
}
std::string password = msg.getString();
if (password.empty()) {
disconnectClient("Invalid password.", version);