Merge branch 'develop' into filesystem-and-mods

This commit is contained in:
fed 2022-09-10 21:00:23 +00:00 committed by GitHub
commit 31e9bda017
76 changed files with 2103 additions and 475 deletions

2
deps/curl vendored

@ -1 +1 @@
Subproject commit 7e6140cb93cbd10cea45267fb02a6fbf1c459f2e Subproject commit 9c822a99944fd185ba58d8bca935ad5c5e6cd3e1

2
deps/protobuf vendored

@ -1 +1 @@
Subproject commit 50bdb17409d4133d51ab6cfa095700f4c816576e Subproject commit c1a2d2ec29314975e725021ffe4334926dbaa56c

View File

@ -112,18 +112,15 @@ namespace arxan
bool is_wine() bool is_wine()
{ {
static bool is_wine = false; static std::optional<bool> is_wine = {};
static bool is_wine_set = false;
if (!is_wine_set) if (!is_wine.has_value())
{ {
const utils::nt::library ntdll("ntdll.dll"); const utils::nt::library ntdll("ntdll.dll");
is_wine = ntdll.get_proc<void*>("wine_get_version") != nullptr; is_wine = ntdll.get_proc<void*>("wine_get_version") != nullptr;
is_wine_set = true;
} }
return is_wine; return is_wine.value();
} }
class component final : public component_interface class component final : public component_interface

View File

