Demonware stuff 2
This commit is contained in:
parent
01e2d305d7
commit
bb9b64d2fb
@ -144,32 +144,30 @@ namespace demonware
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// made up name
|
struct bdFileQueryResult final : public bdTaskResult
|
||||||
class bdFile final : public bdTaskResult
|
|
||||||
{
|
{
|
||||||
public:
|
uint64_t user_id;
|
||||||
uint64_t owner_id;
|
|
||||||
std::string platform;
|
std::string platform;
|
||||||
std::string filename;
|
std::string filename;
|
||||||
uint32_t unk;
|
uint32_t errorcode;
|
||||||
std::string data;
|
std::string filedata;
|
||||||
|
|
||||||
void serialize(byte_buffer* buffer) override
|
void serialize(byte_buffer* data) override
|
||||||
{
|
{
|
||||||
buffer->write_uint64(this->owner_id);
|
data->write_uint64(user_id);
|
||||||
buffer->write_string(this->platform);
|
data->write_string(platform);
|
||||||
buffer->write_string(this->filename);
|
data->write_string(filename);
|
||||||
buffer->write_uint32(this->unk);
|
data->write_uint32(errorcode);
|
||||||
buffer->write_blob(this->data);
|
data->write_blob(filedata);
|
||||||
}
|
}
|
||||||
|
|
||||||
void deserialize(byte_buffer* buffer) override
|
void deserialize(byte_buffer* data) override
|
||||||
{
|
{
|
||||||
buffer->read_uint64(&this->owner_id);
|
data->read_uint64(&user_id);
|
||||||
buffer->read_string(&this->platform);
|
data->read_string(&platform);
|
||||||
buffer->read_string(&this->filename);
|
data->read_string(&filename);
|
||||||
buffer->read_uint32(&this->unk);
|
data->read_uint32(&errorcode);
|
||||||
buffer->read_blob(&this->data);
|
data->read_blob(&filedata);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,13 +1,17 @@
|
|||||||
#include <std_include.hpp>
|
#include <std_include.hpp>
|
||||||
#include "../services.hpp"
|
#include "../services.hpp"
|
||||||
|
|
||||||
|
#include "game/game.hpp"
|
||||||
|
|
||||||
|
#include <utils/io.hpp>
|
||||||
|
|
||||||
namespace demonware
|
namespace demonware
|
||||||
{
|
{
|
||||||
bdMarketingComms::bdMarketingComms() : service(104, "bdMarketingComms")
|
bdMarketingComms::bdMarketingComms() : service(104, "bdMarketingComms")
|
||||||
{
|
{
|
||||||
this->register_task(1, &bdMarketingComms::getMessages);
|
this->register_task(1, &bdMarketingComms::getMessages);
|
||||||
this->register_task(4, &bdMarketingComms::reportFullMessagesViewed);
|
this->register_task(4, &bdMarketingComms::reportFullMessagesViewed);
|
||||||
this->register_task(6, &bdMarketingComms::reportFullMessagesViewed);
|
this->register_task(6, &bdMarketingComms::unk6);
|
||||||
}
|
}
|
||||||
|
|
||||||
void bdMarketingComms::getMessages(service_server* server, byte_buffer* /*buffer*/) const
|
void bdMarketingComms::getMessages(service_server* server, byte_buffer* /*buffer*/) const
|
||||||
@ -24,10 +28,12 @@ namespace demonware
|
|||||||
reply->send();
|
reply->send();
|
||||||
}
|
}
|
||||||
|
|
||||||
void bdMarketingComms::unk6(service_server* server, byte_buffer* /*buffer*/) const
|
void bdMarketingComms::unk6(service_server* server, byte_buffer* buffer) const
|
||||||
{
|
{
|
||||||
// TODO:
|
#ifdef DEBUG
|
||||||
auto reply = server->create_reply(this->task_id());
|
utils::io::write_file("demonware/bdMarketingComms/unk6", buffer->get_buffer());
|
||||||
reply->send();
|
#endif
|
||||||
|
|
||||||
|
server->create_reply(this->task_id(), game::BD_NO_FILE)->send();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -203,7 +203,7 @@ namespace demonware
|
|||||||
std::string platform;
|
std::string platform;
|
||||||
uint32_t numunk;
|
uint32_t numunk;
|
||||||
uint32_t numfiles;
|
uint32_t numfiles;
|
||||||
uint64_t owner = 0;
|
uint64_t user_id = 0;
|
||||||
std::string game;
|
std::string game;
|
||||||
|
|
||||||
buffer->read_string(&platform);
|
buffer->read_string(&platform);
|
||||||
@ -211,7 +211,7 @@ namespace demonware
|
|||||||
|
|
||||||
for (uint32_t i = 0; i < numunk; i++)
|
for (uint32_t i = 0; i < numunk; i++)
|
||||||
{
|
{
|
||||||
buffer->read_uint64(&owner);
|
buffer->read_uint64(&user_id);
|
||||||
buffer->read_string(&game);
|
buffer->read_string(&game);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -234,12 +234,12 @@ namespace demonware
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto response = new bdFile;
|
auto response = new bdFileQueryResult;
|
||||||
response->owner_id = owner;
|
response->user_id = user_id;
|
||||||
response->unk = 0;
|
|
||||||
response->platform = platform;
|
response->platform = platform;
|
||||||
response->filename = filename;
|
response->filename = filename;
|
||||||
response->data = data;
|
response->errorcode = 0;
|
||||||
|
response->filedata = data;
|
||||||
|
|
||||||
reply->add(response);
|
reply->add(response);
|
||||||
++count;
|
++count;
|
||||||
|
Loading…
Reference in New Issue
Block a user