mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-22 13:37:22 +00:00
Update WorldServer.cpp
This commit is contained in:
parent
9e032223eb
commit
543b231a80
@ -237,7 +237,7 @@ int main(int argc, char** argv) {
|
|||||||
g_CloneID = cloneID;
|
g_CloneID = cloneID;
|
||||||
|
|
||||||
// pre calculate the FDB checksum
|
// pre calculate the FDB checksum
|
||||||
if (bool(std::stoi(Game::config->GetValue("check_fdb")))) {
|
if (Game::config->GetValue("check_fdb") == "1") {
|
||||||
std::ifstream fileStream;
|
std::ifstream fileStream;
|
||||||
fileStream.open("res/CDServer.fdb", std::ios::binary | std::ios::in);
|
fileStream.open("res/CDServer.fdb", std::ios::binary | std::ios::in);
|
||||||
const int bufferSize = 1024;
|
const int bufferSize = 1024;
|
||||||
@ -868,7 +868,7 @@ void HandlePacket(Packet* packet) {
|
|||||||
std::string sessionKey = PacketUtils::ReadString(74, packet, true);
|
std::string sessionKey = PacketUtils::ReadString(74, packet, true);
|
||||||
std::string theirFdbChecksum = PacketUtils::ReadString(packet->length - 33, packet, false);
|
std::string theirFdbChecksum = PacketUtils::ReadString(packet->length - 33, packet, false);
|
||||||
|
|
||||||
if (bool(std::stoi(Game::config->GetValue("check_fdb"))) && fdbChecksum != "") { // if fdbChecksum is empty, likely means we are a character server.
|
if (Game::config->GetValue("check_fdb") == "1" && fdbChecksum != "") { // if fdbChecksum is empty, likely means we are a character server.
|
||||||
Game::logger->Log("WorldServer", "Got client checksum %s and we have server checksum %s. \n", theirFdbChecksum.c_str(), fdbChecksum.c_str());
|
Game::logger->Log("WorldServer", "Got client checksum %s and we have server checksum %s. \n", theirFdbChecksum.c_str(), fdbChecksum.c_str());
|
||||||
if (theirFdbChecksum != fdbChecksum) {
|
if (theirFdbChecksum != fdbChecksum) {
|
||||||
Game::logger->Log("WorldServer", "Client checksum does not match server checksum.\n");
|
Game::logger->Log("WorldServer", "Client checksum does not match server checksum.\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user