@ -119,7 +119,7 @@ namespace demonware
int getaddrinfo_stub(const char* name, const char* service, int getaddrinfo_stub(const char* name, const char* service,
const addrinfo* hints, addrinfo** res) const addrinfo* hints, addrinfo** res)
{ {
#ifdef DEBUG #ifdef DW_DEBUG
printf("[ network ]: [getaddrinfo]: \"%s\" \"%s\"\n", name, service); printf("[ network ]: [getaddrinfo]: \"%s\" \"%s\"\n", name, service);
#endif #endif
@ -202,7 +202,7 @@ namespace demonware
hostent* gethostbyname_stub(const char* name) hostent* gethostbyname_stub(const char* name)
{ {
#ifdef DEBUG #ifdef DW_DEBUG
printf("[ network ]: [gethostbyname]: \"%s\"\n", name); printf("[ network ]: [gethostbyname]: \"%s\"\n", name);
#endif #endif
@ -430,7 +430,7 @@ namespace demonware
//printf("logged\n"); //printf("logged\n");
} }
#ifdef DEBUG #ifdef DW_DEBUG
void a(unsigned int n) void a(unsigned int n)
{ {
printf("bdAuth: Auth task failed with HTTP code [%u]\n", n); printf("bdAuth: Auth task failed with HTTP code [%u]\n", n);

View File

@ -0,0 +1,220 @@
#include <std_include.hpp>
#include "loader/component_loader.hpp"
#include "menus.hpp"
#include "game/game.hpp"
#include "console.hpp"
#include "command.hpp"
#include "utils/hook.hpp"
#include "utils/string.hpp"
namespace menus
{
void* ui_info_array;
std::string script_main_menu;
bool UI_AllowScriptMenuResponse()
{
return *reinterpret_cast<bool*>(0x3532A7C_b);
}
bool UI_Started()
{
return *reinterpret_cast<bool*>(0x2ED2074_b);
}
bool UI_KeysBypassMenu()
{
game::dvar_t* cl_bypassMouseInput = game::Dvar_FindVar("cl_bypassMouseInput");
if (cl_bypassMouseInput && cl_bypassMouseInput->current.enabled)
{
return true;
}
return false;
}
void CL_ShowSystemCursor(int a1)
{
return utils::hook::invoke<void>(0x5BAA60_b, a1);
}
void CL_GetCursorPos(tagPOINT* position)
{
return utils::hook::invoke<void>(0x5BA800_b, position);
}
int Menu_Count()
{
return *reinterpret_cast<int*>(0x352F9B8_b);
}
void* Menus_FindByName(void* dc, const char* name)
{
return utils::hook::invoke<void*>(0x1AC810_b, dc, name);
}
void Menus_Open(void* dc, void* menu, int a3)
{
return utils::hook::invoke<void>(0x1E1296_b, dc, menu, a3);
}
void Display_MouseMove(void* dc)
{
return utils::hook::invoke<void>(0x180B70_b, dc);
}
namespace
{
game::XAssetHeader load_script_menu_internal(const char* menu)
{
const char* menu_file = utils::string::va("ui_mp/scriptmenus/%s.menu", menu);
return game::DB_FindXAssetHeader(game::ASSET_TYPE_MENUFILE, menu_file, 1);
}
bool load_script_menu(int client_num, const char* menu)
{
game::XAssetHeader asset = load_script_menu_internal(menu);
if (asset.data)
{
game::UI_AddMenuList(ui_info_array, asset.data, 1);
return true;
}
return false;
}
void cg_precache_script_menu(int client_num, int config_string_index)
{
const char* menu = game::CL_GetConfigString(config_string_index);
if (menu)
{
if (!load_script_menu(client_num, menu))
{
game::Com_Error(game::ERR_DROP, "Could not load script menu file %s", menu);
}
}
}
utils::hook::detour cg_set_config_values_hook;
void cg_set_config_values_stub(int client_num)
{
cg_set_config_values_hook.invoke<void>(client_num);
auto nesting = game::R_PopRemoteScreenUpdate();
for (auto i = 3432; i < (3432 + 50); i++)
{
cg_precache_script_menu(client_num, i);
}
game::R_PushRemoteScreenUpdate(nesting);
}
void ui_mouse_event(int client_num, int x, int y)
{
auto scrPlaceFull = game::ScrPlace_GetViewPlacement();
auto vX = x / (game::ScrPlace_HiResGetScaleX() * scrPlaceFull->scaleVirtualToFull[0]);
auto vY = y / (game::ScrPlace_HiResGetScaleY() * scrPlaceFull->scaleVirtualToFull[1]);
*reinterpret_cast<float*>(0x352E590_b) = vX; // cursorX
*reinterpret_cast<float*>(0x352E594_b) = vY; // cursorY
int isCursorVisible = vX >= 0.0 && vX <= 640.0 && vY >= 0.0 && vY <= 480.0;
if (isCursorVisible)
{
auto menu_count = Menu_Count();
if (menu_count > 0)
{
*reinterpret_cast<float*>(reinterpret_cast<std::uintptr_t>(ui_info_array) + 16) = vX; // cursor X
*reinterpret_cast<float*>(reinterpret_cast<std::uintptr_t>(ui_info_array) + 20) = vY; // cursor Y
*reinterpret_cast<int*>(reinterpret_cast<std::uintptr_t>(ui_info_array) + 24) = game::Sys_Milliseconds() + 200; // cursor time until ready to move
*reinterpret_cast<int*>(reinterpret_cast<std::uintptr_t>(ui_info_array) + 28) = isCursorVisible; // ingame cursor visible
Display_MouseMove(ui_info_array);
}
}
}
int ui_mouse_fix(int cx_, int cy_, int dx_, int dy_)
{
if ((*game::keyCatchers & 0x10) != 0 && !UI_KeysBypassMenu())
{
tagPOINT cursor;
CL_ShowSystemCursor(0);
CL_GetCursorPos(&cursor);
ui_mouse_event(0, cursor.x, cursor.y);
return 0;
}
return utils::hook::invoke<int>(0x1384C0_b, cx_, cy_, dx_, dy_);
}
bool open_script_main_menu()
{
if (!script_main_menu.empty())
{
void* menu = Menus_FindByName(ui_info_array, script_main_menu.data());
if (menu)
{
Menus_Open(ui_info_array, menu, 0);
return true;
}
}
return false;
}
void ui_set_active_menu_stub(int client_num, int idx)
{
if (open_script_main_menu())
{
*game::keyCatchers = *game::keyCatchers & 1 | 0x10;
return;
}
return utils::hook::invoke<void>(0x1E4D80_b, client_num, idx); // UI_SetActiveMenu
}
}
void set_script_main_menu(const std::string& menu)
{
script_main_menu = menu;
}
class component final : public component_interface
{
public:
void post_unpack() override
{
if (!game::environment::is_mp())
{
return;
}
ui_info_array = reinterpret_cast<void*>(0x352E580_b);
// add back legacy menu precache
cg_set_config_values_hook.create(0x11AC50_b, cg_set_config_values_stub);
// add legacy menu mouse fix
utils::hook::call(0x5BA535_b, ui_mouse_fix);
// add script main menu (ESC)
utils::hook::call(0x135C82_b, ui_set_active_menu_stub);
command::add("openmenu", [](const command::params& params)
{
if (params.size() != 2)
{
console::info("usage: openmenu <name>\n");
return;
}
*game::keyCatchers = *game::keyCatchers & 1 | 0x10;
game::Menus_OpenByName(0, params.get(1));
});
}
};
}
REGISTER_COMPONENT(menus::component)

View File

@ -0,0 +1,6 @@
#pragma once
namespace menus
{
void set_script_main_menu(const std::string& menu);
}

View File

@ -9,6 +9,7 @@
#include "network.hpp" #include "network.hpp"
#include "scheduler.hpp" #include "scheduler.hpp"
#include "filesystem.hpp" #include "filesystem.hpp"
#include "menus.hpp"
#include "game/game.hpp" #include "game/game.hpp"
#include "game/dvars.hpp" #include "game/dvars.hpp"
@ -63,17 +64,66 @@ namespace patches
return com_register_dvars_hook.invoke<void>(); return com_register_dvars_hook.invoke<void>();
} }
utils::hook::detour set_client_dvar_from_server_hook; utils::hook::detour cg_set_client_dvar_from_server_hook;
void set_client_dvar_from_server_stub(void* clientNum, void* cgameGlob, const char* dvar, const char* value) void cg_set_client_dvar_from_server_stub(void* clientNum, void* cgameGlob, const char* dvar_hash, const char* value)
{ {
const auto dvar_lowercase = utils::string::to_lower(dvar); int hash = atoi(dvar_hash);
if (dvar_lowercase == "cg_fov"s || dvar_lowercase == "cg_fovMin"s) auto* dvar = game::Dvar_FindMalleableVar(hash);
if (hash == game::generateHashValue("cg_fov") ||
hash == game::generateHashValue("cg_fovMin") ||
hash == game::generateHashValue("cg_fovScale"))
{ {
return; return;
} }
set_client_dvar_from_server_hook.invoke<void>(0x11AA90_b, clientNum, cgameGlob, dvar, value); if (hash == game::generateHashValue("g_scriptMainMenu"))
{
menus::set_script_main_menu(value);
}
// register new dvar
if (!dvar)
{
game::Dvar_RegisterString(hash, "", value, game::DVAR_FLAG_EXTERNAL);
return;
}
// only set if dvar has no flags or has cheat flag or has external flag
if (dvar->flags == game::DVAR_FLAG_NONE ||
(dvar->flags & game::DVAR_FLAG_CHEAT) != 0 ||
(dvar->flags & game::DVAR_FLAG_EXTERNAL) != 0)
{
game::Dvar_SetFromStringFromSource(dvar, value, game::DvarSetSource::DVAR_SOURCE_EXTERNAL);
}
// original code
int index = 0;
auto result = utils::hook::invoke<bool>(0x4745E0_b, dvar, &index); // NetConstStrings_SV_GetNetworkDvarIndex
if (result)
{
std::string index_str = std::to_string(index);
return cg_set_client_dvar_from_server_hook.invoke<void>(clientNum, cgameGlob, index_str.data(), value);
}
}
game::dvar_t* get_client_dvar(const char* name)
{
game::dvar_t* dvar = game::Dvar_FindVar(name);
if (!dvar)
{
static game::dvar_t dummy{0};
dummy.hash = game::generateHashValue(name);
return &dummy;
}
return dvar;
}
bool get_client_dvar_hash(game::dvar_t* dvar, int* hash)
{
*hash = dvar->hash;
return true;
} }
const char* db_read_raw_file_stub(const char* filename, char* buf, const int size) const char* db_read_raw_file_stub(const char* filename, char* buf, const int size)
@ -386,11 +436,19 @@ namespace patches
utils::hook::inject(0x54DCE5_b, VERSION); utils::hook::inject(0x54DCE5_b, VERSION);
// prevent servers overriding our fov // prevent servers overriding our fov
set_client_dvar_from_server_hook.create(0x11AA90_b, set_client_dvar_from_server_stub);
utils::hook::nop(0x17DA96_b, 0x16); utils::hook::nop(0x17DA96_b, 0x16);
utils::hook::nop(0xE00BE_b, 0x17); utils::hook::nop(0xE00BE_b, 0x17);
utils::hook::set<uint8_t>(0x307F39_b, 0xEB); utils::hook::set<uint8_t>(0x307F39_b, 0xEB);
// make setclientdvar behave like older games
cg_set_client_dvar_from_server_hook.create(0x11AA90_b, cg_set_client_dvar_from_server_stub);
utils::hook::call(0x407EC5_b, get_client_dvar_hash); // setclientdvar
utils::hook::call(0x4087C1_b, get_client_dvar_hash); // setclientdvars
utils::hook::call(0x407E8E_b, get_client_dvar); // setclientdvar
utils::hook::call(0x40878A_b, get_client_dvar); // setclientdvars
utils::hook::set<uint8_t>(0x407EB6_b, 0xEB); // setclientdvar
utils::hook::set<uint8_t>(0x4087B2_b, 0xEB); // setclientdvars
// some [data validation] anti tamper thing that kills performance // some [data validation] anti tamper thing that kills performance
dvars::override::register_int("dvl", 0, 0, 0, game::DVAR_FLAG_READ); dvars::override::register_int("dvl", 0, 0, 0, game::DVAR_FLAG_READ);

View File

@ -68,25 +68,17 @@ namespace system_check
void verify_binary_version() void verify_binary_version()
{ {
const auto value = *reinterpret_cast<DWORD*>(0x1337_b); const auto value = *reinterpret_cast<DWORD*>(0x1337_b);
if (!arxan::is_wine())
if (arxan::is_wine())
{
if (value == 0xFFB81262 || value == 0xFFB81143)
{
return;
}
}
else
{ {
if (value == 0x60202B6A || value == 0xBC0E9FE) if (value == 0x60202B6A || value == 0xBC0E9FE)
{ {
return; return;
} }
}
throw std::runtime_error("Unsupported Call of Duty: Modern Warfare Remastered version (1.15)"); throw std::runtime_error("Unsupported Call of Duty: Modern Warfare Remastered version (1.15)");
} }
} }
}
bool is_valid() bool is_valid()
{ {

View File

@ -43,15 +43,15 @@ namespace weapon
} }
utils::hook::detour xmodel_get_bone_index_hook; utils::hook::detour xmodel_get_bone_index_hook;
bool xmodel_get_bone_index_stub(game::XModel* model, game::scr_string_t name, unsigned int offset, char* index) __int64 xmodel_get_bone_index_stub(game::XModel* model, game::scr_string_t name, unsigned int offset, char* index)
{ {
auto result = xmodel_get_bone_index_hook.invoke<bool>(model, name, offset, index); auto result = xmodel_get_bone_index_hook.invoke<__int64>(model, name, offset, index);
if (!result) if (!result)
{ {
if (name == game::SL_GetString("tag_weapon_right", 0) || if (name == game::SL_GetString("tag_weapon_right", 0) ||
name == game::SL_GetString("tag_knife_attach", 0)) name == game::SL_GetString("tag_knife_attach", 0))
{ {
result = xmodel_get_bone_index_hook.invoke<bool>(model, game::SL_GetString("tag_weapon", 0), offset, index); result = xmodel_get_bone_index_hook.invoke<__int64>(model, game::SL_GetString("tag_weapon", 0), offset, index);
if (result) if (result)
{ {
console::debug("using tag_weapon instead of %s (%s, %d)\n", game::SL_ConvertToString(name), model->name, offset); console::debug("using tag_weapon instead of %s (%s, %d)\n", game::SL_ConvertToString(name), model->name, offset);

View File

@ -3,18 +3,24 @@
namespace demonware namespace demonware
{ {
bool byte_buffer::read_byte(unsigned char* output)
{
if (!this->read_data_type(3)) return false;
return this->read(1, output);
}
bool byte_buffer::read_bool(bool* output) bool byte_buffer::read_bool(bool* output)
{ {
if (!this->read_data_type(1)) return false; if (!this->read_data_type(1)) return false;
return this->read(1, output); return this->read(1, output);
} }
bool byte_buffer::read_byte(char* output)
{
if (!this->read_data_type(2)) return false;
return this->read(1, output);
}
bool byte_buffer::read_ubyte(unsigned char* output)
{
if (!this->read_data_type(3)) return false;
return this->read(1, output);
}
bool byte_buffer::read_int16(short* output) bool byte_buffer::read_int16(short* output)
{ {
if (!this->read_data_type(5)) return false; if (!this->read_data_type(5)) return false;
@ -152,18 +158,24 @@ namespace demonware
return true; return true;
} }
bool byte_buffer::write_byte(char data)
{
this->write_data_type(3);
return this->write(1, &data);
}
bool byte_buffer::write_bool(bool data) bool byte_buffer::write_bool(bool data)
{ {
this->write_data_type(1); this->write_data_type(1);
return this->write(1, &data); return this->write(1, &data);
} }
bool byte_buffer::write_byte(char data)
{
this->write_data_type(2);
return this->write(1, &data);
}
bool byte_buffer::write_ubyte(unsigned char data)
{
this->write_data_type(3);
return this->write(1, &data);
}
bool byte_buffer::write_int16(short data) bool byte_buffer::write_int16(short data)
{ {
this->write_data_type(5); this->write_data_type(5);
@ -242,7 +254,7 @@ namespace demonware
const auto using_types = this->is_using_data_types(); const auto using_types = this->is_using_data_types();
this->set_use_data_types(false); this->set_use_data_types(false);
auto result = this->write_byte(type + 100); auto result = this->write_ubyte(type + 100);
this->set_use_data_types(true); this->set_use_data_types(true);
result &= this->write_uint32(element_count * element_size); result &= this->write_uint32(element_count * element_size);

View File

@ -11,8 +11,9 @@ namespace demonware
{ {
} }
bool read_byte(unsigned char* output);
bool read_bool(bool* output); bool read_bool(bool* output);
bool read_byte(char* output);
bool read_ubyte(unsigned char* output);
bool read_int16(short* output); bool read_int16(short* output);
bool read_uint16(unsigned short* output); bool read_uint16(unsigned short* output);
bool read_int32(int* output); bool read_int32(int* output);
@ -30,8 +31,9 @@ namespace demonware
bool read_array_header(unsigned char expected, unsigned int* element_count, bool read_array_header(unsigned char expected, unsigned int* element_count,
unsigned int* element_size = nullptr); unsigned int* element_size = nullptr);
bool write_byte(char data);
bool write_bool(bool data); bool write_bool(bool data);
bool write_byte(char data);
bool write_ubyte(unsigned char data);
bool write_int16(short data); bool write_int16(short data);
bool write_uint16(unsigned short data); bool write_uint16(unsigned short data);
bool write_int32(int data); bool write_int32(int data);

View File

@ -89,7 +89,7 @@ namespace demonware
std::memcpy(data.m_dec_key, &out_3[40], 16); std::memcpy(data.m_dec_key, &out_3[40], 16);
std::memcpy(data.m_enc_key, &out_3[56], 16); std::memcpy(data.m_enc_key, &out_3[56], 16);
#ifdef DEBUG #ifdef DW_DEBUG
printf("[DW] Response id: %s\n", utils::string::dump_hex(std::string(&out_2[8], 8)).data()); printf("[DW] Response id: %s\n", utils::string::dump_hex(std::string(&out_2[8], 8)).data());
printf("[DW] Hash verify: %s\n", utils::string::dump_hex(std::string(&out_3[20], 20)).data()); printf("[DW] Hash verify: %s\n", utils::string::dump_hex(std::string(&out_3[20], 20)).data());
printf("[DW] AES dec key: %s\n", utils::string::dump_hex(std::string(&out_3[40], 16)).data()); printf("[DW] AES dec key: %s\n", utils::string::dump_hex(std::string(&out_3[40], 16)).data());

View File

@ -14,7 +14,7 @@ namespace demonware
result.write_int32(static_cast<int>(this->buffer_.size()) + 2); result.write_int32(static_cast<int>(this->buffer_.size()) + 2);
result.write_bool(false); result.write_bool(false);
result.write_byte(this->type()); result.write_ubyte(this->type());
result.write(this->buffer_); result.write(this->buffer_);
return result.get_buffer(); return result.get_buffer();
@ -29,7 +29,7 @@ namespace demonware
enc_buffer.set_use_data_types(false); enc_buffer.set_use_data_types(false);
enc_buffer.write_uint32(static_cast<unsigned int>(this->buffer_.size())); // service data size CHECKTHIS!! enc_buffer.write_uint32(static_cast<unsigned int>(this->buffer_.size())); // service data size CHECKTHIS!!
enc_buffer.write_byte(this->type()); // TASK_REPLY type enc_buffer.write_ubyte(this->type()); // TASK_REPLY type
enc_buffer.write(this->buffer_); // service data enc_buffer.write(this->buffer_); // service data
auto aligned_data = enc_buffer.get_buffer(); auto aligned_data = enc_buffer.get_buffer();
@ -51,8 +51,8 @@ namespace demonware
response.set_use_data_types(false); response.set_use_data_types(false);
response.write_int32(30 + static_cast<int>(enc_data.size())); response.write_int32(30 + static_cast<int>(enc_data.size()));
response.write_byte(static_cast<char>(0xAB)); response.write_ubyte(static_cast<unsigned char>(0xAB));
response.write_byte(static_cast<char>(0x85)); response.write_ubyte(static_cast<unsigned char>(0x85));
response.write_int32(msg_count); response.write_int32(msg_count);
response.write(16, seed.data()); response.write(16, seed.data());
response.write(enc_data); response.write(enc_data);

View File

@ -119,7 +119,7 @@ namespace demonware
byte_buffer buffer; byte_buffer buffer;
buffer.write_uint64(transaction_id); buffer.write_uint64(transaction_id);
buffer.write_uint32(this->error_); buffer.write_uint32(this->error_);
buffer.write_byte(this->type_); buffer.write_ubyte(this->type_);
if (!this->error_) if (!this->error_)
{ {

View File

@ -38,7 +38,7 @@ namespace demonware
{ {
if (packet.starts_with("POST /auth/")) if (packet.starts_with("POST /auth/"))
{ {
#ifdef DEBUG #ifdef DW_DEBUG
printf("[DW]: [auth]: user requested authentication.\n"); printf("[DW]: [auth]: user requested authentication.\n");
#endif #endif
return; return;
@ -81,7 +81,7 @@ namespace demonware
} }
} }
#ifdef DEBUG #ifdef DW_DEBUG
printf("[DW]: [auth]: authenticating user %s\n", token.data() + 64); printf("[DW]: [auth]: authenticating user %s\n", token.data() + 64);
#endif #endif
@ -161,7 +161,7 @@ namespace demonware
this->send_reply(&reply); this->send_reply(&reply);
#ifdef DEBUG #ifdef DW_DEBUG
printf("[DW]: [auth]: user successfully authenticated.\n"); printf("[DW]: [auth]: user successfully authenticated.\n");
#endif #endif
} }

View File

@ -13,22 +13,29 @@ namespace demonware
this->register_service<bdAnticheat>(); this->register_service<bdAnticheat>();
this->register_service<bdBandwidthTest>(); this->register_service<bdBandwidthTest>();
this->register_service<bdContentStreaming>(); this->register_service<bdContentStreaming>();
this->register_service<bdCounter>();
this->register_service<bdDML>(); this->register_service<bdDML>();
this->register_service<bdEventLog>(); this->register_service<bdEventLog>();
this->register_service<bdGroups>(); this->register_service<bdGroup>();
this->register_service<bdTeams>();
this->register_service<bdStats>(); this->register_service<bdStats>();
this->register_service<bdStats2>();
this->register_service<bdStats3>();
this->register_service<bdStorage>(); this->register_service<bdStorage>();
this->register_service<bdTitleUtilities>(); this->register_service<bdTitleUtilities>();
this->register_service<bdProfiles>(); this->register_service<bdProfiles>();
this->register_service<bdRichPresence>(); this->register_service<bdRichPresence>();
this->register_service<bdFacebook>(); this->register_service<bdFacebook>();
this->register_service<bdUNK63>(); this->register_service<bdUNK63>();
this->register_service<bdUNK80>(); this->register_service<bdUserGroups>();
this->register_service<bdUNK95>(); this->register_service<bdMarketplace>();
this->register_service<bdLeague>();
this->register_service<bdLeague2>();
this->register_service<bdPublisherVariables>();
this->register_service<bdPresence>(); this->register_service<bdPresence>();
this->register_service<bdMarketingComms>(); this->register_service<bdMarketingComms>();
this->register_service<bdMatchMaking2>(); this->register_service<bdMatchMaking>();
this->register_service<bdMarketing>(); this->register_service<bdReward>();
}; };
void lobby_server::send_reply(reply* data) void lobby_server::send_reply(reply* data)
@ -58,7 +65,7 @@ namespace demonware
} }
else if (size == 0xC8) else if (size == 0xC8)
{ {
#ifdef DEBUG #ifdef DW_DEBUG
printf("[DW]: [lobby]: received client_header_ack.\n"); printf("[DW]: [lobby]: received client_header_ack.\n");
#endif #endif
@ -74,7 +81,7 @@ namespace demonware
raw_reply reply(packet_2); raw_reply reply(packet_2);
this->send_reply(&reply); this->send_reply(&reply);
#ifdef DEBUG #ifdef DW_DEBUG
printf("[DW]: [lobby]: sending server_header_ack.\n"); printf("[DW]: [lobby]: sending server_header_ack.\n");
#endif #endif
return; return;
@ -83,15 +90,15 @@ namespace demonware
if (buffer.size() < size_t(size)) return; if (buffer.size() < size_t(size)) return;
uint8_t check_ab; uint8_t check_ab;
buffer.read_byte(&check_ab); buffer.read_ubyte(&check_ab);
if (check_ab == 0xAB) if (check_ab == 0xAB)
{ {
uint8_t type; uint8_t type;
buffer.read_byte(&type); buffer.read_ubyte(&type);
if (type == 0x82) if (type == 0x82)
{ {
#ifdef DEBUG #ifdef DW_DEBUG
printf("[DW]: [lobby]: received client_auth.\n"); printf("[DW]: [lobby]: received client_auth.\n");
#endif #endif
std::string packet_3(packet.data(), packet.size() - 8); // this 8 are client hash check? std::string packet_3(packet.data(), packet.size() - 8); // this 8 are client hash check?
@ -106,7 +113,7 @@ namespace demonware
raw_reply reply(response); raw_reply reply(response);
this->send_reply(&reply); this->send_reply(&reply);
#ifdef DEBUG #ifdef DW_DEBUG
printf("[DW]: [lobby]: sending server_auth_done.\n"); printf("[DW]: [lobby]: sending server_auth_done.\n");
#endif #endif
return; return;
@ -135,10 +142,10 @@ namespace demonware
serv.read_uint32(&serv_size); serv.read_uint32(&serv_size);
uint8_t magic; // 0x86 uint8_t magic; // 0x86
serv.read_byte(&magic); serv.read_ubyte(&magic);
uint8_t service_id; uint8_t service_id;
serv.read_byte(&service_id); serv.read_ubyte(&service_id);
this->call_service(service_id, serv.get_remaining()); this->call_service(service_id, serv.get_remaining());
@ -170,7 +177,7 @@ namespace demonware
// return no error // return no error
byte_buffer buffer(data); byte_buffer buffer(data);
uint8_t task_id; uint8_t task_id;
buffer.read_byte(&task_id); buffer.read_ubyte(&task_id);
this->create_reply(task_id)->send(); this->create_reply(task_id)->send();
} }

View File

@ -11,9 +11,9 @@ namespace demonware
byte_buffer buffer(packet); byte_buffer buffer(packet);
buffer.set_use_data_types(false); buffer.set_use_data_types(false);
buffer.read_byte(&type); buffer.read_ubyte(&type);
buffer.read_byte(&version); buffer.read_ubyte(&version);
buffer.read_byte(&padding); buffer.read_ubyte(&padding);
switch (type) switch (type)
{ {
@ -34,9 +34,9 @@ namespace demonware
byte_buffer buffer; byte_buffer buffer;
buffer.set_use_data_types(false); buffer.set_use_data_types(false);
buffer.write_byte(31); // type buffer.write_ubyte(31); // type
buffer.write_byte(2); // version buffer.write_ubyte(2); // version
buffer.write_byte(0); // version buffer.write_ubyte(0); // version
buffer.write_uint32(ip); // external ip buffer.write_uint32(ip); // external ip
buffer.write_uint16(3074); // port buffer.write_uint16(3074); // port
@ -49,9 +49,9 @@ namespace demonware
byte_buffer buffer; byte_buffer buffer;
buffer.set_use_data_types(false); buffer.set_use_data_types(false);
buffer.write_byte(21); // type buffer.write_ubyte(21); // type
buffer.write_byte(2); // version buffer.write_ubyte(2); // version
buffer.write_byte(0); // version buffer.write_ubyte(0); // version
buffer.write_uint32(ip); // external ip buffer.write_uint32(ip); // external ip
buffer.write_uint16(3074); // port buffer.write_uint16(3074); // port
buffer.write_uint32(this->get_address()); // server ip buffer.write_uint32(this->get_address()); // server ip

View File

@ -45,13 +45,13 @@ namespace demonware
byte_buffer buffer(data); byte_buffer buffer(data);
buffer.read_byte(&this->task_id_); buffer.read_ubyte(&this->task_id_);
const auto& it = this->tasks_.find(this->task_id_); const auto& it = this->tasks_.find(this->task_id_);
if (it != this->tasks_.end()) if (it != this->tasks_.end())
{ {
#ifdef DEBUG #ifdef DW_DEBUG
printf("[DW] %s: executing task '%d'\n", name_.data(), this->task_id_); printf("[DW] %s: executing task '%d'\n", name_.data(), this->task_id_);
#endif #endif

View File

@ -7,30 +7,35 @@
#include "service.hpp" #include "service.hpp"
#include "servers/service_server.hpp" #include "servers/service_server.hpp"
//#include "services/bdTeams.hpp" // 3 #include "services/bdTeams.hpp" // 3
#include "services/bdStats.hpp" // 4 #include "services/bdStats.hpp" // 4
//#include "services/bdMessaging.hpp" // 6 //#include "services/bdMessaging.hpp" // 6
#include "services/bdProfiles.hpp" // 8 #include "services/bdProfiles.hpp" // 8
#include "services/bdStorage.hpp" // 10 #include "services/bdStorage.hpp" // 10
#include "services/bdTitleUtilities.hpp" // 12 #include "services/bdTitleUtilities.hpp" // 12
#include "services/bdBandwidthTest.hpp" // 18 #include "services/bdBandwidthTest.hpp" // 18
//#include "services/bdMatchMaking.hpp" // 21 #include "services/bdStats2.hpp" // 19
#include "services/bdCounters.hpp" // 23 #include "services/bdCounter.hpp" // 23
#include "services/bdDML.hpp" // 27 #include "services/bdDML.hpp" // 27
#include "services/bdGroups.hpp" // 28 #include "services/bdGroup.hpp" // 28
//#include "services/bdCMail.hpp" // 29 //#include "services/bdCMail.hpp" // 29
#include "services/bdFacebook.hpp" // 36 #include "services/bdFacebook.hpp" // 36
#include "services/bdAnticheat.hpp" // 38 #include "services/bdAnticheat.hpp" // 38
#include "services/bdContentStreaming.hpp" // 50 #include "services/bdContentStreaming.hpp" // 50
//#include "services/bdTags.hpp" // 52 //#include "services/bdTags.hpp" // 52
#include "services/bdUNK63.hpp" // 63 #include "services/bdUNK63.hpp" // 63
#include "services/bdUserGroups.hpp" // 65
#include "services/bdEventLog.hpp" // 67 #include "services/bdEventLog.hpp" // 67
#include "services/bdRichPresence.hpp" // 68 #include "services/bdRichPresence.hpp" // 68
//#include "services/bdTitleUtilities2.hpp" // 72 //#include "services/bdTencent.hpp" // 71
#include "services/bdUNK80.hpp" //#include "services/bdCodOnlineTeams.hpp" // 72
#include "services/bdUNK95.hpp" #include "services/bdMarketplace.hpp" // 80
#include "services/bdLeague.hpp" // 81
#include "services/bdLeague2.hpp" // 82
#include "services/bdStats3.hpp" // 91
#include "services/bdPublisherVariables.hpp"// 95
// AccountLinking // 86 // AccountLinking // 86
#include "services/bdPresence.hpp" //103 #include "services/bdPresence.hpp" //103
#include "services/bdMarketingComms.hpp" //104 #include "services/bdMarketingComms.hpp" //104
#include "services/bdMatchMaking2.hpp" //138 #include "services/bdMatchMaking.hpp" //138
#include "services/bdMarketing.hpp" //139 #include "services/bdReward.hpp" //139

View File

@ -5,18 +5,34 @@ namespace demonware
{ {
bdAnticheat::bdAnticheat() : service(38, "bdAnticheat") bdAnticheat::bdAnticheat() : service(38, "bdAnticheat")
{ {
this->register_task(2, &bdAnticheat::unk2); this->register_task(2, &bdAnticheat::answerChallenges);
this->register_task(4, &bdAnticheat::report_console_details); this->register_task(3, &bdAnticheat::reportConsoleID);
this->register_task(4, &bdAnticheat::reportConsoleDetails);
this->register_task(5, &bdAnticheat::answerTOTPChallenge);
} }
void bdAnticheat::unk2(service_server* server, byte_buffer* /*buffer*/) const void bdAnticheat::answerChallenges(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: Read data as soon as needed // TODO: Read data as soon as needed
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply->send();
} }
void bdAnticheat::report_console_details(service_server* server, byte_buffer* /*buffer*/) const void bdAnticheat::reportConsoleID(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO: Read data as soon as needed
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdAnticheat::reportConsoleDetails(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO: Read data as soon as needed
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdAnticheat::answerTOTPChallenge(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: Read data as soon as needed // TODO: Read data as soon as needed
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());

View File

@ -8,7 +8,9 @@ namespace demonware
bdAnticheat(); bdAnticheat();
private: private:
void unk2(service_server* server, byte_buffer* buffer) const; void answerChallenges(service_server* server, byte_buffer* buffer) const;
void report_console_details(service_server* server, byte_buffer* buffer) const; void reportConsoleID(service_server* server, byte_buffer* buffer) const;
void reportConsoleDetails(service_server* server, byte_buffer* buffer) const;
void answerTOTPChallenge(service_server* server, byte_buffer* buffer) const;
}; };
} }

View File

@ -0,0 +1,25 @@
#include <std_include.hpp>
#include "../services.hpp"
namespace demonware
{
bdCounter::bdCounter() : service(23, "bdCounter")
{
this->register_task(1, &bdCounter::incrementCounters);
this->register_task(2, &bdCounter::getCounterTotals);
}
void bdCounter::incrementCounters(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdCounter::getCounterTotals(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
}

View File

@ -0,0 +1,14 @@
#pragma once
namespace demonware
{
class bdCounter final : public service
{
public:
bdCounter();
private:
void incrementCounters(service_server* server, byte_buffer* buffer) const;
void getCounterTotals(service_server* server, byte_buffer* buffer) const;
};
}

View File

@ -1,25 +0,0 @@
#include <std_include.hpp>
#include "../services.hpp"
namespace demonware
{
bdCounters::bdCounters() : service(23, "bdCounters")
{
this->register_task(1, &bdCounters::unk1);
this->register_task(2, &bdCounters::unk2);
}
void bdCounters::unk1(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdCounters::unk2(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
}

View File

@ -1,14 +0,0 @@
#pragma once
namespace demonware
{
class bdCounters final : public service
{
public:
bdCounters();
private:
void unk1(service_server* server, byte_buffer* buffer) const;
void unk2(service_server* server, byte_buffer* buffer) const;
};
}

View File

@ -5,10 +5,20 @@ namespace demonware
{ {
bdDML::bdDML() : service(27, "bdDML") bdDML::bdDML() : service(27, "bdDML")
{ {
this->register_task(2, &bdDML::get_user_raw_data); this->register_task(1, &bdDML::recordIP);
this->register_task(2, &bdDML::getUserData);
this->register_task(3, &bdDML::getUserHierarchicalData);
this->register_task(4, &bdDML::getUsersLastLogonData);
} }
void bdDML::get_user_raw_data(service_server* server, byte_buffer* /*buffer*/) const void bdDML::recordIP(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdDML::getUserData(service_server* server, byte_buffer* /*buffer*/) const
{ {
auto result = new bdDMLRawData; auto result = new bdDMLRawData;
result->country_code = "US"; result->country_code = "US";
@ -25,4 +35,18 @@ namespace demonware
reply->add(result); reply->add(result);
reply->send(); reply->send();
} }
void bdDML::getUserHierarchicalData(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdDML::getUsersLastLogonData(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
} }

View File

@ -8,6 +8,9 @@ namespace demonware
bdDML(); bdDML();
private: private:
void get_user_raw_data(service_server* server, byte_buffer* buffer) const; void recordIP(service_server* server, byte_buffer* buffer) const;
void getUserData(service_server* server, byte_buffer* buffer) const;
void getUserHierarchicalData(service_server* server, byte_buffer* buffer) const;
void getUsersLastLogonData(service_server* server, byte_buffer* buffer) const;
}; };
} }

View File

@ -5,10 +5,42 @@ namespace demonware
{ {
bdEventLog::bdEventLog() : service(67, "bdEventLog") bdEventLog::bdEventLog() : service(67, "bdEventLog")
{ {
this->register_task(6, &bdEventLog::unk6); this->register_task(1, &bdEventLog::recordEvent);
this->register_task(2, &bdEventLog::recordEventBin);
this->register_task(3, &bdEventLog::recordEvents);
this->register_task(4, &bdEventLog::recordEventsBin);
this->register_task(6, &bdEventLog::initializeFiltering);
} }
void bdEventLog::unk6(service_server* server, byte_buffer* /*buffer*/) const void bdEventLog::recordEvent(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdEventLog::recordEventBin(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdEventLog::recordEvents(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdEventLog::recordEventsBin(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdEventLog::initializeFiltering(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());

View File

@ -8,6 +8,10 @@ namespace demonware
bdEventLog(); bdEventLog();
private: private:
void unk6(service_server* server, byte_buffer* buffer) const; void recordEvent(service_server* server, byte_buffer* buffer) const;
void recordEventBin(service_server* server, byte_buffer* buffer) const;
void recordEvents(service_server* server, byte_buffer* buffer) const;
void recordEventsBin(service_server* server, byte_buffer* buffer) const;
void initializeFiltering(service_server* server, byte_buffer* buffer) const;
}; };
} }

View File

@ -5,34 +5,106 @@ namespace demonware
{ {
bdFacebook::bdFacebook() : service(36, "bdFacebook") bdFacebook::bdFacebook() : service(36, "bdFacebook")
{ {
this->register_task(1, &bdFacebook::unk1); this->register_task(1, &bdFacebook::registerAccount);
this->register_task(3, &bdFacebook::unk3); this->register_task(2, &bdFacebook::post);
this->register_task(7, &bdFacebook::unk7); this->register_task(3, &bdFacebook::unregisterAccount);
this->register_task(8, &bdFacebook::unk8); this->register_task(5, &bdFacebook::isRegistered);
this->register_task(6, &bdFacebook::getInfo);
this->register_task(7, &bdFacebook::getRegisteredAccounts);
this->register_task(8, &bdFacebook::getFriends);
this->register_task(9, &bdFacebook::getProfilePictures);
this->register_task(10, &bdFacebook::uploadPhoto);
this->register_task(11, &bdFacebook::registerToken);
this->register_task(12, &bdFacebook::uploadVideo);
this->register_task(13, &bdFacebook::getFriendsByID);
this->register_task(14, &bdFacebook::setLikeStatus);
} }
void bdFacebook::unk1(service_server* server, byte_buffer* /*buffer*/) const void bdFacebook::registerAccount(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply->send();
} }
void bdFacebook::unk3(service_server* server, byte_buffer* /*buffer*/) const void bdFacebook::post(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply->send();
} }
void bdFacebook::unk7(service_server* server, byte_buffer* /*buffer*/) const void bdFacebook::unregisterAccount(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply->send();
} }
void bdFacebook::unk8(service_server* server, byte_buffer* /*buffer*/) const void bdFacebook::isRegistered(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdFacebook::getInfo(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdFacebook::getRegisteredAccounts(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdFacebook::getFriends(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdFacebook::getProfilePictures(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdFacebook::uploadPhoto(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdFacebook::registerToken(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdFacebook::uploadVideo(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdFacebook::getFriendsByID(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdFacebook::setLikeStatus(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());

View File

@ -8,9 +8,18 @@ namespace demonware
bdFacebook(); bdFacebook();
private: private:
void unk1(service_server* server, byte_buffer* buffer) const; void registerAccount(service_server* server, byte_buffer* buffer) const;
void unk3(service_server* server, byte_buffer* buffer) const; void post(service_server* server, byte_buffer* buffer) const;
void unk7(service_server* server, byte_buffer* buffer) const; void unregisterAccount(service_server* server, byte_buffer* buffer) const;
void unk8(service_server* server, byte_buffer* buffer) const; void isRegistered(service_server* server, byte_buffer* buffer) const;
void getInfo(service_server* server, byte_buffer* buffer) const;
void getRegisteredAccounts(service_server* server, byte_buffer* buffer) const;
void getFriends(service_server* server, byte_buffer* buffer) const;
void getProfilePictures(service_server* server, byte_buffer* buffer) const;
void uploadPhoto(service_server* server, byte_buffer* buffer) const;
void registerToken(service_server* server, byte_buffer* buffer) const;
void uploadVideo(service_server* server, byte_buffer* buffer) const;
void getFriendsByID(service_server* server, byte_buffer* buffer) const;
void setLikeStatus(service_server* server, byte_buffer* buffer) const;
}; };
} }

View File

@ -0,0 +1,41 @@
#include <std_include.hpp>
#include "../services.hpp"
namespace demonware
{
bdGroup::bdGroup() : service(28, "bdGroup")
{
this->register_task(1, &bdGroup::setGroups);
this->register_task(2, &bdGroup::setGroupsForEntity);
this->register_task(3, &bdGroup::getEntityGroups);
this->register_task(4, &bdGroup::getGroupCounts);
}
void bdGroup::setGroups(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdGroup::setGroupsForEntity(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdGroup::getEntityGroups(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdGroup::getGroupCounts(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
}

View File

@ -0,0 +1,16 @@
#pragma once
namespace demonware
{
class bdGroup final : public service
{
public:
bdGroup();
private:
void setGroups(service_server* server, byte_buffer* buffer) const;
void setGroupsForEntity(service_server* server, byte_buffer* buffer) const;
void getEntityGroups(service_server* server, byte_buffer* buffer) const;
void getGroupCounts(service_server* server, byte_buffer* buffer) const;
};
}

View File

@ -1,25 +0,0 @@
#include <std_include.hpp>
#include "../services.hpp"
namespace demonware
{
bdGroups::bdGroups() : service(28, "bdGroup")
{
this->register_task(1, &bdGroups::set_groups);
this->register_task(4, &bdGroups::unk4);
}
void bdGroups::set_groups(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdGroups::unk4(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
}

View File

@ -1,14 +0,0 @@
#pragma once
namespace demonware
{
class bdGroups final : public service
{
public:
bdGroups();
private:
void set_groups(service_server* server, byte_buffer* buffer) const;
void unk4(service_server* server, byte_buffer* buffer) const;
};
}

View File

@ -0,0 +1,97 @@
#include <std_include.hpp>
#include "../services.hpp"
namespace demonware
{
bdLeague::bdLeague() : service(81, "bdLeague")
{
this->register_task(1, &bdLeague::getTeamID);
this->register_task(2, &bdLeague::getTeamIDsForUser);
this->register_task(3, &bdLeague::getTeamSubdivisions);
this->register_task(4, &bdLeague::setTeamName);
this->register_task(5, &bdLeague::setTeamIcon);
this->register_task(6, &bdLeague::getTeamInfos);
this->register_task(7, &bdLeague::getTeamLeaguesAndSubdivisions);
this->register_task(8, &bdLeague::getTeamMemberInfos);
this->register_task(10, &bdLeague::incrementGamesPlayedCount);
this->register_task(20, &bdLeague::getSubdivisionInfos);
this->register_task(21, &bdLeague::getTeamSubdivisionHistory);
}
void bdLeague::getTeamID(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdLeague::getTeamIDsForUser(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdLeague::getTeamSubdivisions(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdLeague::setTeamName(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdLeague::setTeamIcon(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdLeague::getTeamInfos(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdLeague::getTeamLeaguesAndSubdivisions(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdLeague::getTeamMemberInfos(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdLeague::incrementGamesPlayedCount(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdLeague::getSubdivisionInfos(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdLeague::getTeamSubdivisionHistory(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
}

View File

@ -0,0 +1,23 @@
#pragma once
namespace demonware
{
class bdLeague final : public service
{
public:
bdLeague();
private:
void getTeamID(service_server* server, byte_buffer* buffer) const;
void getTeamIDsForUser(service_server* server, byte_buffer* buffer) const;
void getTeamSubdivisions(service_server* server, byte_buffer* buffer) const;
void setTeamName(service_server* server, byte_buffer* buffer) const;
void setTeamIcon(service_server* server, byte_buffer* buffer) const;
void getTeamInfos(service_server* server, byte_buffer* buffer) const;
void getTeamLeaguesAndSubdivisions(service_server* server, byte_buffer* buffer) const;
void getTeamMemberInfos(service_server* server, byte_buffer* buffer) const;
void incrementGamesPlayedCount(service_server* server, byte_buffer* buffer) const;
void getSubdivisionInfos(service_server* server, byte_buffer* buffer) const;
void getTeamSubdivisionHistory(service_server* server, byte_buffer* buffer) const;
};
}

View File

@ -0,0 +1,41 @@
#include <std_include.hpp>
#include "../services.hpp"
namespace demonware
{
bdLeague2::bdLeague2() : service(82, "bdLeague")
{
this->register_task(1, &bdLeague2::writeStats);
this->register_task(2, &bdLeague2::readStatsByTeamID);
this->register_task(3, &bdLeague2::readStatsByRank);
this->register_task(4, &bdLeague2::readStatsByPivot);
}
void bdLeague2::writeStats(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdLeague2::readStatsByTeamID(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdLeague2::readStatsByRank(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdLeague2::readStatsByPivot(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
}

View File

@ -0,0 +1,16 @@
#pragma once
namespace demonware
{
class bdLeague2 final : public service
{
public:
bdLeague2();
private:
void writeStats(service_server* server, byte_buffer* buffer) const;
void readStatsByTeamID(service_server* server, byte_buffer* buffer) const;
void readStatsByRank(service_server* server, byte_buffer* buffer) const;
void readStatsByPivot(service_server* server, byte_buffer* buffer) const;
};
}

View File

@ -1,25 +0,0 @@
#include <std_include.hpp>
#include "../services.hpp"
namespace demonware
{
bdMarketing::bdMarketing() : service(139, "bdMarketing")
{
this->register_task(2, &bdMarketing::unk2);
this->register_task(3, &bdMarketing::unk3);
}
void bdMarketing::unk2(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdMarketing::unk3(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
}

View File

@ -1,14 +0,0 @@
#pragma once
namespace demonware
{
class bdMarketing final : public service
{
public:
bdMarketing();
private:
void unk2(service_server* server, byte_buffer* buffer) const;
void unk3(service_server* server, byte_buffer* buffer) const;
};
}

View File

@ -5,10 +5,18 @@ namespace demonware
{ {
bdMarketingComms::bdMarketingComms() : service(104, "bdMarketingComms") bdMarketingComms::bdMarketingComms() : service(104, "bdMarketingComms")
{ {
this->register_task(1, &bdMarketingComms::get_messages); this->register_task(1, &bdMarketingComms::getMessages);
this->register_task(4, &bdMarketingComms::reportFullMessagesViewed);
} }
void bdMarketingComms::get_messages(service_server* server, byte_buffer* /*buffer*/) const void bdMarketingComms::getMessages(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdMarketingComms::reportFullMessagesViewed(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());

View File

@ -8,6 +8,7 @@ namespace demonware
bdMarketingComms(); bdMarketingComms();
private: private:
void get_messages(service_server* server, byte_buffer* buffer) const; void getMessages(service_server* server, byte_buffer* buffer) const;
void reportFullMessagesViewed(service_server* server, byte_buffer* buffer) const;
}; };
} }

View File

@ -0,0 +1,84 @@
#include <std_include.hpp>
#include "../services.hpp"
#include <utils/io.hpp>
namespace demonware
{
bdMarketplace::bdMarketplace() : service(80, "bdMarketplace")
{
this->register_task(42, &bdMarketplace::startExchangeTransaction); // COD POINTS purchase ?
//this->register_task(43, &bdMarketplace::purchaseOnSteamInitialize); // COD POINTS purchase ?
this->register_task(49, &bdMarketplace::getExpiredInventoryItems);
this->register_task(60, &bdMarketplace::steamProcessDurable);
this->register_task(122, &bdMarketplace::purchaseSkus);
this->register_task(130, &bdMarketplace::getBalance);
this->register_task(165, &bdMarketplace::getInventoryPaginated);
this->register_task(193, &bdMarketplace::putPlayersInventoryItems);
this->register_task(232, &bdMarketplace::getEntitlements);
}
void bdMarketplace::startExchangeTransaction(service_server* server, byte_buffer* buffer) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdMarketplace::purchaseOnSteamInitialize(service_server* server, byte_buffer* buffer) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdMarketplace::getExpiredInventoryItems(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdMarketplace::steamProcessDurable(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdMarketplace::purchaseSkus(service_server* server, byte_buffer* buffer) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdMarketplace::getBalance(service_server* server, byte_buffer* buffer) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdMarketplace::getInventoryPaginated(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdMarketplace::putPlayersInventoryItems(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdMarketplace::getEntitlements(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
}

View File

@ -0,0 +1,21 @@
#pragma once
namespace demonware
{
class bdMarketplace final : public service
{
public:
bdMarketplace();
private:
void startExchangeTransaction(service_server* server, byte_buffer* buffer) const;
void purchaseOnSteamInitialize(service_server* server, byte_buffer* buffer) const;
void getExpiredInventoryItems(service_server* server, byte_buffer* buffer) const;
void steamProcessDurable(service_server* server, byte_buffer* buffer) const;
void purchaseSkus(service_server* server, byte_buffer* buffer) const;
void getBalance(service_server* server, byte_buffer* buffer) const;
void getInventoryPaginated(service_server* server, byte_buffer* buffer) const;
void putPlayersInventoryItems(service_server* server, byte_buffer* buffer) const;
void getEntitlements(service_server* server, byte_buffer* buffer) const;
};
}

View File

@ -0,0 +1,129 @@
#include <std_include.hpp>
#include "../services.hpp"
namespace demonware
{
bdMatchMaking::bdMatchMaking() : service(138, "bdMatchMaking")
{
this->register_task(1, &bdMatchMaking::createSession);
this->register_task(2, &bdMatchMaking::updateSession);
this->register_task(3, &bdMatchMaking::deleteSession);
this->register_task(4, &bdMatchMaking::findSessionFromID);
this->register_task(5, &bdMatchMaking::findSessions);
this->register_task(6, &bdMatchMaking::notifyJoin);
this->register_task(8, &bdMatchMaking::inviteToSession);
this->register_task(9, &bdMatchMaking::submitPerformance);
this->register_task(10, &bdMatchMaking::getPerformanceValues);
this->register_task(11, &bdMatchMaking::getSessionInvites);
this->register_task(12, &bdMatchMaking::updateSessionPlayers);
this->register_task(13, &bdMatchMaking::findSessionsPaged);
this->register_task(14, &bdMatchMaking::findSessionsByEntityIDs);
this->register_task(15, &bdMatchMaking::findSessionsFromIDs);
this->register_task(16, &bdMatchMaking::findSessionsTwoPass);
}
void bdMatchMaking::createSession(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdMatchMaking::updateSession(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdMatchMaking::deleteSession(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdMatchMaking::findSessionFromID(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdMatchMaking::findSessions(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdMatchMaking::getPerformanceValues(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdMatchMaking::getSessionInvites(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdMatchMaking::updateSessionPlayers(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdMatchMaking::submitPerformance(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdMatchMaking::notifyJoin(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdMatchMaking::inviteToSession(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdMatchMaking::findSessionsPaged(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdMatchMaking::findSessionsByEntityIDs(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdMatchMaking::findSessionsFromIDs(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdMatchMaking::findSessionsTwoPass(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
}

View File

@ -0,0 +1,27 @@
#pragma once
namespace demonware
{
class bdMatchMaking final : public service
{
public:
bdMatchMaking();
private:
void createSession(service_server* server, byte_buffer* buffer) const;
void updateSession(service_server* server, byte_buffer* buffer) const;
void deleteSession(service_server* server, byte_buffer* buffer) const;
void findSessionFromID(service_server* server, byte_buffer* buffer) const;
void findSessions(service_server* server, byte_buffer* buffer) const;
void inviteToSession(service_server* server, byte_buffer* buffer) const;
void submitPerformance(service_server* server, byte_buffer* buffer) const;
void notifyJoin(service_server* server, byte_buffer* buffer) const;
void getPerformanceValues(service_server* server, byte_buffer* buffer) const;
void getSessionInvites(service_server* server, byte_buffer* buffer) const;
void updateSessionPlayers(service_server* server, byte_buffer* buffer) const;
void findSessionsPaged(service_server* server, byte_buffer* buffer) const;
void findSessionsByEntityIDs(service_server* server, byte_buffer* buffer) const;
void findSessionsFromIDs(service_server* server, byte_buffer* buffer) const;
void findSessionsTwoPass(service_server* server, byte_buffer* buffer) const;
};
}

View File

@ -1,57 +0,0 @@
#include <std_include.hpp>
#include "../services.hpp"
namespace demonware
{
bdMatchMaking2::bdMatchMaking2() : service(138, "bdMatchMaking2")
{
this->register_task(1, &bdMatchMaking2::unk1);
this->register_task(2, &bdMatchMaking2::unk2);
this->register_task(3, &bdMatchMaking2::unk3);
this->register_task(5, &bdMatchMaking2::unk5);
this->register_task(10, &bdMatchMaking2::unk10);
this->register_task(16, &bdMatchMaking2::unk16);
}
void bdMatchMaking2::unk1(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdMatchMaking2::unk2(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdMatchMaking2::unk3(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdMatchMaking2::unk5(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdMatchMaking2::unk10(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdMatchMaking2::unk16(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
}

View File

@ -1,18 +0,0 @@
#pragma once
namespace demonware
{
class bdMatchMaking2 final : public service
{
public:
bdMatchMaking2();
private:
void unk1(service_server* server, byte_buffer* buffer) const;
void unk2(service_server* server, byte_buffer* buffer) const;
void unk3(service_server* server, byte_buffer* buffer) const;
void unk5(service_server* server, byte_buffer* buffer) const;
void unk10(service_server* server, byte_buffer* buffer) const;
void unk16(service_server* server, byte_buffer* buffer) const;
};
}

View File

@ -5,10 +5,66 @@ namespace demonware
{ {
bdProfiles::bdProfiles() : service(8, "bdProfiles") bdProfiles::bdProfiles() : service(8, "bdProfiles")
{ {
this->register_task(3, &bdProfiles::unk3); this->register_task(1, &bdProfiles::getPublicInfos);
this->register_task(2, &bdProfiles::getPrivateInfo);
this->register_task(3, &bdProfiles::setPublicInfo);
this->register_task(4, &bdProfiles::setPrivateInfo);
this->register_task(5, &bdProfiles::deleteProfile);
this->register_task(6, &bdProfiles::setPrivateInfoByUserID);
this->register_task(7, &bdProfiles::getPrivateInfoByUserID);
this->register_task(8, &bdProfiles::setPublicInfoByUserID);
} }
void bdProfiles::unk3(service_server* server, byte_buffer* /*buffer*/) const void bdProfiles::getPublicInfos(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdProfiles::setPublicInfo(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdProfiles::getPrivateInfo(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdProfiles::setPrivateInfo(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdProfiles::deleteProfile(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdProfiles::setPrivateInfoByUserID(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdProfiles::getPrivateInfoByUserID(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdProfiles::setPublicInfoByUserID(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());

View File

@ -8,6 +8,13 @@ namespace demonware
bdProfiles(); bdProfiles();
private: private:
void unk3(service_server* server, byte_buffer* buffer) const; void getPublicInfos(service_server* server, byte_buffer* buffer) const;
void getPrivateInfo(service_server* server, byte_buffer* buffer) const;
void setPublicInfo(service_server* server, byte_buffer* buffer) const;
void setPrivateInfo(service_server* server, byte_buffer* buffer) const;
void deleteProfile(service_server* server, byte_buffer* buffer) const;
void setPrivateInfoByUserID(service_server* server, byte_buffer* buffer) const;
void getPrivateInfoByUserID(service_server* server, byte_buffer* buffer) const;
void setPublicInfoByUserID(service_server* server, byte_buffer* buffer) const;
}; };
} }

View File

@ -0,0 +1,17 @@
#include <std_include.hpp>
#include "../services.hpp"
namespace demonware
{
bdPublisherVariables::bdPublisherVariables() : service(95, "bdPublisherVariables")
{
this->register_task(1, &bdPublisherVariables::retrievePublisherVariables);
}
void bdPublisherVariables::retrievePublisherVariables(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
}

View File

@ -0,0 +1,13 @@
#pragma once
namespace demonware
{
class bdPublisherVariables final : public service
{
public:
bdPublisherVariables();
private:
void retrievePublisherVariables(service_server* server, byte_buffer* buffer) const;
};
}

View File

@ -0,0 +1,41 @@
#include <std_include.hpp>
#include "../services.hpp"
namespace demonware
{
bdReward::bdReward() : service(139, "bdReward")
{
this->register_task(1, &bdReward::incrementTime);
this->register_task(2, &bdReward::claimRewardRoll);
this->register_task(3, &bdReward::claimClientAchievements);
this->register_task(4, &bdReward::reportRewardEvents);
}
void bdReward::incrementTime(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdReward::claimRewardRoll(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdReward::claimClientAchievements(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdReward::reportRewardEvents(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
}

View File

@ -0,0 +1,16 @@
#pragma once
namespace demonware
{
class bdReward final : public service
{
public:
bdReward();
private:
void incrementTime(service_server* server, byte_buffer* buffer) const;
void claimRewardRoll(service_server* server, byte_buffer* buffer) const;
void claimClientAchievements(service_server* server, byte_buffer* buffer) const;
void reportRewardEvents(service_server* server, byte_buffer* buffer) const;
};
}

View File

@ -5,18 +5,18 @@ namespace demonware
{ {
bdRichPresence::bdRichPresence() : service(68, "bdRichPresence") bdRichPresence::bdRichPresence() : service(68, "bdRichPresence")
{ {
this->register_task(1, &bdRichPresence::unk1); this->register_task(1, &bdRichPresence::setInfo);
this->register_task(2, &bdRichPresence::unk2); this->register_task(2, &bdRichPresence::getInfo);
} }
void bdRichPresence::unk1(service_server* server, byte_buffer* /*buffer*/) const void bdRichPresence::setInfo(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply->send();
} }
void bdRichPresence::unk2(service_server* server, byte_buffer* /*buffer*/) const void bdRichPresence::getInfo(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());

View File

@ -8,7 +8,7 @@ namespace demonware
bdRichPresence(); bdRichPresence();
private: private:
void unk1(service_server* server, byte_buffer* buffer) const; void setInfo(service_server* server, byte_buffer* buffer) const;
void unk2(service_server* server, byte_buffer* buffer) const; void getInfo(service_server* server, byte_buffer* buffer) const;
}; };
} }

View File

@ -5,14 +5,29 @@ namespace demonware
{ {
bdStats::bdStats() : service(4, "bdStats") bdStats::bdStats() : service(4, "bdStats")
{ {
this->register_task(1, &bdStats::unk1); this->register_task(1, &bdStats::writeStats);
this->register_task(2, &bdStats::deleteStats);
this->register_task(3, &bdStats::unk3); // leaderboards this->register_task(3, &bdStats::unk3); // leaderboards
this->register_task(4, &bdStats::unk4); this->register_task(4, &bdStats::readStatsByRank);
this->register_task(8, &bdStats::unk8); this->register_task(5, &bdStats::readStatsByPivot);
this->register_task(11, &bdStats::unk11); this->register_task(6, &bdStats::readStatsByRating);
this->register_task(7, &bdStats::readStatsByMultipleRanks);
this->register_task(8, &bdStats::readExternalTitleStats);
this->register_task(10, &bdStats::readExternalTitleNamedStats);
this->register_task(11, &bdStats::readStatsByLeaderboardIDsAndEntityIDs);
this->register_task(12, &bdStats::readStatsByMultipleRatings);
this->register_task(13, &bdStats::readStatsByEntityID);
this->register_task(14, &bdStats::writeServerValidatedStats);
} }
void bdStats::unk1(service_server* server, byte_buffer* /*buffer*/) const void bdStats::writeStats(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdStats::deleteStats(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
@ -26,21 +41,70 @@ namespace demonware
reply->send(); reply->send();
} }
void bdStats::unk4(service_server* server, byte_buffer* /*buffer*/) const void bdStats::readStatsByRank(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply->send();
} }
void bdStats::unk8(service_server* server, byte_buffer* /*buffer*/) const void bdStats::readStatsByPivot(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply->send();
} }
void bdStats::unk11(service_server* server, byte_buffer* /*buffer*/) const void bdStats::readStatsByRating(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdStats::readStatsByMultipleRanks(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdStats::readExternalTitleStats(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdStats::readExternalTitleNamedStats(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdStats::readStatsByLeaderboardIDsAndEntityIDs(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdStats::readStatsByMultipleRatings(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdStats::readStatsByEntityID(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdStats::writeServerValidatedStats(service_server* server, byte_buffer* /*buffer*/) const
{ {
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());

View File

@ -8,10 +8,18 @@ namespace demonware
bdStats(); bdStats();
private: private:
void unk1(service_server* server, byte_buffer* buffer) const; void writeStats(service_server* server, byte_buffer* buffer) const;
void deleteStats(service_server* server, byte_buffer* buffer) const;
void unk3(service_server* server, byte_buffer* buffer) const; void unk3(service_server* server, byte_buffer* buffer) const;
void unk4(service_server* server, byte_buffer* buffer) const; void readStatsByRank(service_server* server, byte_buffer* buffer) const;
void unk8(service_server* server, byte_buffer* buffer) const; void readStatsByPivot(service_server* server, byte_buffer* buffer) const;
void unk11(service_server* server, byte_buffer* buffer) const; void readStatsByRating(service_server* server, byte_buffer* buffer) const;
void readStatsByMultipleRanks(service_server* server, byte_buffer* buffer) const;
void readExternalTitleStats(service_server* server, byte_buffer* buffer) const;
void readExternalTitleNamedStats(service_server* server, byte_buffer* buffer) const;
void readStatsByLeaderboardIDsAndEntityIDs(service_server* server, byte_buffer* buffer) const;
void readStatsByMultipleRatings(service_server* server, byte_buffer* buffer) const;
void readStatsByEntityID(service_server* server, byte_buffer* buffer) const;
void writeServerValidatedStats(service_server* server, byte_buffer* buffer) const;
}; };
} }

View File

@ -0,0 +1,25 @@
#include <std_include.hpp>
#include "../services.hpp"
namespace demonware
{
bdStats2::bdStats2() : service(19, "bdStats")
{
this->register_task(1, &bdStats2::startArbitratedSession);
this->register_task(2, &bdStats2::writeArbitratedStats);
}
void bdStats2::startArbitratedSession(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdStats2::writeArbitratedStats(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
}

View File

@ -0,0 +1,14 @@
#pragma once
namespace demonware
{
class bdStats2 final : public service
{
public:
bdStats2();
private:
void startArbitratedSession(service_server* server, byte_buffer* buffer) const;
void writeArbitratedStats(service_server* server, byte_buffer* buffer) const;
};
}

View File

@ -0,0 +1,65 @@
#include <std_include.hpp>
#include "../services.hpp"
namespace demonware
{
bdStats3::bdStats3() : service(91, "bdStats")
{
this->register_task(1, &bdStats3::deleteCSFileStats);
this->register_task(3, &bdStats3::readStatsByEntityID);
this->register_task(4, &bdStats3::readStatsByRank);
this->register_task(5, &bdStats3::readStatsByPivot);
this->register_task(6, &bdStats3::readStatsByRating);
this->register_task(7, &bdStats3::readStatsByMultipleRanks);
this->register_task(11, &bdStats3::readStatsByLeaderboardIDsAndEntityIDs);
}
void bdStats3::deleteCSFileStats(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdStats3::readStatsByEntityID(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdStats3::readStatsByRank(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdStats3::readStatsByPivot(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdStats3::readStatsByRating(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdStats3::readStatsByMultipleRanks(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdStats3::readStatsByLeaderboardIDsAndEntityIDs(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
}

View File

@ -0,0 +1,19 @@
#pragma once
namespace demonware
{
class bdStats3 final : public service
{
public:
bdStats3();
private:
void deleteCSFileStats(service_server* server, byte_buffer* buffer) const;
void readStatsByEntityID(service_server* server, byte_buffer* buffer) const;
void readStatsByRank(service_server* server, byte_buffer* buffer) const;
void readStatsByPivot(service_server* server, byte_buffer* buffer) const;
void readStatsByRating(service_server* server, byte_buffer* buffer) const;
void readStatsByMultipleRanks(service_server* server, byte_buffer* buffer) const;
void readStatsByLeaderboardIDsAndEntityIDs(service_server* server, byte_buffer* buffer) const;
};
}

View File

@ -57,7 +57,7 @@ namespace demonware
} }
} }
#ifdef DEBUG #ifdef DW_DEBUG
printf("[DW]: [bdStorage]: missing publisher file: %s\n", name.data()); printf("[DW]: [bdStorage]: missing publisher file: %s\n", name.data());
#endif #endif
@ -66,10 +66,6 @@ namespace demonware
void bdStorage::list_publisher_files(service_server* server, byte_buffer* buffer) void bdStorage::list_publisher_files(service_server* server, byte_buffer* buffer)
{ {
#ifdef DEBUG
utils::io::write_file("demonware/bdStorage/list_publisher_files", buffer->get_buffer());
#endif
uint32_t date; uint32_t date;
uint16_t num_results, offset; uint16_t num_results, offset;
std::string unk, filename, data; std::string unk, filename, data;
@ -80,7 +76,7 @@ namespace demonware
buffer->read_uint16(&offset); buffer->read_uint16(&offset);
buffer->read_string(&filename); buffer->read_string(&filename);
#ifdef DEBUG #ifdef DW_DEBUG
printf("[DW]: [bdStorage]: list publisher files: %s\n", filename.data()); printf("[DW]: [bdStorage]: list publisher files: %s\n", filename.data());
#endif #endif
@ -106,15 +102,11 @@ namespace demonware
void bdStorage::get_publisher_file(service_server* server, byte_buffer* buffer) void bdStorage::get_publisher_file(service_server* server, byte_buffer* buffer)
{ {
#ifdef DEBUG
utils::io::write_file("demonware/bdStorage/get_publisher_file", buffer->get_buffer());
#endif
std::string unk, filename; std::string unk, filename;
buffer->read_string(&unk); buffer->read_string(&unk);
buffer->read_string(&filename); buffer->read_string(&filename);
#ifdef DEBUG #ifdef DW_DEBUG
printf("[DW]: [bdStorage]: loading publisher file: %s\n", filename.data()); printf("[DW]: [bdStorage]: loading publisher file: %s\n", filename.data());
#endif #endif
@ -122,7 +114,7 @@ namespace demonware
if (this->load_publisher_resource(filename, data)) if (this->load_publisher_resource(filename, data))
{ {
#ifdef DEBUG #ifdef DW_DEBUG
printf("[DW]: [bdStorage]: sending publisher file: %s, size: %lld\n", filename.data(), data.size()); printf("[DW]: [bdStorage]: sending publisher file: %s, size: %lld\n", filename.data(), data.size());
#endif #endif
@ -143,10 +135,6 @@ namespace demonware
void bdStorage::set_user_file(service_server* server, byte_buffer* buffer) const void bdStorage::set_user_file(service_server* server, byte_buffer* buffer) const
{ {
#ifdef DEBUG
utils::io::write_file("demonware/bdStorage/set_user_file", buffer->get_buffer());
#endif
uint64_t owner; uint64_t owner;
uint32_t numfiles; uint32_t numfiles;
std::string game, platform; std::string game, platform;
@ -183,7 +171,7 @@ namespace demonware
info->filename = filename; info->filename = filename;
info->data = data; info->data = data;
#ifdef DEBUG #ifdef DW_DEBUG
printf("[DW]: [bdStorage]: set user file: %s\n", filename.data()); printf("[DW]: [bdStorage]: set user file: %s\n", filename.data());
#endif #endif
@ -195,10 +183,6 @@ namespace demonware
void bdStorage::get_user_file(service_server* server, byte_buffer* buffer) const void bdStorage::get_user_file(service_server* server, byte_buffer* buffer) const
{ {
#ifdef DEBUG
utils::io::write_file("demonware/bdStorage/get_user_file", buffer->get_buffer());
#endif
uint32_t unk32_0; uint32_t unk32_0;
uint32_t numfiles, count = 0; uint32_t numfiles, count = 0;
uint64_t owner; uint64_t owner;
@ -222,7 +206,7 @@ namespace demonware
const auto path = get_user_file_path(filename); const auto path = get_user_file_path(filename);
if (!utils::io::read_file(path, &data)) if (!utils::io::read_file(path, &data))
{ {
#ifdef DEBUG #ifdef DW_DEBUG
printf("[DW]: [bdStorage]: get user file: missing file: %s, %s, %s\n", game.data(), filename.data(), platform.data()); printf("[DW]: [bdStorage]: get user file: missing file: %s, %s, %s\n", game.data(), filename.data(), platform.data());
#endif #endif
continue; continue;
@ -238,7 +222,7 @@ namespace demonware
reply->add(response); reply->add(response);
++count; ++count;
#ifdef DEBUG #ifdef DW_DEBUG
printf("[DW]: [bdStorage]: get user file: %s, %s, %s\n", game.data(), filename.data(), platform.data()); printf("[DW]: [bdStorage]: get user file: %s, %s, %s\n", game.data(), filename.data(), platform.data());
#endif #endif
} }
@ -255,10 +239,6 @@ namespace demonware
void bdStorage::unk12(service_server* server, byte_buffer* buffer) const void bdStorage::unk12(service_server* server, byte_buffer* buffer) const
{ {
#ifdef DEBUG
utils::io::write_file("demonware/bdStorage/unk12", buffer->get_buffer());
#endif
// TODO: // TODO:
auto reply = server->create_reply(this->task_id()); auto reply = server->create_reply(this->task_id());
reply->send(); reply->send();

View File

@ -0,0 +1,409 @@
#include <std_include.hpp>
#include "../services.hpp"
namespace demonware
{
bdTeams::bdTeams() : service(3, "bdTeams")
{
this->register_task(30, &bdTeams::createTeam);
this->register_task(31, &bdTeams::updateTeamName);
this->register_task(32, &bdTeams::promoteMember);
this->register_task(33, &bdTeams::kickMember);
this->register_task(34, &bdTeams::leaveTeam);
this->register_task(35, &bdTeams::proposeMembership);
this->register_task(36, &bdTeams::rejectMembership);
this->register_task(37, &bdTeams::acceptMembership);
this->register_task(38, &bdTeams::getPublicProfiles);
this->register_task(39, &bdTeams::getPrivateProfile);
this->register_task(40, &bdTeams::getPublicMemberProfiles);
this->register_task(41, &bdTeams::getPrivateMemberProfiles);
this->register_task(42, &bdTeams::setPublicProfile);
this->register_task(43, &bdTeams::setPrivateProfile);
this->register_task(44, &bdTeams::setPublicMemberProfile);
this->register_task(45, &bdTeams::setPrivateMemberProfile);
this->register_task(46, &bdTeams::getMemberships);
this->register_task(47, &bdTeams::getMembers);
this->register_task(48, &bdTeams::getOutgoingProposals);
this->register_task(49, &bdTeams::withdrawProposal);
this->register_task(50, &bdTeams::demoteMember);
this->register_task(51, &bdTeams::promoteMemberToOwner);
this->register_task(52, &bdTeams::getTeamInfo);
this->register_task(53, &bdTeams::getIncomingProposals);
this->register_task(54, &bdTeams::sendInstantMessage);
this->register_task(56, &bdTeams::getMembershipsUser);
this->register_task(57, &bdTeams::sendInstantMessageToTeam);
this->register_task(58, &bdTeams::searchPublicTeamProfiles);
this->register_task(63, &bdTeams::addApplication);
this->register_task(64, &bdTeams::getApplicationsByTeam);
this->register_task(65, &bdTeams::acceptApplication);
this->register_task(66, &bdTeams::rejectApplication);
this->register_task(68, &bdTeams::autoJoinTeam);
this->register_task(70, &bdTeams::createTeamWithProfiles);
this->register_task(73, &bdTeams::banMember);
this->register_task(74, &bdTeams::unbanMember);
this->register_task(76, &bdTeams::blockApplication);
this->register_task(78, &bdTeams::unblockApplication);
this->register_task(80, &bdTeams::updateTeamType);
this->register_task(82, &bdTeams::setOnline);
this->register_task(83, &bdTeams::getMembershipsWithCounts);
this->register_task(84, &bdTeams::getMembershipsWithCountsUser);
this->register_task(85, &bdTeams::searchTeams);
this->register_task(86, &bdTeams::createTeamWithProfilesAndTeamType);
this->register_task(87, &bdTeams::getMembershipsWithCountsAndTeamTypeUser);
this->register_task(88, &bdTeams::getMembershipsWithCountsAndTeamType);
this->register_task(89, &bdTeams::getTeamInfoWithTeamType);
this->register_task(91, &bdTeams::setTeamAutoJoin);
this->register_task(92, &bdTeams::getTeamAutoJoin);
this->register_task(94, &bdTeams::getMembersAndPrivileges);
}
void bdTeams::createTeam(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdTeams::updateTeamName(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdTeams::promoteMember(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdTeams::kickMember(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdTeams::leaveTeam(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdTeams::proposeMembership(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdTeams::rejectMembership(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdTeams::acceptMembership(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdTeams::getPublicProfiles(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdTeams::getPrivateProfile(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdTeams::getPublicMemberProfiles(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdTeams::getPrivateMemberProfiles(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdTeams::setPublicProfile(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdTeams::setPrivateProfile(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdTeams::setPublicMemberProfile(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdTeams::setPrivateMemberProfile(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdTeams::getMemberships(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdTeams::getMembers(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdTeams::getOutgoingProposals(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdTeams::withdrawProposal(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdTeams::demoteMember(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdTeams::promoteMemberToOwner(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdTeams::getTeamInfo(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdTeams::getIncomingProposals(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdTeams::sendInstantMessage(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdTeams::getMembershipsUser(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdTeams::sendInstantMessageToTeam(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdTeams::searchPublicTeamProfiles(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdTeams::addApplication(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdTeams::getApplicationsByTeam(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdTeams::acceptApplication(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdTeams::rejectApplication(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdTeams::autoJoinTeam(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdTeams::createTeamWithProfiles(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdTeams::banMember(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdTeams::unbanMember(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdTeams::blockApplication(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdTeams::unblockApplication(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdTeams::updateTeamType(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdTeams::setOnline(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdTeams::getMembershipsWithCounts(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdTeams::getMembershipsWithCountsUser(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdTeams::searchTeams(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdTeams::createTeamWithProfilesAndTeamType(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdTeams::getMembershipsWithCountsAndTeamTypeUser(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdTeams::getMembershipsWithCountsAndTeamType(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdTeams::getTeamInfoWithTeamType(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdTeams::setTeamAutoJoin(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdTeams::getTeamAutoJoin(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdTeams::getMembersAndPrivileges(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
}

View File

@ -0,0 +1,62 @@
#pragma once
namespace demonware
{
class bdTeams final : public service
{
public:
bdTeams();
private:
void createTeam(service_server* server, byte_buffer* buffer) const;
void updateTeamName(service_server* server, byte_buffer* buffer) const;
void promoteMember(service_server* server, byte_buffer* buffer) const;
void kickMember(service_server* server, byte_buffer* buffer) const;
void leaveTeam(service_server* server, byte_buffer* buffer) const;
void proposeMembership(service_server* server, byte_buffer* buffer) const;
void rejectMembership(service_server* server, byte_buffer* buffer) const;
void acceptMembership(service_server* server, byte_buffer* buffer) const;
void getPublicProfiles(service_server* server, byte_buffer* buffer) const;
void getPrivateProfile(service_server* server, byte_buffer* buffer) const;
void getPublicMemberProfiles(service_server* server, byte_buffer* buffer) const;
void getPrivateMemberProfiles(service_server* server, byte_buffer* buffer) const;
void setPublicProfile(service_server* server, byte_buffer* buffer) const;
void setPrivateProfile(service_server* server, byte_buffer* buffer) const;
void setPublicMemberProfile(service_server* server, byte_buffer* buffer) const;
void setPrivateMemberProfile(service_server* server, byte_buffer* buffer) const;
void getMemberships(service_server* server, byte_buffer* buffer) const;
void getMembers(service_server* server, byte_buffer* buffer) const;
void getOutgoingProposals(service_server* server, byte_buffer* buffer) const;
void withdrawProposal(service_server* server, byte_buffer* buffer) const;
void demoteMember(service_server* server, byte_buffer* buffer) const;
void promoteMemberToOwner(service_server* server, byte_buffer* buffer) const;
void getTeamInfo(service_server* server, byte_buffer* buffer) const;
void getIncomingProposals(service_server* server, byte_buffer* buffer) const;
void sendInstantMessage(service_server* server, byte_buffer* buffer) const;
void getMembershipsUser(service_server* server, byte_buffer* buffer) const;
void sendInstantMessageToTeam(service_server* server, byte_buffer* buffer) const;
void searchPublicTeamProfiles(service_server* server, byte_buffer* buffer) const;
void addApplication(service_server* server, byte_buffer* buffer) const;
void getApplicationsByTeam(service_server* server, byte_buffer* buffer) const;
void acceptApplication(service_server* server, byte_buffer* buffer) const;
void rejectApplication(service_server* server, byte_buffer* buffer) const;
void autoJoinTeam(service_server* server, byte_buffer* buffer) const;
void createTeamWithProfiles(service_server* server, byte_buffer* buffer) const;
void banMember(service_server* server, byte_buffer* buffer) const;
void unbanMember(service_server* server, byte_buffer* buffer) const;
void blockApplication(service_server* server, byte_buffer* buffer) const;
void unblockApplication(service_server* server, byte_buffer* buffer) const;
void updateTeamType(service_server* server, byte_buffer* buffer) const;
void setOnline(service_server* server, byte_buffer* buffer) const;
void getMembershipsWithCounts(service_server* server, byte_buffer* buffer) const;
void getMembershipsWithCountsUser(service_server* server, byte_buffer* buffer) const;
void searchTeams(service_server* server, byte_buffer* buffer) const;
void createTeamWithProfilesAndTeamType(service_server* server, byte_buffer* buffer) const;
void getMembershipsWithCountsAndTeamTypeUser(service_server* server, byte_buffer* buffer) const;
void getMembershipsWithCountsAndTeamType(service_server* server, byte_buffer* buffer) const;
void getTeamInfoWithTeamType(service_server* server, byte_buffer* buffer) const;
void setTeamAutoJoin(service_server* server, byte_buffer* buffer) const;
void getTeamAutoJoin(service_server* server, byte_buffer* buffer) const;
void getMembersAndPrivileges(service_server* server, byte_buffer* buffer) const;
};
}

View File

@ -1,66 +0,0 @@
#include <std_include.hpp>
#include "../services.hpp"
namespace demonware
{
bdUNK80::bdUNK80() : service(80, "bdUNK80")
{
this->register_task(42, &bdUNK80::unk42); // COD POINTS purchase ?
// this->register_task(43, &bdUNK80::unk43); COD POINTS purchase ?
this->register_task(49, &bdUNK80::unk49);
this->register_task(60, &bdUNK80::unk60);
this->register_task(130, &bdUNK80::unk130);
this->register_task(165, &bdUNK80::unk165);
this->register_task(193, &bdUNK80::unk193);
this->register_task(232, &bdUNK80::unk232);
}
void bdUNK80::unk42(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdUNK80::unk49(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdUNK80::unk60(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdUNK80::unk130(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdUNK80::unk165(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdUNK80::unk193(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdUNK80::unk232(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
}

View File

@ -1,19 +0,0 @@
#pragma once
namespace demonware
{
class bdUNK80 final : public service
{
public:
bdUNK80();
private:
void unk42(service_server* server, byte_buffer* buffer) const;
void unk49(service_server* server, byte_buffer* buffer) const;
void unk60(service_server* server, byte_buffer* buffer) const;
void unk130(service_server* server, byte_buffer* buffer) const;
void unk165(service_server* server, byte_buffer* buffer) const;
void unk193(service_server* server, byte_buffer* buffer) const;
void unk232(service_server* server, byte_buffer* buffer) const;
};
}

View File

@ -1,17 +0,0 @@
#include <std_include.hpp>
#include "../services.hpp"
namespace demonware
{
bdUNK95::bdUNK95() : service(95, "bdUNK95")
{
this->register_task(1, &bdUNK95::unk1);
}
void bdUNK95::unk1(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
}

View File

@ -1,13 +0,0 @@
#pragma once
namespace demonware
{
class bdUNK95 final : public service
{
public:
bdUNK95();
private:
void unk1(service_server* server, byte_buffer* buffer) const;
};
}

View File

@ -0,0 +1,97 @@
#include <std_include.hpp>
#include "../services.hpp"
namespace demonware
{
bdUserGroups::bdUserGroups() : service(65, "bdUserGroups")
{
this->register_task(1, &bdUserGroups::createGroup);
this->register_task(2, &bdUserGroups::deleteGroup);
this->register_task(3, &bdUserGroups::joinGroup);
this->register_task(4, &bdUserGroups::leaveGroup);
this->register_task(5, &bdUserGroups::getMembershipInfo);
this->register_task(6, &bdUserGroups::changeMemberType);
this->register_task(7, &bdUserGroups::getNumMembers);
this->register_task(8, &bdUserGroups::getMembers);
this->register_task(9, &bdUserGroups::getMemberships);
this->register_task(10, &bdUserGroups::readStatsByRank);
this->register_task(11, &bdUserGroups::getGroupLists);
}
void bdUserGroups::createGroup(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdUserGroups::deleteGroup(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdUserGroups::joinGroup(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdUserGroups::leaveGroup(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdUserGroups::getMembershipInfo(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdUserGroups::changeMemberType(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdUserGroups::getNumMembers(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdUserGroups::getMembers(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdUserGroups::getMemberships(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdUserGroups::readStatsByRank(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
void bdUserGroups::getGroupLists(service_server* server, byte_buffer* /*buffer*/) const
{
// TODO:
auto reply = server->create_reply(this->task_id());
reply->send();
}
}

View File

@ -0,0 +1,23 @@
#pragma once
namespace demonware
{
class bdUserGroups final : public service
{
public:
bdUserGroups();
private:
void createGroup(service_server* server, byte_buffer* buffer) const;
void deleteGroup(service_server* server, byte_buffer* buffer) const;
void joinGroup(service_server* server, byte_buffer* buffer) const;
void leaveGroup(service_server* server, byte_buffer* buffer) const;
void getMembershipInfo(service_server* server, byte_buffer* buffer) const;
void changeMemberType(service_server* server, byte_buffer* buffer) const;
void getNumMembers(service_server* server, byte_buffer* buffer) const;
void getMembers(service_server* server, byte_buffer* buffer) const;
void getMemberships(service_server* server, byte_buffer* buffer) const;
void readStatsByRank(service_server* server, byte_buffer* buffer) const;
void getGroupLists(service_server* server, byte_buffer* buffer) const;
};
}

View File

@ -882,6 +882,7 @@ namespace game
DVAR_FLAG_SAVED = 0x1, DVAR_FLAG_SAVED = 0x1,
DVAR_FLAG_LATCHED = 0x2, DVAR_FLAG_LATCHED = 0x2,
DVAR_FLAG_CHEAT = 0x4, DVAR_FLAG_CHEAT = 0x4,
DVAR_FLAG_EXTERNAL = 0x100,
DVAR_FLAG_REPLICATED = 0x8, DVAR_FLAG_REPLICATED = 0x8,
DVAR_FLAG_WRITE = 0x800, DVAR_FLAG_WRITE = 0x800,
DVAR_FLAG_READ = 0x2000, DVAR_FLAG_READ = 0x2000,

View File

@ -60,6 +60,7 @@ namespace game
WEAK symbol<bool()> CL_IsCgameInitialized{0x1A3210, 0x33C640}; WEAK symbol<bool()> CL_IsCgameInitialized{0x1A3210, 0x33C640};
WEAK symbol<void(int a1)> CL_VirtualLobbyShutdown{0x0, 0x0}; WEAK symbol<void(int a1)> CL_VirtualLobbyShutdown{0x0, 0x0};
WEAK symbol<const char* (int configStringIndex)> CL_GetConfigString{0x0, 0x33B820};
WEAK symbol<void(int hash, const char* name, const char* buffer)> Dvar_SetCommand{0x41BAD0, 0x1857D0}; WEAK symbol<void(int hash, const char* name, const char* buffer)> Dvar_SetCommand{0x41BAD0, 0x1857D0};
WEAK symbol<dvar_t*(const char* name)> Dvar_FindVar{0x41A600, 0x183EB0}; WEAK symbol<dvar_t*(const char* name)> Dvar_FindVar{0x41A600, 0x183EB0};
@ -70,6 +71,7 @@ namespace game
WEAK symbol<void(dvar_t* dvar, DvarSetSource source)> Dvar_Reset{0x41B5F0, 0x185390}; WEAK symbol<void(dvar_t* dvar, DvarSetSource source)> Dvar_Reset{0x41B5F0, 0x185390};
WEAK symbol<void(const char*, const char*, WEAK symbol<void(const char*, const char*,
DvarSetSource)> Dvar_SetFromStringByNameFromSource{0x41BD90, 0x185BD0}; DvarSetSource)> Dvar_SetFromStringByNameFromSource{0x41BD90, 0x185BD0};
WEAK symbol<void(dvar_t* dvar, const char* string, DvarSetSource source)> Dvar_SetFromStringFromSource{0x0, 0x185C60};
WEAK symbol<dvar_t*(int hash, const char* name, bool value, WEAK symbol<dvar_t*(int hash, const char* name, bool value,
unsigned int flags)> Dvar_RegisterBool{0x419220, 0x182340}; unsigned int flags)> Dvar_RegisterBool{0x419220, 0x182340};
@ -139,6 +141,9 @@ namespace game
#define R_AddCmdDrawTextWithCursor(TXT, MC, F, UNK, X, Y, XS, YS, R, C, S, CP, CC) \ #define R_AddCmdDrawTextWithCursor(TXT, MC, F, UNK, X, Y, XS, YS, R, C, S, CP, CC) \
H1_AddBaseDrawTextCmd(TXT, MC, F, game::R_GetFontHeight(F), X, Y, XS, YS, R, C, S, CP, CC, game::R_GetSomething(S)) H1_AddBaseDrawTextCmd(TXT, MC, F, game::R_GetFontHeight(F), X, Y, XS, YS, R, C, S, CP, CC, game::R_GetSomething(S))
WEAK symbol<int()> R_PopRemoteScreenUpdate{0x0, 0x6A6D60};
WEAK symbol<void(int)> R_PushRemoteScreenUpdate{0x0, 0x6A6E60};
WEAK symbol<char* (GfxImage* image, uint32_t width, uint32_t height, uint32_t depth, uint32_t mipCount, WEAK symbol<char* (GfxImage* image, uint32_t width, uint32_t height, uint32_t depth, uint32_t mipCount,
uint32_t imageFlags, DXGI_FORMAT imageFormat, const char* name, const D3D11_SUBRESOURCE_DATA* initData)> Image_Setup{0x560740, 0x683890}; uint32_t imageFlags, DXGI_FORMAT imageFormat, const char* name, const D3D11_SUBRESOURCE_DATA* initData)> Image_Setup{0x560740, 0x683890};
@ -157,6 +162,8 @@ namespace game
WEAK symbol<int(unsigned int classnum, int entnum, int offset)> Scr_SetObjectField{0x2E8FC0, 0x459CD0}; WEAK symbol<int(unsigned int classnum, int entnum, int offset)> Scr_SetObjectField{0x2E8FC0, 0x459CD0};
WEAK symbol<ScreenPlacement*()> ScrPlace_GetViewPlacement{0x1BCED0, 0x362840}; WEAK symbol<ScreenPlacement*()> ScrPlace_GetViewPlacement{0x1BCED0, 0x362840};
WEAK symbol<float()> ScrPlace_HiResGetScaleX{0x0, 0x362910};
WEAK symbol<float()> ScrPlace_HiResGetScaleY{0x0, 0x362930};
WEAK symbol<void(XAssetType type, void(__cdecl* func)(XAssetHeader, void*), const void* inData, bool includeOverride)> WEAK symbol<void(XAssetType type, void(__cdecl* func)(XAssetHeader, void*), const void* inData, bool includeOverride)>
DB_EnumXAssets_Internal{0x1F0BF0, 0x394C60}; DB_EnumXAssets_Internal{0x1F0BF0, 0x394C60};
@ -174,6 +181,8 @@ namespace game
WEAK symbol<void()> LUI_LeaveCriticalSection{0xF6C40, 0x26BDC0}; WEAK symbol<void()> LUI_LeaveCriticalSection{0xF6C40, 0x26BDC0};
WEAK symbol<bool(int clientNum, const char* menu)> Menu_IsMenuOpenAndVisible{0x4F43C0, 0x389F70}; WEAK symbol<bool(int clientNum, const char* menu)> Menu_IsMenuOpenAndVisible{0x4F43C0, 0x389F70};
WEAK symbol<void(int clientNum, const char* menu)> Menus_OpenByName{0x0, 0x1E1270};
WEAK symbol<void(int clientNum, const char* menu)> Menus_CloseByName{0x0, 0x1DA4C0};
WEAK symbol<scr_string_t(const char* str)> SL_FindString{0x3C0F50, 0x507FD0}; WEAK symbol<scr_string_t(const char* str)> SL_FindString{0x3C0F50, 0x507FD0};
WEAK symbol<scr_string_t(const char* str, unsigned int user)> SL_GetString{0x3C1210, 0x5083A0}; WEAK symbol<scr_string_t(const char* str, unsigned int user)> SL_GetString{0x3C1210, 0x5083A0};
@ -219,6 +228,7 @@ namespace game
WEAK symbol<const char*(const char*)> UI_GetGameTypeDisplayName{0x0, 0x4DD8C0}; WEAK symbol<const char*(const char*)> UI_GetGameTypeDisplayName{0x0, 0x4DD8C0};
WEAK symbol<void(unsigned int localClientNum, const char** args)> UI_RunMenuScript{0x3F3AA0, 0x1E35B0}; WEAK symbol<void(unsigned int localClientNum, const char** args)> UI_RunMenuScript{0x3F3AA0, 0x1E35B0};
WEAK symbol<int(const char* text, int maxChars, Font_s* font, float scale)> UI_TextWidth{0x3F5D90, 0x0}; WEAK symbol<int(const char* text, int maxChars, Font_s* font, float scale)> UI_TextWidth{0x3F5D90, 0x0};
WEAK symbol<void(void* dc, void* menuList, int close)> UI_AddMenuList{0x0, 0x1D9960};
WEAK symbol<const char*(const char* string)> UI_SafeTranslateString{0x3840A0, 0x4E8BC0}; WEAK symbol<const char*(const char* string)> UI_SafeTranslateString{0x3840A0, 0x4E8BC0};
@ -273,7 +283,7 @@ namespace game
WEAK symbol<int> svs_numclients{0x0, 0x2DC338C}; WEAK symbol<int> svs_numclients{0x0, 0x2DC338C};
WEAK symbol<int> gameTime{0x0, 0x7361F9C}; WEAK symbol<int> gameTime{0x0, 0x7361F9C};
WEAK symbol<int> sv_serverId_value{0x0, 0x0}; WEAK symbol<int> sv_serverId_value{0x0, 0xB7F9630};
WEAK symbol<bool> virtualLobby_loaded{0x0, 0x2E6EC9D}; WEAK symbol<bool> virtualLobby_loaded{0x0, 0x2E6EC9D};

View File

@ -95,7 +95,7 @@ FARPROC load_binary(const launcher::mode mode, uint64_t* base_address)
&& function != "SteamAPI_GetSteamInstallPath") // Arxan requires one valid steam api import - maybe SteamAPI_Shutdown is better? && function != "SteamAPI_GetSteamInstallPath") // Arxan requires one valid steam api import - maybe SteamAPI_Shutdown is better?
{ {
static bool check_for_steam_install = false; static bool check_for_steam_install = false;
if (!check_for_steam_install) if (!check_for_steam_install && !arxan::is_wine())
{ {
HKEY key; HKEY key;
if (RegOpenKeyExA(HKEY_CURRENT_USER, "Software\\Valve\\Steam", 0, KEY_ALL_ACCESS, &key) == ERROR_SUCCESS) if (RegOpenKeyExA(HKEY_CURRENT_USER, "Software\\Valve\\Steam", 0, KEY_ALL_ACCESS, &key) == ERROR_SUCCESS)
@ -104,7 +104,7 @@ FARPROC load_binary(const launcher::mode mode, uint64_t* base_address)
} }
else else
{ {
MSG_BOX_WARN("Could not find Steam in the registry. If Steam is not installed, you must install it for H1-Mod to work."); throw std::runtime_error("Could not find Steam in the registry. If Steam is not installed, you must install it for H1-Mod to work.");
} }
check_for_steam_install = true; check_for_steam_install = true;

View File

@ -58,6 +58,10 @@
#undef min #undef min
#endif #endif
#ifdef DEBUG
//#define DW_DEBUG
#endif
#define MSG_BOX_INFO(message) MessageBoxA(nullptr, message, "H1-Mod: INFORMATION", MB_ICONINFORMATION); #define MSG_BOX_INFO(message) MessageBoxA(nullptr, message, "H1-Mod: INFORMATION", MB_ICONINFORMATION);
#define MSG_BOX_WARN(message) MessageBoxA(nullptr, message, "H1-Mod: WARNING", MB_ICONWARNING); #define MSG_BOX_WARN(message) MessageBoxA(nullptr, message, "H1-Mod: WARNING", MB_ICONWARNING);
#define MSG_BOX_ERROR(message) MessageBoxA(nullptr, message, "H1-Mod: ERROR", MB_ICONERROR); #define MSG_BOX_ERROR(message) MessageBoxA(nullptr, message, "H1-Mod: ERROR", MB_ICONERROR);