diff --git a/src/client/game/demonware/data_types.hpp b/src/client/game/demonware/data_types.hpp index 6c815ed4..067d6650 100644 --- a/src/client/game/demonware/data_types.hpp +++ b/src/client/game/demonware/data_types.hpp @@ -286,6 +286,24 @@ namespace demonware } }; + class bdDDLChecksumResult final : public bdTaskResult + { + public: + std::string checksum{}; + bool checksum_matched{}; + + void serialize(byte_buffer* buffer) override + { + buffer->write_string(this->checksum); + buffer->write_bool(this->checksum_matched); + } + + void deserialize(byte_buffer* buffer) override + { + buffer->read_string(&this->checksum); + } + }; + struct bdSockAddr final { bdSockAddr() : in_un(), m_family(AF_INET) diff --git a/src/client/game/demonware/services/bdDDL.cpp b/src/client/game/demonware/services/bdDDL.cpp index 8dd076fc..1dd3788f 100644 --- a/src/client/game/demonware/services/bdDDL.cpp +++ b/src/client/game/demonware/services/bdDDL.cpp @@ -8,10 +8,22 @@ namespace demonware this->register_task(1, &bdDDL::idk); } - void bdDDL::idk(service_server* server, byte_buffer* /*buffer*/) const + void bdDDL::idk(service_server* server, byte_buffer* buffer) const { - // TODO: Read data as soon as needed - auto reply = server->create_reply(this->task_id()); + uint32_t count; + buffer->read_uint32(&count); + + const auto reply = server->create_reply(this->task_id()); + + for (uint32_t i = 0; i < count; i++) + { + auto* checksum = new bdDDLChecksumResult; + checksum->deserialize(buffer); + checksum->checksum_matched = true; + + reply->add(checksum); + } + reply->send(); } }