diff --git a/src/server/component/command.cpp b/src/server/component/command.cpp new file mode 100644 index 0000000..6ca2134 --- /dev/null +++ b/src/server/component/command.cpp @@ -0,0 +1,274 @@ +#include +#include "loader/component_loader.hpp" + +#include "command.hpp" +#include "../server.hpp" + +#include "database/database.hpp" + +#include +#include + +namespace command +{ + namespace + { + std::unordered_map commands; + + std::mutex queue_mutex; + std::vector command_queue; + } + + params::params(const std::vector& tokens) + : tokens_(tokens) + { + } + + std::string params::get(const size_t index) const + { + if (this->tokens_.size() <= index) + { + return {}; + } + + return this->tokens_[index]; + } + + std::string params::operator[](const size_t index) const + { + return this->get(index); + } + + size_t params::size() const + { + return this->tokens_.size(); + } + + std::string params::join(const size_t index) const + { + std::string buffer; + + for (auto i = index; i < this->size(); i++) + { + buffer.append(this->tokens_[i]); + buffer.append(" "); + } + + return buffer; + } + + void execute_single(const std::string& cmd) + { + const auto args = utils::string::split(cmd, ' '); + if (args.size() == 0) + { + return; + } + + const auto name = utils::string::to_lower(args[0]); + const auto command = commands.find(name); + if (command == commands.end()) + { + console::warning("Command \"%s\" not found\n", name.data()); + return; + } + + try + { + command->second(args); + } + catch (const std::exception& e) + { + console::error("Error executing command: %s\n", e.what()); + } + } + + void run_frame() + { + std::vector queue_copy; + + { + std::lock_guard _0(queue_mutex); + queue_copy = command_queue; + command_queue.clear(); + } + + for (const auto& cmd : queue_copy) + { + execute_single(cmd); + } + } + + void execute(const std::string& cmd) + { + std::lock_guard _0(queue_mutex); + command_queue.emplace_back(cmd); + } + + void add(const std::string& name, const callback& cb) + { + console::log("Registering command \"%s\"\n", name.data()); + commands.insert(std::make_pair(name, cb)); + } + + class component final : public component_interface + { + public: + void post_start() override + { + add("quit", [](const params& params) + { + tpp::stop_server(); + }); + + add("query", [](const params& params) + { + const auto query = params.join(1); + const auto start = std::chrono::high_resolution_clock::now(); + database::access([&](const database::database_t& db) + { + const auto handle = db->get_handle(); + + console::print("> %s\n", query.data()); + + if (mysql_query(handle, query.data()) != 0) + { + console::error("ERROR %i: %s\n", mysql_errno(handle), mysql_error(handle)); + return; + } + + const auto end = std::chrono::high_resolution_clock::now(); + const auto secs = static_cast(std::chrono::duration_cast(end - start).count()) / 1000.f; + + const auto result = mysql_store_result(handle); + const auto _0 = gsl::finally([&] + { + mysql_free_result(result); + }); + + const auto affected_rows = mysql_affected_rows(handle); + + if (result != nullptr) + { + const auto num_rows = mysql_num_rows(result); + const auto num_fields = mysql_num_fields(result); + const auto fields = mysql_fetch_fields(result); + + std::vector max_field_lengths; + std::vector fields_str; + std::vector> rows; + + rows.resize(num_rows); + max_field_lengths.resize(num_fields); + fields_str.resize(num_fields); + + for (auto f = 0u; f < num_fields; f++) + { + const auto field = &fields[f]; + const std::string field_str = {field->name, field->name_length}; + fields_str[f] = field_str; + max_field_lengths[f] = std::max(max_field_lengths[f], field_str.size()); + } + + for (auto i = 0u; i < num_rows; i++) + { + const auto row = mysql_fetch_row(result); + const auto lengths = mysql_fetch_lengths(result); + rows[i].resize(num_fields); + + for (auto f = 0u; f < num_fields; f++) + { + const auto field = &fields[f]; + + const std::string field_str = {field->name, field->name_length}; + const std::string row_str = {row[f], lengths[f]}; + + rows[i][f] = row_str; + max_field_lengths[f] = std::max(max_field_lengths[f], row_str.size()); + } + } + + auto line_length = static_cast(num_fields) * 3 + 1; + for (const auto& max_length : max_field_lengths) + { + line_length += max_length; + } + + std::string separator; + separator.reserve(line_length); + + for (auto f = 0u; f < num_fields; f++) + { + separator.push_back('+'); + for (auto i = 0; i < max_field_lengths[f] + 2; i++) + { + separator.push_back('-'); + } + + if (f == num_fields - 1) + { + separator.push_back('-'); + } + } + + const auto print_separator = [&]() + { + console::print("%s\n", separator.data()); + }; + + const auto print_values = [&](const std::vector values) + { + std::string row_buffer; + row_buffer.reserve(line_length); + + for (auto f = 0u; f < num_fields; f++) + { + row_buffer.append("| "); + const auto& field_value = values[f]; + const auto diff = max_field_lengths[f] - field_value.size(); + + row_buffer.append(field_value); + + for (auto i = 0; i < diff; i++) + { + row_buffer.push_back(' '); + } + + row_buffer.push_back(' '); + + if (f == num_fields - 1) + { + row_buffer.push_back('|'); + } + } + + console::print("%s\n", row_buffer.data()); + }; + + if (result->row_count > 0) + { + print_separator(); + print_values(fields_str); + print_separator(); + + for (auto i = 0; i < result->row_count; i++) + { + print_values(rows[i]); + } + + print_separator(); + + console::print("%i rows in set (%.04f sec)", result->row_count, secs); + } + } + else if (affected_rows > 0) + { + console::print("Query OK, %i row affected (%.04f sec)", affected_rows, secs); + } + }); + }); + } + }; +} + +REGISTER_COMPONENT(command::component) diff --git a/src/server/component/command.hpp b/src/server/component/command.hpp new file mode 100644 index 0000000..7c539d3 --- /dev/null +++ b/src/server/component/command.hpp @@ -0,0 +1,28 @@ +#pragma once + +namespace command +{ + class params + { + public: + params(const std::vector& tokens); + + std::string get(const size_t index) const; + std::string operator[](const size_t index) const; + + size_t size() const; + + std::string join(const size_t index) const; + + private: + std::vector tokens_; + + }; + + using callback = std::function; + + void run_frame(); + + void execute(const std::string& cmd); + void add(const std::string& name, const callback& cb); +} diff --git a/src/server/component/console.cpp b/src/server/component/console.cpp new file mode 100644 index 0000000..f01f1d1 --- /dev/null +++ b/src/server/component/console.cpp @@ -0,0 +1,419 @@ +#include +#include "loader/component_loader.hpp" + +#include "console.hpp" +#include "command.hpp" + +#include + +#define OUTPUT_HANDLE GetStdHandle(STD_OUTPUT_HANDLE) + +namespace console +{ + namespace + { + constexpr auto max_console_history = 100; + + struct + { + std::atomic_bool kill; + std::thread thread; + HANDLE kill_event; + char buffer[512]{}; + int cursor; + std::deque history; + std::int32_t history_index = -1; + } con{}; + + void set_cursor_pos(int x) + { + CONSOLE_SCREEN_BUFFER_INFO info{}; + GetConsoleScreenBufferInfo(OUTPUT_HANDLE, &info); + info.dwCursorPosition.X = static_cast(x); + SetConsoleCursorPosition(OUTPUT_HANDLE, info.dwCursorPosition); + } + + void show_cursor(const bool show) + { + CONSOLE_CURSOR_INFO info{}; + GetConsoleCursorInfo(OUTPUT_HANDLE, &info); + info.bVisible = show; + SetConsoleCursorInfo(OUTPUT_HANDLE, &info); + } + + std::string format(va_list* ap, const char* message) + { + static thread_local char buffer[0x1000]; + + const auto count = _vsnprintf_s(buffer, sizeof(buffer), sizeof(buffer), message, *ap); + if (count < 0) + { + return {}; + } + + return {buffer, static_cast(count)}; + } + + uint8_t get_attribute(const int type) + { + switch (type) + { + case con_type_info: + return 7; // white + case con_type_warning: + return 6; // yellow + case con_type_error: + return 4; // red + case con_type_debug: + return 3; // cyan + } + + return 7; + } + + auto& get_print_mutex() + { + static std::recursive_mutex print_mutex; + return print_mutex; + } + + void update() + { + std::lock_guard _0(get_print_mutex()); + + show_cursor(false); + set_cursor_pos(0); + printf("%s", con.buffer); + set_cursor_pos(con.cursor); + show_cursor(true); + } + + void clear_output() + { + std::lock_guard _0(get_print_mutex()); + + show_cursor(false); + set_cursor_pos(0); + + for (auto i = 0; i < std::strlen(con.buffer); i++) + { + printf(" "); + } + + set_cursor_pos(con.cursor); + show_cursor(true); + } + + int dispatch_message(const int type, const std::string& message) + { + std::lock_guard _0(get_print_mutex()); + + clear_output(); + set_cursor_pos(0); + + SetConsoleTextAttribute(OUTPUT_HANDLE, get_attribute(type)); + const auto res = printf("%s", message.data()); + SetConsoleTextAttribute(OUTPUT_HANDLE, get_attribute(con_type_info)); + + if (message.size() <= 0 || message[message.size() - 1] != '\n') + { + printf("\n"); + } + + update(); + return res; + } + + void clear() + { + std::lock_guard _0(get_print_mutex()); + + clear_output(); + strncpy_s(con.buffer, "", sizeof(con.buffer)); + + con.cursor = 0; + set_cursor_pos(0); + } + + size_t get_max_input_length() + { + CONSOLE_SCREEN_BUFFER_INFO info{}; + GetConsoleScreenBufferInfo(OUTPUT_HANDLE, &info); + const auto columns = static_cast(info.srWindow.Right - info.srWindow.Left - 1); + return std::max(size_t(0), std::min(columns, sizeof(con.buffer))); + } + + void handle_resize() + { + clear(); + update(); + } + + void handle_input(const INPUT_RECORD record) + { + if (record.EventType == WINDOW_BUFFER_SIZE_EVENT) + { + handle_resize(); + return; + } + + if (record.EventType != KEY_EVENT || !record.Event.KeyEvent.bKeyDown) + { + return; + } + + std::lock_guard _0(get_print_mutex()); + + const auto key = record.Event.KeyEvent.wVirtualKeyCode; + switch (key) + { + case VK_UP: + { + if (++con.history_index >= con.history.size()) + { + con.history_index = static_cast(con.history.size()) - 1; + } + + clear(); + + if (con.history_index != -1) + { + strncpy_s(con.buffer, con.history.at(con.history_index).data(), sizeof(con.buffer)); + con.cursor = static_cast(strlen(con.buffer)); + } + + update(); + break; + } + case VK_DOWN: + { + if (--con.history_index < -1) + { + con.history_index = -1; + } + + clear(); + + if (con.history_index != -1) + { + strncpy_s(con.buffer, con.history.at(con.history_index).data(), sizeof(con.buffer)); + con.cursor = static_cast(strlen(con.buffer)); + } + + update(); + break; + } + case VK_LEFT: + { + if (con.cursor > 0) + { + con.cursor--; + set_cursor_pos(con.cursor); + } + + break; + } + case VK_RIGHT: + { + if (con.cursor < std::strlen(con.buffer)) + { + con.cursor++; + set_cursor_pos(con.cursor); + } + + break; + } + case VK_RETURN: + { + if (con.history_index != -1) + { + const auto itr = con.history.begin() + con.history_index; + + if (*itr == con.buffer) + { + con.history.erase(con.history.begin() + con.history_index); + } + } + + if (con.buffer[0]) + { + con.history.push_front(con.buffer); + } + + if (con.history.size() > max_console_history) + { + con.history.erase(con.history.begin() + max_console_history); + } + + con.history_index = -1; + + command::execute(con.buffer); + + con.cursor = 0; + + clear_output(); + strncpy_s(con.buffer, "", sizeof(con.buffer)); + break; + } + case VK_BACK: + { + if (con.cursor <= 0) + { + break; + } + + clear_output(); + + std::memmove(con.buffer + con.cursor - 1, con.buffer + con.cursor, + strlen(con.buffer) + 1 - con.cursor); + con.cursor--; + + update(); + break; + } + case VK_ESCAPE: + { + con.cursor = 0; + clear_output(); + strncpy_s(con.buffer, "", sizeof(con.buffer)); + break; + } + default: + { + const auto c = record.Event.KeyEvent.uChar.AsciiChar; + if (!c) + { + break; + } + + if (std::strlen(con.buffer) + 1 >= get_max_input_length()) + { + break; + } + + std::memmove(con.buffer + con.cursor + 1, + con.buffer + con.cursor, std::strlen(con.buffer) + 1 - con.cursor); + con.buffer[con.cursor] = c; + con.cursor++; + + update(); + break; + } + } + } + + BOOL WINAPI console_ctrl_handler(DWORD ctrl_type) + { + if (ctrl_type == CTRL_CLOSE_EVENT) + { + command::execute("quit"); + while (!con.kill) + { + std::this_thread::sleep_for(10ms); + } + + return TRUE; + } + + return FALSE; + } + + std::string get_prefix(const int type) + { + switch (type) + { + case con_type_info: + return "[*] "; + case con_type_warning: + return "[!] "; + case con_type_error: + return "[-] "; + case con_type_debug: + return "[+] "; + } + + return {}; + } + } + + void dispatch_print(const int type, const char* fmt, ...) + { + va_list ap; + va_start(ap, fmt); + const auto result = format(&ap, fmt); + va_end(ap); + + const auto text = std::format("{}{}", get_prefix(type), result); + dispatch_message(type, text); + } + + class component final : public component_interface + { + public: + void pre_start() override + { + SetConsoleTitle("website"); + + SetConsoleCtrlHandler(console_ctrl_handler, TRUE); + + con.kill_event = CreateEvent(NULL, TRUE, FALSE, NULL); + + con.thread = utils::thread::create_named_thread("Console", []() + { + const auto handle = GetStdHandle(STD_INPUT_HANDLE); + HANDLE handles[2] = {handle, con.kill_event}; + MSG msg{}; + + INPUT_RECORD record{}; + DWORD num_events{}; + + while (!con.kill) + { + const auto result = MsgWaitForMultipleObjects(2, handles, FALSE, INFINITE, QS_ALLINPUT); + if (con.kill) + { + return; + } + + switch (result) + { + case WAIT_OBJECT_0: + { + if (!ReadConsoleInput(handle, &record, 1, &num_events) || num_events == 0) + { + break; + } + + handle_input(record); + break; + } + case WAIT_OBJECT_0 + 1: + { + if (!PeekMessageA(&msg, GetConsoleWindow(), NULL, NULL, PM_REMOVE)) + { + break; + } + + TranslateMessage(&msg); + DispatchMessage(&msg); + break; + } + } + } + }); + } + + void pre_destroy() override + { + con.kill = true; + SetEvent(con.kill_event); + + if (con.thread.joinable()) + { + con.thread.join(); + } + } + }; +} + +REGISTER_COMPONENT(console::component) diff --git a/src/server/component/console.hpp b/src/server/component/console.hpp new file mode 100644 index 0000000..ed67034 --- /dev/null +++ b/src/server/component/console.hpp @@ -0,0 +1,47 @@ +#pragma once + +namespace console +{ + enum console_type + { + con_type_print = 0, + con_type_error = 1, + con_type_debug = 2, + con_type_warning = 3, + con_type_info = 4 + }; + + void dispatch_print(const int type, const char* fmt, ...); + + template + void print(const char* fmt, Args&&... args) + { + dispatch_print(con_type_print, fmt, std::forward(args)...); + } + + template + void log(const char* fmt, Args&&... args) + { + dispatch_print(con_type_info, fmt, std::forward(args)...); + } + + template + void warning(const char* fmt, Args&&... args) + { + dispatch_print(con_type_warning, fmt, std::forward(args)...); + } + + template + void error(const char* fmt, Args&&... args) + { + dispatch_print(con_type_error, fmt, std::forward(args)...); + } + + template + void debug([[maybe_unused]] const char* fmt, [[maybe_unused]] Args&&... args) + { +#ifdef DEBUG + dispatch_print(con_type_debug, fmt, std::forward(args)...); +#endif + } +} diff --git a/src/server/loader/component_interface.hpp b/src/server/loader/component_interface.hpp new file mode 100644 index 0000000..5e6daae --- /dev/null +++ b/src/server/loader/component_interface.hpp @@ -0,0 +1,26 @@ +#pragma once + +class component_interface +{ +public: + virtual ~component_interface() + { + + } + + virtual void pre_start() + { + + } + + + virtual void post_start() + { + + } + + virtual void pre_destroy() + { + + } +}; diff --git a/src/server/loader/component_loader.cpp b/src/server/loader/component_loader.cpp new file mode 100644 index 0000000..6f2f6ef --- /dev/null +++ b/src/server/loader/component_loader.cpp @@ -0,0 +1,83 @@ +#include +#include "component_loader.hpp" + +void component_loader::pre_start() +{ + static auto handled = false; + if (handled) + { + return; + } + + handled = true; + + for (const auto& component : get_components()) + { + try + { + component.second->pre_start(); + } + catch (const std::exception& e) + { + console::error("pre_start() failed on \"%s\": %s", component.first.data(), e.what()); + } + } +} + +void component_loader::post_start() +{ + static auto handled = false; + if (handled) + { + return; + } + + handled = true; + + for (const auto& component : get_components()) + { + try + { + component.second->post_start(); + } + catch (const std::exception& e) + { + console::error("post_start() failed on \"%s\": %s", component.first.data(), e.what()); + } + } +} + +void component_loader::pre_destroy() +{ + static auto handled = false; + if (handled) + { + return; + } + + handled = true; + + for (const auto& component : get_components()) + { + try + { + component.second->pre_destroy(); + } + catch (const std::exception& e) + { + console::error("pre_destroy() failed on \"%s\": %s", component.first.data(), e.what()); + } + } +} + +component_map& component_loader::get_components() +{ + using component_map_container = std::unique_ptr>; + static component_map_container components(new component_map, [](component_map* component_vector) + { + pre_destroy(); + delete component_vector; + }); + + return *components; +} diff --git a/src/server/loader/component_loader.hpp b/src/server/loader/component_loader.hpp new file mode 100644 index 0000000..ac3a991 --- /dev/null +++ b/src/server/loader/component_loader.hpp @@ -0,0 +1,57 @@ +#pragma once +#include "component_interface.hpp" + +#include "component/console.hpp" + +using component_map = std::unordered_map>; + +class component_loader final +{ +public: + template + class installer final + { + static_assert(std::is_base_of::value, "component has invalid base class"); + + public: + installer(const std::string& name) + { + register_component(name); + } + }; + + template + static T* get() + { + for (const auto& component_ : get_components()) + { + if (typeid(*component_.get()) == typeid(T)) + { + return reinterpret_cast(component_.get()); + } + } + + return nullptr; + } + + template + static void register_component(const std::string& name) + { + console::debug("Registering component \"%s\"\n", name.data()); + get_components().insert(std::make_pair(name, std::make_unique())); + } + + static void pre_start(); + static void post_start(); + static void pre_destroy(); + +private: + static component_map& get_components(); + +}; + +#define REGISTER_COMPONENT(name) \ +namespace \ +{ \ + static component_loader::installer __component(#name); \ +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_add_follow.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_add_follow.cpp new file mode 100644 index 0000000..7ff2c95 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_add_follow.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_add_follow.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_add_follow::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_add_follow.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_add_follow.hpp new file mode 100644 index 0000000..ee49ad4 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_add_follow.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_add_follow : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_approve_steam_shop.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_approve_steam_shop.cpp new file mode 100644 index 0000000..b283af6 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_approve_steam_shop.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_approve_steam_shop.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_approve_steam_shop::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_approve_steam_shop.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_approve_steam_shop.hpp new file mode 100644 index 0000000..b7a2ee2 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_approve_steam_shop.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_approve_steam_shop : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_cancel_combat_deploy.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_cancel_combat_deploy.cpp new file mode 100644 index 0000000..dd74a2a --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_cancel_combat_deploy.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_cancel_combat_deploy.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_cancel_combat_deploy::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_cancel_combat_deploy.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_cancel_combat_deploy.hpp new file mode 100644 index 0000000..f5b676a --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_cancel_combat_deploy.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_cancel_combat_deploy : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_cancel_combat_deploy_single.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_cancel_combat_deploy_single.cpp new file mode 100644 index 0000000..b2f8e7f --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_cancel_combat_deploy_single.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_cancel_combat_deploy_single.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_cancel_combat_deploy_single::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_cancel_combat_deploy_single.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_cancel_combat_deploy_single.hpp new file mode 100644 index 0000000..034ac80 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_cancel_combat_deploy_single.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_cancel_combat_deploy_single : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_cancel_short_pfleague.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_cancel_short_pfleague.cpp new file mode 100644 index 0000000..ca86b51 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_cancel_short_pfleague.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_cancel_short_pfleague.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_cancel_short_pfleague::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_cancel_short_pfleague.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_cancel_short_pfleague.hpp new file mode 100644 index 0000000..65fad53 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_cancel_short_pfleague.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_cancel_short_pfleague : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_check_consume_transaction.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_check_consume_transaction.cpp new file mode 100644 index 0000000..d4252ca --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_check_consume_transaction.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_check_consume_transaction.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_check_consume_transaction::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_check_consume_transaction.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_check_consume_transaction.hpp new file mode 100644 index 0000000..812add0 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_check_consume_transaction.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_check_consume_transaction : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_check_short_pfleague_enterable.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_check_short_pfleague_enterable.cpp new file mode 100644 index 0000000..cc0952e --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_check_short_pfleague_enterable.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_check_short_pfleague_enterable.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_check_short_pfleague_enterable::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_check_short_pfleague_enterable.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_check_short_pfleague_enterable.hpp new file mode 100644 index 0000000..f711858 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_check_short_pfleague_enterable.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_check_short_pfleague_enterable : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_commit_consume_transaction.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_commit_consume_transaction.cpp new file mode 100644 index 0000000..0433c86 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_commit_consume_transaction.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_commit_consume_transaction.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_commit_consume_transaction::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_commit_consume_transaction.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_commit_consume_transaction.hpp new file mode 100644 index 0000000..f585b20 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_commit_consume_transaction.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_commit_consume_transaction : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_create_nuclear.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_create_nuclear.cpp new file mode 100644 index 0000000..3ca8d6b --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_create_nuclear.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_create_nuclear.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_create_nuclear::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_create_nuclear.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_create_nuclear.hpp new file mode 100644 index 0000000..11a5b65 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_create_nuclear.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_create_nuclear : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_delete_follow.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_delete_follow.cpp new file mode 100644 index 0000000..beb30b1 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_delete_follow.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_delete_follow.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_delete_follow::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_delete_follow.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_delete_follow.hpp new file mode 100644 index 0000000..0071f37 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_delete_follow.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_delete_follow : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_delete_troops_list.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_delete_troops_list.cpp new file mode 100644 index 0000000..63297b0 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_delete_troops_list.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_delete_troops_list.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_delete_troops_list::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_delete_troops_list.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_delete_troops_list.hpp new file mode 100644 index 0000000..5270efb --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_delete_troops_list.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_delete_troops_list : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_deploy_mission.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_deploy_mission.cpp new file mode 100644 index 0000000..4c30e43 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_deploy_mission.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_deploy_mission.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_deploy_mission::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_deploy_mission.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_deploy_mission.hpp new file mode 100644 index 0000000..c202875 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_deploy_mission.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_deploy_mission : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_destruct_nuclear.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_destruct_nuclear.cpp new file mode 100644 index 0000000..b8d429c --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_destruct_nuclear.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_destruct_nuclear.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_destruct_nuclear::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_destruct_nuclear.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_destruct_nuclear.hpp new file mode 100644 index 0000000..6bc5119 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_destruct_nuclear.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_destruct_nuclear : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_destruct_online_nuclear.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_destruct_online_nuclear.cpp new file mode 100644 index 0000000..868790c --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_destruct_online_nuclear.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_destruct_online_nuclear.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_destruct_online_nuclear::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_destruct_online_nuclear.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_destruct_online_nuclear.hpp new file mode 100644 index 0000000..308a076 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_destruct_online_nuclear.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_destruct_online_nuclear : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_develop_wepon.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_develop_wepon.cpp new file mode 100644 index 0000000..510c313 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_develop_wepon.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_develop_wepon.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_develop_wepon::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_develop_wepon.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_develop_wepon.hpp new file mode 100644 index 0000000..83e5121 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_develop_wepon.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_develop_wepon : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_elapse_combat_deploy.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_elapse_combat_deploy.cpp new file mode 100644 index 0000000..6c04537 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_elapse_combat_deploy.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_elapse_combat_deploy.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_elapse_combat_deploy::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_elapse_combat_deploy.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_elapse_combat_deploy.hpp new file mode 100644 index 0000000..bcfc3f4 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_elapse_combat_deploy.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_elapse_combat_deploy : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_enter_short_pfleague.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_enter_short_pfleague.cpp new file mode 100644 index 0000000..b33f048 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_enter_short_pfleague.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_enter_short_pfleague.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_enter_short_pfleague::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_enter_short_pfleague.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_enter_short_pfleague.hpp new file mode 100644 index 0000000..2f5edf1 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_enter_short_pfleague.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_enter_short_pfleague : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_exchange_fob_event_point.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_exchange_fob_event_point.cpp new file mode 100644 index 0000000..8e87d8d --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_exchange_fob_event_point.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_exchange_fob_event_point.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_exchange_fob_event_point::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_exchange_fob_event_point.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_exchange_fob_event_point.hpp new file mode 100644 index 0000000..113558a --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_exchange_fob_event_point.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_exchange_fob_event_point : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_exchange_league_point.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_exchange_league_point.cpp new file mode 100644 index 0000000..79ae20d --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_exchange_league_point.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_exchange_league_point.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_exchange_league_point::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_exchange_league_point.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_exchange_league_point.hpp new file mode 100644 index 0000000..4fed1ae --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_exchange_league_point.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_exchange_league_point : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_exchange_league_point2.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_exchange_league_point2.cpp new file mode 100644 index 0000000..bb07496 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_exchange_league_point2.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_exchange_league_point2.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_exchange_league_point2::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_exchange_league_point2.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_exchange_league_point2.hpp new file mode 100644 index 0000000..3e3b706 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_exchange_league_point2.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_exchange_league_point2 : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_extend_platform.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_extend_platform.cpp new file mode 100644 index 0000000..331b2bd --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_extend_platform.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_extend_platform.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_extend_platform::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_extend_platform.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_extend_platform.hpp new file mode 100644 index 0000000..87f9639 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_extend_platform.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_extend_platform : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_campaign_dialog_list.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_campaign_dialog_list.cpp new file mode 100644 index 0000000..ffe4743 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_campaign_dialog_list.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_get_campaign_dialog_list.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_get_campaign_dialog_list::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_campaign_dialog_list.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_campaign_dialog_list.hpp new file mode 100644 index 0000000..608ad32 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_campaign_dialog_list.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_get_campaign_dialog_list : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_combat_deploy_list.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_combat_deploy_list.cpp new file mode 100644 index 0000000..fddb777 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_combat_deploy_list.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_get_combat_deploy_list.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_get_combat_deploy_list::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_combat_deploy_list.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_combat_deploy_list.hpp new file mode 100644 index 0000000..64e8aed --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_combat_deploy_list.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_get_combat_deploy_list : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_contribute_player_list.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_contribute_player_list.cpp new file mode 100644 index 0000000..9c52aa1 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_contribute_player_list.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_get_contribute_player_list.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_get_contribute_player_list::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_contribute_player_list.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_contribute_player_list.hpp new file mode 100644 index 0000000..e5a9d4c --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_contribute_player_list.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_get_contribute_player_list : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_development_progress.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_development_progress.cpp new file mode 100644 index 0000000..34f1cb4 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_development_progress.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_get_development_progress.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_get_development_progress::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_development_progress.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_development_progress.hpp new file mode 100644 index 0000000..4996173 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_development_progress.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_get_development_progress : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_entitlement_id_list.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_entitlement_id_list.cpp new file mode 100644 index 0000000..ddc99f4 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_entitlement_id_list.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_get_entitlement_id_list.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_get_entitlement_id_list::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_entitlement_id_list.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_entitlement_id_list.hpp new file mode 100644 index 0000000..852978f --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_entitlement_id_list.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_get_entitlement_id_list : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_fob_event_point_exchange_params.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_fob_event_point_exchange_params.cpp new file mode 100644 index 0000000..5b53b09 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_fob_event_point_exchange_params.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_get_fob_event_point_exchange_params.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_get_fob_event_point_exchange_params::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_fob_event_point_exchange_params.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_fob_event_point_exchange_params.hpp new file mode 100644 index 0000000..ca93b3b --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_fob_event_point_exchange_params.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_get_fob_event_point_exchange_params : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_next_maintenance.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_next_maintenance.cpp new file mode 100644 index 0000000..4aa72af --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_next_maintenance.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_get_next_maintenance.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_get_next_maintenance::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_next_maintenance.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_next_maintenance.hpp new file mode 100644 index 0000000..24981aa --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_next_maintenance.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_get_next_maintenance : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_online_development_progress.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_online_development_progress.cpp new file mode 100644 index 0000000..e2cdf92 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_online_development_progress.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_get_online_development_progress.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_get_online_development_progress::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_online_development_progress.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_online_development_progress.hpp new file mode 100644 index 0000000..ef20943 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_online_development_progress.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_get_online_development_progress : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_pay_item_list.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_pay_item_list.cpp new file mode 100644 index 0000000..1bc5285 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_pay_item_list.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_get_pay_item_list.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_get_pay_item_list::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_pay_item_list.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_pay_item_list.hpp new file mode 100644 index 0000000..0811059 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_pay_item_list.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_get_pay_item_list : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_pf_detail_params.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_pf_detail_params.cpp new file mode 100644 index 0000000..3783b97 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_pf_detail_params.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_get_pf_detail_params.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_get_pf_detail_params::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_pf_detail_params.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_pf_detail_params.hpp new file mode 100644 index 0000000..33ca6ad --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_pf_detail_params.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_get_pf_detail_params : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_pf_point_exchange_params.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_pf_point_exchange_params.cpp new file mode 100644 index 0000000..2f94ae7 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_pf_point_exchange_params.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_get_pf_point_exchange_params.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_get_pf_point_exchange_params::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_pf_point_exchange_params.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_pf_point_exchange_params.hpp new file mode 100644 index 0000000..1521e3d --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_pf_point_exchange_params.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_get_pf_point_exchange_params : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_platform_construction_progress.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_platform_construction_progress.cpp new file mode 100644 index 0000000..23c0049 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_platform_construction_progress.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_get_platform_construction_progress.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_get_platform_construction_progress::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_platform_construction_progress.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_platform_construction_progress.hpp new file mode 100644 index 0000000..0d7287e --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_platform_construction_progress.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_get_platform_construction_progress : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_previous_short_pfleague_result.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_previous_short_pfleague_result.cpp new file mode 100644 index 0000000..5780e69 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_previous_short_pfleague_result.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_get_previous_short_pfleague_result.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_get_previous_short_pfleague_result::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_previous_short_pfleague_result.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_previous_short_pfleague_result.hpp new file mode 100644 index 0000000..9c75467 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_previous_short_pfleague_result.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_get_previous_short_pfleague_result : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_purchase_history.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_purchase_history.cpp new file mode 100644 index 0000000..f409ee2 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_purchase_history.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_get_purchase_history.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_get_purchase_history::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_purchase_history.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_purchase_history.hpp new file mode 100644 index 0000000..7c33511 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_purchase_history.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_get_purchase_history : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_purchase_history_num.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_purchase_history_num.cpp new file mode 100644 index 0000000..a3b98a2 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_purchase_history_num.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_get_purchase_history_num.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_get_purchase_history_num::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_purchase_history_num.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_purchase_history_num.hpp new file mode 100644 index 0000000..eae0d46 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_purchase_history_num.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_get_purchase_history_num : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_ranking.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_ranking.cpp new file mode 100644 index 0000000..b4daa8b --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_ranking.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_get_ranking.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_get_ranking::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_ranking.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_ranking.hpp new file mode 100644 index 0000000..70bada6 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_ranking.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_get_ranking : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_rental_loadout_list.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_rental_loadout_list.cpp new file mode 100644 index 0000000..be4e998 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_rental_loadout_list.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_get_rental_loadout_list.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_get_rental_loadout_list::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_rental_loadout_list.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_rental_loadout_list.hpp new file mode 100644 index 0000000..96ddede --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_rental_loadout_list.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_get_rental_loadout_list : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_security_product_list.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_security_product_list.cpp new file mode 100644 index 0000000..c47bb5c --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_security_product_list.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_get_security_product_list.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_get_security_product_list::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_security_product_list.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_security_product_list.hpp new file mode 100644 index 0000000..070284b --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_security_product_list.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_get_security_product_list : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_shop_item_name_list.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_shop_item_name_list.cpp new file mode 100644 index 0000000..41d3de6 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_shop_item_name_list.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_get_shop_item_name_list.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_get_shop_item_name_list::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_shop_item_name_list.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_shop_item_name_list.hpp new file mode 100644 index 0000000..5dd3956 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_shop_item_name_list.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_get_shop_item_name_list : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_short_pfleague_result.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_short_pfleague_result.cpp new file mode 100644 index 0000000..162dd9b --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_short_pfleague_result.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_get_short_pfleague_result.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_get_short_pfleague_result::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_short_pfleague_result.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_short_pfleague_result.hpp new file mode 100644 index 0000000..0aef356 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_short_pfleague_result.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_get_short_pfleague_result : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_sneak_target_list.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_sneak_target_list.cpp new file mode 100644 index 0000000..3d4b33b --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_sneak_target_list.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_get_sneak_target_list.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_get_sneak_target_list::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_sneak_target_list.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_sneak_target_list.hpp new file mode 100644 index 0000000..00eedf2 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_sneak_target_list.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_get_sneak_target_list : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_steam_shop_item_list.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_steam_shop_item_list.cpp new file mode 100644 index 0000000..bca6f0d --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_steam_shop_item_list.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_get_steam_shop_item_list.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_get_steam_shop_item_list::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_steam_shop_item_list.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_steam_shop_item_list.hpp new file mode 100644 index 0000000..4d9900a --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_steam_shop_item_list.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_get_steam_shop_item_list : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_troops_list.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_troops_list.cpp new file mode 100644 index 0000000..1241f5a --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_troops_list.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_get_troops_list.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_get_troops_list::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_troops_list.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_troops_list.hpp new file mode 100644 index 0000000..bf1fab8 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_troops_list.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_get_troops_list : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_wormhole_list.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_wormhole_list.cpp new file mode 100644 index 0000000..1116b83 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_wormhole_list.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_get_wormhole_list.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_get_wormhole_list::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_wormhole_list.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_wormhole_list.hpp new file mode 100644 index 0000000..1ed661d --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_get_wormhole_list.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_get_wormhole_list : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_notice_sneak_mother_base.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_notice_sneak_mother_base.cpp new file mode 100644 index 0000000..7919e6b --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_notice_sneak_mother_base.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_notice_sneak_mother_base.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_notice_sneak_mother_base::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_notice_sneak_mother_base.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_notice_sneak_mother_base.hpp new file mode 100644 index 0000000..f29c411 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_notice_sneak_mother_base.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_notice_sneak_mother_base : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_open_steam_shop.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_open_steam_shop.cpp new file mode 100644 index 0000000..56d78e6 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_open_steam_shop.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_open_steam_shop.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_open_steam_shop::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_open_steam_shop.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_open_steam_shop.hpp new file mode 100644 index 0000000..53d0bfc --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_open_steam_shop.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_open_steam_shop : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_purchase_nuclear_completion.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_purchase_nuclear_completion.cpp new file mode 100644 index 0000000..81dff84 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_purchase_nuclear_completion.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_purchase_nuclear_completion.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_purchase_nuclear_completion::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_purchase_nuclear_completion.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_purchase_nuclear_completion.hpp new file mode 100644 index 0000000..8a4a41b --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_purchase_nuclear_completion.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_purchase_nuclear_completion : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_purchase_online_deployment_completion.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_purchase_online_deployment_completion.cpp new file mode 100644 index 0000000..373626a --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_purchase_online_deployment_completion.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_purchase_online_deployment_completion.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_purchase_online_deployment_completion::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_purchase_online_deployment_completion.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_purchase_online_deployment_completion.hpp new file mode 100644 index 0000000..2b197e7 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_purchase_online_deployment_completion.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_purchase_online_deployment_completion : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_purchase_online_development_completion.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_purchase_online_development_completion.cpp new file mode 100644 index 0000000..515a238 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_purchase_online_development_completion.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_purchase_online_development_completion.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_purchase_online_development_completion::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_purchase_online_development_completion.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_purchase_online_development_completion.hpp new file mode 100644 index 0000000..c290541 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_purchase_online_development_completion.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_purchase_online_development_completion : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_purchase_resources_processing.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_purchase_resources_processing.cpp new file mode 100644 index 0000000..e4dab5d --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_purchase_resources_processing.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_purchase_resources_processing.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_purchase_resources_processing::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_purchase_resources_processing.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_purchase_resources_processing.hpp new file mode 100644 index 0000000..98da4d8 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_purchase_resources_processing.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_purchase_resources_processing : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_purchase_security_service.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_purchase_security_service.cpp new file mode 100644 index 0000000..9623978 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_purchase_security_service.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_purchase_security_service.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_purchase_security_service::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_purchase_security_service.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_purchase_security_service.hpp new file mode 100644 index 0000000..57c4fda --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_purchase_security_service.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_purchase_security_service : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_purchase_send_troops_completion.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_purchase_send_troops_completion.cpp new file mode 100644 index 0000000..6be8301 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_purchase_send_troops_completion.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_purchase_send_troops_completion.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_purchase_send_troops_completion::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_purchase_send_troops_completion.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_purchase_send_troops_completion.hpp new file mode 100644 index 0000000..73fd439 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_purchase_send_troops_completion.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_purchase_send_troops_completion : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_purchase_wepon_development_completion.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_purchase_wepon_development_completion.cpp new file mode 100644 index 0000000..6cfa61a --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_purchase_wepon_development_completion.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_purchase_wepon_development_completion.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_purchase_wepon_development_completion::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_purchase_wepon_development_completion.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_purchase_wepon_development_completion.hpp new file mode 100644 index 0000000..d02e1ac --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_purchase_wepon_development_completion.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_purchase_wepon_development_completion : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_relocate_fob.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_relocate_fob.cpp new file mode 100644 index 0000000..65cbbdc --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_relocate_fob.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_relocate_fob.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_relocate_fob::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_relocate_fob.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_relocate_fob.hpp new file mode 100644 index 0000000..56e7e32 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_relocate_fob.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_relocate_fob : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_rental_loadout.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_rental_loadout.cpp new file mode 100644 index 0000000..bad3db6 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_rental_loadout.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_rental_loadout.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_rental_loadout::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_rental_loadout.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_rental_loadout.hpp new file mode 100644 index 0000000..06375c5 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_rental_loadout.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_rental_loadout : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_reqauth_sessionsvr.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_reqauth_sessionsvr.cpp new file mode 100644 index 0000000..fb6715a --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_reqauth_sessionsvr.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_reqauth_sessionsvr.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_reqauth_sessionsvr::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_reqauth_sessionsvr.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_reqauth_sessionsvr.hpp new file mode 100644 index 0000000..cb6a0a1 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_reqauth_sessionsvr.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_reqauth_sessionsvr : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_request_relief.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_request_relief.cpp new file mode 100644 index 0000000..a83013f --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_request_relief.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_request_relief.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_request_relief::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_request_relief.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_request_relief.hpp new file mode 100644 index 0000000..431f909 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_request_relief.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_request_relief : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_reset_mother_base.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_reset_mother_base.cpp new file mode 100644 index 0000000..095308e --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_reset_mother_base.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_reset_mother_base.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_reset_mother_base::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_reset_mother_base.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_reset_mother_base.hpp new file mode 100644 index 0000000..45706ae --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_reset_mother_base.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_reset_mother_base : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_send_deploy_injure.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_send_deploy_injure.cpp new file mode 100644 index 0000000..b40f6ce --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_send_deploy_injure.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_send_deploy_injure.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_send_deploy_injure::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_send_deploy_injure.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_send_deploy_injure.hpp new file mode 100644 index 0000000..5565749 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_send_deploy_injure.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_send_deploy_injure : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_send_heartbeat.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_send_heartbeat.cpp new file mode 100644 index 0000000..1f62905 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_send_heartbeat.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_send_heartbeat.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_send_heartbeat::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_send_heartbeat.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_send_heartbeat.hpp new file mode 100644 index 0000000..a8a37b2 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_send_heartbeat.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_send_heartbeat : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_send_mission_result.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_send_mission_result.cpp new file mode 100644 index 0000000..2f0e17f --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_send_mission_result.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_send_mission_result.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_send_mission_result::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_send_mission_result.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_send_mission_result.hpp new file mode 100644 index 0000000..a28b870 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_send_mission_result.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_send_mission_result : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_send_nuclear.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_send_nuclear.cpp new file mode 100644 index 0000000..ed56b55 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_send_nuclear.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_send_nuclear.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_send_nuclear::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_send_nuclear.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_send_nuclear.hpp new file mode 100644 index 0000000..c0bb784 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_send_nuclear.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_send_nuclear : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_send_online_challenge_task_status.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_send_online_challenge_task_status.cpp new file mode 100644 index 0000000..dedd658 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_send_online_challenge_task_status.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_send_online_challenge_task_status.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_send_online_challenge_task_status::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_send_online_challenge_task_status.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_send_online_challenge_task_status.hpp new file mode 100644 index 0000000..320133a --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_send_online_challenge_task_status.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_send_online_challenge_task_status : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_send_suspicion_play_data.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_send_suspicion_play_data.cpp new file mode 100644 index 0000000..183f30d --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_send_suspicion_play_data.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_send_suspicion_play_data.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_send_suspicion_play_data::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_send_suspicion_play_data.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_send_suspicion_play_data.hpp new file mode 100644 index 0000000..9bb22a2 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_send_suspicion_play_data.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_send_suspicion_play_data : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_send_troops.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_send_troops.cpp new file mode 100644 index 0000000..ee8738d --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_send_troops.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_send_troops.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_send_troops::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_send_troops.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_send_troops.hpp new file mode 100644 index 0000000..a4aa107 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_send_troops.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_send_troops : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_spend_server_wallet.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_spend_server_wallet.cpp new file mode 100644 index 0000000..6b85c6d --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_spend_server_wallet.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_spend_server_wallet.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_spend_server_wallet::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_spend_server_wallet.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_spend_server_wallet.hpp new file mode 100644 index 0000000..cd5d5ce --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_spend_server_wallet.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_spend_server_wallet : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_start_consume_transaction.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_start_consume_transaction.cpp new file mode 100644 index 0000000..5835be1 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_start_consume_transaction.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_start_consume_transaction.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_start_consume_transaction::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_start_consume_transaction.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_start_consume_transaction.hpp new file mode 100644 index 0000000..476fcfd --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_start_consume_transaction.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_start_consume_transaction : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_sync_reset.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_sync_reset.cpp new file mode 100644 index 0000000..4376e13 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_sync_reset.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_sync_reset.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_sync_reset::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_sync_reset.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_sync_reset.hpp new file mode 100644 index 0000000..34f11b7 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_sync_reset.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_sync_reset : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_use_pf_item.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_use_pf_item.cpp new file mode 100644 index 0000000..98949a5 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_use_pf_item.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_use_pf_item.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_use_pf_item::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_use_pf_item.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_use_pf_item.hpp new file mode 100644 index 0000000..b0c5cad --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_use_pf_item.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_use_pf_item : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_use_short_pf_item.cpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_use_short_pf_item.cpp new file mode 100644 index 0000000..89e3322 --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_use_short_pf_item.cpp @@ -0,0 +1,15 @@ +#include + +#include "cmd_use_short_pf_item.hpp" + +// unimplemeted + +namespace tpp +{ + nlohmann::json cmd_use_short_pf_item::execute(nlohmann::json& data, const std::optional& player) + { + nlohmann::json result; + result["result"] = "ERR_NOTIMPLEMENTED"; + return result; + } +} diff --git a/src/server/platforms/tppstm/endpoints/main/commands/cmd_use_short_pf_item.hpp b/src/server/platforms/tppstm/endpoints/main/commands/cmd_use_short_pf_item.hpp new file mode 100644 index 0000000..71ff28f --- /dev/null +++ b/src/server/platforms/tppstm/endpoints/main/commands/cmd_use_short_pf_item.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "types/command_handler.hpp" + +namespace tpp +{ + class cmd_use_short_pf_item : public command_handler + { + nlohmann::json execute(nlohmann::json& data, const std::optional& player) override; + }; +} diff --git a/src/server/platforms/tppstm/endpoints/main/main_handler.cpp b/src/server/platforms/tppstm/endpoints/main/main_handler.cpp index 6136a8d..23d7018 100644 --- a/src/server/platforms/tppstm/endpoints/main/main_handler.cpp +++ b/src/server/platforms/tppstm/endpoints/main/main_handler.cpp @@ -4,25 +4,52 @@ #include "commands/cmd_abort_mother_base.hpp" #include "commands/cmd_active_sneak_mother_base.hpp" +#include "commands/cmd_add_follow.hpp" +#include "commands/cmd_approve_steam_shop.hpp" #include "commands/cmd_auth_steamticket.hpp" #include "commands/cmd_calc_cost_fob_deploy_replace.hpp" #include "commands/cmd_calc_cost_time_reduction.hpp" +#include "commands/cmd_cancel_combat_deploy.hpp" +#include "commands/cmd_cancel_combat_deploy_single.hpp" +#include "commands/cmd_cancel_short_pfleague.hpp" +#include "commands/cmd_check_consume_transaction.hpp" #include "commands/cmd_check_defence_motherbase.hpp" #include "commands/cmd_check_server_item_correct.hpp" +#include "commands/cmd_check_short_pfleague_enterable.hpp" +#include "commands/cmd_commit_consume_transaction.hpp" #include "commands/cmd_consume_reserve.hpp" +#include "commands/cmd_create_nuclear.hpp" #include "commands/cmd_create_player.hpp" +#include "commands/cmd_delete_follow.hpp" +#include "commands/cmd_delete_troops_list.hpp" #include "commands/cmd_deploy_fob_assist.hpp" +#include "commands/cmd_deploy_mission.hpp" +#include "commands/cmd_destruct_nuclear.hpp" +#include "commands/cmd_destruct_online_nuclear.hpp" #include "commands/cmd_develop_server_item.hpp" +#include "commands/cmd_develop_wepon.hpp" +#include "commands/cmd_elapse_combat_deploy.hpp" +#include "commands/cmd_enter_short_pfleague.hpp" +#include "commands/cmd_exchange_fob_event_point.hpp" +#include "commands/cmd_exchange_league_point.hpp" +#include "commands/cmd_exchange_league_point2.hpp" +#include "commands/cmd_extend_platform.hpp" #include "commands/cmd_gdpr_check.hpp" #include "commands/cmd_get_abolition_count.hpp" +#include "commands/cmd_get_campaign_dialog_list.hpp" #include "commands/cmd_get_challenge_task_rewards.hpp" #include "commands/cmd_get_challenge_task_target_values.hpp" +#include "commands/cmd_get_combat_deploy_list.hpp" #include "commands/cmd_get_combat_deploy_result.hpp" +#include "commands/cmd_get_contribute_player_list.hpp" #include "commands/cmd_get_daily_reward.hpp" +#include "commands/cmd_get_development_progress.hpp" +#include "commands/cmd_get_entitlement_id_list.hpp" #include "commands/cmd_get_fob_damage.hpp" #include "commands/cmd_get_fob_deploy_list.hpp" #include "commands/cmd_get_fob_event_detail.hpp" #include "commands/cmd_get_fob_event_list.hpp" +#include "commands/cmd_get_fob_event_point_exchange_params.hpp" #include "commands/cmd_get_fob_notice.hpp" #include "commands/cmd_get_fob_param.hpp" #include "commands/cmd_get_fob_reward_list.hpp" @@ -33,36 +60,80 @@ #include "commands/cmd_get_league_result.hpp" #include "commands/cmd_get_login_param.hpp" #include "commands/cmd_get_mbcoin_remainder.hpp" +#include "commands/cmd_get_next_maintenance.hpp" +#include "commands/cmd_get_online_development_progress.hpp" #include "commands/cmd_get_online_prison_list.hpp" #include "commands/cmd_get_own_fob_list.hpp" +#include "commands/cmd_get_pay_item_list.hpp" +#include "commands/cmd_get_pf_detail_params.hpp" +#include "commands/cmd_get_pf_point_exchange_params.hpp" +#include "commands/cmd_get_platform_construction_progress.hpp" #include "commands/cmd_get_playerlist.hpp" #include "commands/cmd_get_player_platform_list.hpp" +#include "commands/cmd_get_previous_short_pfleague_result.hpp" #include "commands/cmd_get_purchasable_area_list.hpp" +#include "commands/cmd_get_purchase_history.hpp" +#include "commands/cmd_get_purchase_history_num.hpp" +#include "commands/cmd_get_ranking.hpp" +#include "commands/cmd_get_rental_loadout_list.hpp" #include "commands/cmd_get_resource_param.hpp" #include "commands/cmd_get_security_info.hpp" +#include "commands/cmd_get_security_product_list.hpp" #include "commands/cmd_get_security_setting_param.hpp" #include "commands/cmd_get_server_item.hpp" #include "commands/cmd_get_server_item_list.hpp" +#include "commands/cmd_get_shop_item_name_list.hpp" +#include "commands/cmd_get_short_pfleague_result.hpp" +#include "commands/cmd_get_sneak_target_list.hpp" +#include "commands/cmd_get_steam_shop_item_list.hpp" +#include "commands/cmd_get_troops_list.hpp" +#include "commands/cmd_get_wormhole_list.hpp" #include "commands/cmd_mining_resource.hpp" +#include "commands/cmd_notice_sneak_mother_base.hpp" +#include "commands/cmd_open_steam_shop.hpp" #include "commands/cmd_open_wormhole.hpp" #include "commands/cmd_purchase_first_fob.hpp" #include "commands/cmd_purchase_fob.hpp" +#include "commands/cmd_purchase_nuclear_completion.hpp" +#include "commands/cmd_purchase_online_deployment_completion.hpp" +#include "commands/cmd_purchase_online_development_completion.hpp" #include "commands/cmd_purchase_platform_construction.hpp" +#include "commands/cmd_purchase_resources_processing.hpp" +#include "commands/cmd_purchase_security_service.hpp" +#include "commands/cmd_purchase_send_troops_completion.hpp" +#include "commands/cmd_purchase_wepon_development_completion.hpp" +#include "commands/cmd_relocate_fob.hpp" +#include "commands/cmd_rental_loadout.hpp" #include "commands/cmd_reqauth_https.hpp" +#include "commands/cmd_reqauth_sessionsvr.hpp" +#include "commands/cmd_request_relief.hpp" +#include "commands/cmd_reset_mother_base.hpp" #include "commands/cmd_sale_resource.hpp" #include "commands/cmd_send_boot.hpp" +#include "commands/cmd_send_deploy_injure.hpp" +#include "commands/cmd_send_heartbeat.hpp" #include "commands/cmd_send_ipandport.hpp" +#include "commands/cmd_send_mission_result.hpp" +#include "commands/cmd_send_nuclear.hpp" +#include "commands/cmd_send_online_challenge_task_status.hpp" #include "commands/cmd_send_sneak_result.hpp" +#include "commands/cmd_send_suspicion_play_data.hpp" +#include "commands/cmd_send_troops.hpp" #include "commands/cmd_set_currentplayer.hpp" #include "commands/cmd_set_security_challenge.hpp" #include "commands/cmd_sneak_mother_base.hpp" +#include "commands/cmd_spend_server_wallet.hpp" +#include "commands/cmd_start_consume_transaction.hpp" #include "commands/cmd_sync_emblem.hpp" #include "commands/cmd_sync_loadout.hpp" #include "commands/cmd_sync_mother_base.hpp" +#include "commands/cmd_sync_reset.hpp" #include "commands/cmd_sync_resource.hpp" #include "commands/cmd_sync_soldier_bin.hpp" #include "commands/cmd_sync_soldier_diff.hpp" #include "commands/cmd_update_session.hpp" +#include "commands/cmd_use_pf_item.hpp" +#include "commands/cmd_use_short_pf_item.hpp" #include "database/database.hpp" #include "database/models/players.hpp" @@ -81,25 +152,52 @@ namespace tpp this->register_handler("CMD_ABORT_MOTHER_BASE"); this->register_handler("CMD_ACTIVE_SNEAK_MOTHER_BASE"); + this->register_handler("CMD_ADD_FOLLOW"); + this->register_handler("CMD_APPROVE_STEAM_SHOP"); this->register_handler("CMD_AUTH_STEAMTICKET"); this->register_handler("CMD_CALC_COST_FOB_DEPLOY_REPLACE"); this->register_handler("CMD_CALC_COST_TIME_REDUCTION"); + this->register_handler("CMD_CANCEL_COMBAT_DEPLOY"); + this->register_handler("CMD_CANCEL_COMBAT_DEPLOY_SINGLE"); + this->register_handler("CMD_CANCEL_SHORT_PFLEAGUE"); + this->register_handler("CMD_CHECK_CONSUME_TRANSACTION"); this->register_handler("CMD_CHECK_DEFENCE_MOTHERBASE"); this->register_handler("CMD_CHECK_SERVER_ITEM_CORRECT"); + this->register_handler("CMD_CHECK_SHORT_PFLEAGUE_ENTERABLE"); + this->register_handler("CMD_COMMIT_CONSUME_TRANSACTION"); this->register_handler("CMD_CONSUME_RESERVE"); + this->register_handler("CMD_CREATE_NUCLEAR"); this->register_handler("CMD_CREATE_PLAYER"); + this->register_handler("CMD_DELETE_FOLLOW"); + this->register_handler("CMD_DELETE_TROOPS_LIST"); this->register_handler("CMD_DEPLOY_FOB_ASSIST"); + this->register_handler("CMD_DEPLOY_MISSION"); + this->register_handler("CMD_DESTRUCT_NUCLEAR"); + this->register_handler("CMD_DESTRUCT_ONLINE_NUCLEAR"); this->register_handler("CMD_DEVELOP_SERVER_ITEM"); + this->register_handler("CMD_DEVELOP_WEPON"); + this->register_handler("CMD_ELAPSE_COMBAT_DEPLOY"); + this->register_handler("CMD_ENTER_SHORT_PFLEAGUE"); + this->register_handler("CMD_EXCHANGE_FOB_EVENT_POINT"); + this->register_handler("CMD_EXCHANGE_LEAGUE_POINT"); + this->register_handler("CMD_EXCHANGE_LEAGUE_POINT2"); + this->register_handler("CMD_EXTEND_PLATFORM"); this->register_handler("CMD_GDPR_CHECK"); this->register_handler("CMD_GET_ABOLITION_COUNT"); + this->register_handler("CMD_GET_CAMPAIGN_DIALOG_LIST"); this->register_handler("CMD_GET_CHALLENGE_TASK_REWARDS"); this->register_handler("CMD_GET_CHALLENGE_TASK_TARGET_VALUES"); + this->register_handler("CMD_GET_COMBAT_DEPLOY_LIST"); this->register_handler("CMD_GET_COMBAT_DEPLOY_RESULT"); + this->register_handler("CMD_GET_CONTRIBUTE_PLAYER_LIST"); this->register_handler("CMD_GET_DAILY_REWARD"); + this->register_handler("CMD_GET_DEVELOPMENT_PROGRESS"); + this->register_handler("CMD_GET_ENTITLEMENT_ID_LIST"); this->register_handler("CMD_GET_FOB_DAMAGE"); this->register_handler("CMD_GET_FOB_DEPLOY_LIST"); this->register_handler("CMD_GET_FOB_EVENT_DETAIL"); this->register_handler("CMD_GET_FOB_EVENT_LIST"); + this->register_handler("CMD_GET_FOB_EVENT_POINT_EXCHANGE_PARAMS"); this->register_handler("CMD_GET_FOB_NOTICE"); this->register_handler("CMD_GET_FOB_PARAM"); this->register_handler("CMD_GET_FOB_REWARD_LIST"); @@ -110,36 +208,80 @@ namespace tpp this->register_handler("CMD_GET_LEAGUE_RESULT"); this->register_handler("CMD_GET_LOGIN_PARAM"); this->register_handler("CMD_GET_MBCOIN_REMAINDER"); + this->register_handler("CMD_GET_NEXT_MAINTENANCE"); + this->register_handler("CMD_GET_ONLINE_DEVELOPMENT_PROGRESS"); this->register_handler("CMD_GET_ONLINE_PRISON_LIST"); this->register_handler("CMD_GET_OWN_FOB_LIST"); + this->register_handler("CMD_GET_PAY_ITEM_LIST"); + this->register_handler("CMD_GET_PF_DETAIL_PARAMS"); + this->register_handler("CMD_GET_PF_POINT_EXCHANGE_PARAMS"); + this->register_handler("CMD_GET_PLATFORM_CONSTRUCTION_PROGRESS"); this->register_handler("CMD_GET_PLAYERLIST"); this->register_handler("CMD_GET_PLAYER_PLATFORM_LIST"); + this->register_handler("CMD_GET_PREVIOUS_SHORT_PFLEAGUE_RESULT"); this->register_handler("CMD_GET_PURCHASABLE_AREA_LIST"); + this->register_handler("CMD_GET_PURCHASE_HISTORY"); + this->register_handler("CMD_GET_PURCHASE_HISTORY_NUM"); + this->register_handler("CMD_GET_RANKING"); + this->register_handler("CMD_GET_RENTAL_LOADOUT_LIST"); this->register_handler("CMD_GET_RESOURCE_PARAM"); this->register_handler("CMD_GET_SECURITY_INFO"); + this->register_handler("CMD_GET_SECURITY_PRODUCT_LIST"); this->register_handler("CMD_GET_SECURITY_SETTING_PARAM"); this->register_handler("CMD_GET_SERVER_ITEM"); this->register_handler("CMD_GET_SERVER_ITEM_LIST"); + this->register_handler("CMD_GET_SHOP_ITEM_NAME_LIST"); + this->register_handler("CMD_GET_SHORT_PFLEAGUE_RESULT"); + this->register_handler("CMD_GET_SNEAK_TARGET_LIST"); + this->register_handler("CMD_GET_STEAM_SHOP_ITEM_LIST"); + this->register_handler("CMD_GET_TROOPS_LIST"); + this->register_handler("CMD_GET_WORMHOLE_LIST"); this->register_handler("CMD_MINING_RESOURCE"); + this->register_handler("CMD_NOTICE_SNEAK_MOTHER_BASE"); + this->register_handler("CMD_OPEN_STEAM_SHOP"); this->register_handler("CMD_OPEN_WORMHOLE"); this->register_handler("CMD_PURCHASE_FIRST_FOB"); this->register_handler("CMD_PURCHASE_FOB"); + this->register_handler("CMD_PURCHASE_NUCLEAR_COMPLETION"); + this->register_handler("CMD_PURCHASE_ONLINE_DEPLOYMENT_COMPLETION"); + this->register_handler("CMD_PURCHASE_ONLINE_DEVELOPMENT_COMPLETION"); this->register_handler("CMD_PURCHASE_PLATFORM_CONSTRUCTION"); + this->register_handler("CMD_PURCHASE_RESOURCES_PROCESSING"); + this->register_handler("CMD_PURCHASE_SECURITY_SERVICE"); + this->register_handler("CMD_PURCHASE_SEND_TROOPS_COMPLETION"); + this->register_handler("CMD_PURCHASE_WEPON_DEVELOPMENT_COMPLETION"); + this->register_handler("CMD_RELOCATE_FOB"); + this->register_handler("CMD_RENTAL_LOADOUT"); this->register_handler("CMD_REQAUTH_HTTPS"); + this->register_handler("CMD_REQAUTH_SESSIONSVR"); + this->register_handler("CMD_REQUEST_RELIEF"); + this->register_handler("CMD_RESET_MOTHER_BASE"); this->register_handler("CMD_SALE_RESOURCE"); this->register_handler("CMD_SEND_BOOT"); + this->register_handler("CMD_SEND_DEPLOY_INJURE"); + this->register_handler("CMD_SEND_HEARTBEAT"); this->register_handler("CMD_SEND_IPANDPORT"); + this->register_handler("CMD_SEND_MISSION_RESULT"); + this->register_handler("CMD_SEND_NUCLEAR"); + this->register_handler("CMD_SEND_ONLINE_CHALLENGE_TASK_STATUS"); this->register_handler("CMD_SEND_SNEAK_RESULT"); + this->register_handler("CMD_SEND_SUSPICION_PLAY_DATA"); + this->register_handler("CMD_SEND_TROOPS"); this->register_handler("CMD_SET_CURRENTPLAYER"); this->register_handler("CMD_SET_SECURITY_CHALLENGE"); this->register_handler("CMD_SNEAK_MOTHER_BASE"); + this->register_handler("CMD_SPEND_SERVER_WALLET"); + this->register_handler("CMD_START_CONSUME_TRANSACTION"); this->register_handler("CMD_SYNC_EMBLEM"); this->register_handler("CMD_SYNC_LOADOUT"); this->register_handler("CMD_SYNC_MOTHER_BASE"); + this->register_handler("CMD_SYNC_RESET"); this->register_handler("CMD_SYNC_RESOURCE"); this->register_handler("CMD_SYNC_SOLDIER_BIN"); this->register_handler("CMD_SYNC_SOLDIER_DIFF"); this->register_handler("CMD_UPDATE_SESSION"); + this->register_handler("CMD_USE_PF_ITEM"); + this->register_handler("CMD_USE_SHORT_PF_ITEM"); } std::optional main_handler::decrypt_request(const std::string& data, std::optional& player) diff --git a/src/server/server.cpp b/src/server/server.cpp index 4fc7694..f7ddc4b 100644 --- a/src/server/server.cpp +++ b/src/server/server.cpp @@ -1,14 +1,33 @@ #include +#include "loader/component_loader.hpp" + #include "types/server.hpp" #include "database/database.hpp" +#include "component/console.hpp" +#include "component/command.hpp" + namespace tpp { - std::atomic_bool killed; + namespace + { + std::atomic_bool killed; + } + + void stop_server() + { + killed = true; + } - int start_server() + void start_server() { + const auto _0 = gsl::finally(&component_loader::pre_destroy); + component_loader::pre_start(); + + const auto current_path = std::filesystem::current_path().generic_string(); + console::log("Working dir: %s\n", current_path.data()); + std::vector threads; try @@ -17,15 +36,15 @@ namespace tpp } catch (const std::exception& e) { - printf("%s\n", e.what()); - return 0; + console::error("Failed to create tables: %s\n", e.what()); + return; } server s; if (!s.start()) { - printf("failed to start server\n"); - return 0; + console::error("Failed to start server\n"); + return; } threads.emplace_back([&] @@ -46,14 +65,12 @@ namespace tpp } }); + component_loader::post_start(); + while (!killed) { - std::string cmd; - std::getline(std::cin, cmd); - if (cmd == "quit") - { - killed = true; - } + command::run_frame(); + std::this_thread::sleep_for(1ms); } for (auto& thread : threads) @@ -63,7 +80,5 @@ namespace tpp thread.join(); } } - - return 0; } } diff --git a/src/server/server.hpp b/src/server/server.hpp index d30fc03..2c9afb9 100644 --- a/src/server/server.hpp +++ b/src/server/server.hpp @@ -2,5 +2,6 @@ namespace tpp { - int start_server(); + void stop_server(); + void start_server(); } diff --git a/src/server/types/base_handler.hpp b/src/server/types/base_handler.hpp index 1c5521c..1e5eb61 100644 --- a/src/server/types/base_handler.hpp +++ b/src/server/types/base_handler.hpp @@ -7,10 +7,16 @@ namespace tpp { public: template - void register_handler(const std::string& endpoint, Args&&... args) + void register_handler(const std::string& name, Args&&... args) { + this->print_handler_name(name); auto handler = std::make_unique(std::forward(args)...); - this->handlers_.insert(std::make_pair(endpoint, std::move(handler))); + this->handlers_.insert(std::make_pair(name, std::move(handler))); + } + + virtual void print_handler_name([[ maybe_unused ]] const std::string& name) + { + } protected: diff --git a/src/server/types/endpoint_handler.cpp b/src/server/types/endpoint_handler.cpp index db075dc..68d1e51 100644 --- a/src/server/types/endpoint_handler.cpp +++ b/src/server/types/endpoint_handler.cpp @@ -2,6 +2,8 @@ #include "endpoint_handler.hpp" +#include "component/console.hpp" + namespace tpp { std::optional endpoint_handler::handle_command([[maybe_unused]] const utils::request_params& params, @@ -34,9 +36,26 @@ namespace tpp return {}; } - printf("[Endpoint] Handling command \"%s\"\n", msgid_str.data()); +#ifdef DEBUG + static std::atomic_int64_t exec_id = 0; + auto id = exec_id++; + const auto start = std::chrono::high_resolution_clock::now(); + const auto _0 = gsl::finally([=] + { + const auto end = std::chrono::high_resolution_clock::now(); + const auto diff = std::chrono::duration_cast(end - start).count(); + console::debug("[Endpoint] Took %lli msec (%lli)", diff, id); + }); + + console::debug("[Endpoint] Handling command \"%s\" (%lli)\n", msgid_str.data(), id); +#endif const auto json_res = handler->second->execute(json_req["data"], player); return this->encrypt_response(json_req, json_res, player); } + + void endpoint_handler::print_handler_name([[ maybe_unused ]] const std::string& name) + { + console::log("Registering command \"%s\"\n", name.data()); + } } diff --git a/src/server/types/endpoint_handler.hpp b/src/server/types/endpoint_handler.hpp index 65fe93f..181896e 100644 --- a/src/server/types/endpoint_handler.hpp +++ b/src/server/types/endpoint_handler.hpp @@ -25,5 +25,7 @@ namespace tpp } virtual std::optional handle_command(const utils::request_params& params, const std::string& data); + + void print_handler_name([[ maybe_unused ]] const std::string& name) override; }; } diff --git a/src/server/types/platform_handler.cpp b/src/server/types/platform_handler.cpp index a84925e..70f7837 100644 --- a/src/server/types/platform_handler.cpp +++ b/src/server/types/platform_handler.cpp @@ -2,6 +2,8 @@ #include "platform_handler.hpp" +#include "component/console.hpp" + namespace tpp { std::optional platform_handler::handle_endpoint(const utils::request_params& params, const std::string& endpoint, const std::string& data) @@ -18,8 +20,13 @@ namespace tpp } catch (const std::exception& e) { - printf("error handling command: %s\n", e.what()); + console::error("Error handling command: %s\n", e.what()); return {}; } } + + void platform_handler::print_handler_name([[ maybe_unused ]] const std::string& name) + { + console::log("Registering endpoint \"%s\"\n", name.data()); + } } diff --git a/src/server/types/platform_handler.hpp b/src/server/types/platform_handler.hpp index 738022c..0064569 100644 --- a/src/server/types/platform_handler.hpp +++ b/src/server/types/platform_handler.hpp @@ -9,5 +9,7 @@ namespace tpp { public: std::optional handle_endpoint(const utils::request_params& params, const std::string& endpoint, const std::string& body); + + void print_handler_name([[ maybe_unused ]] const std::string& name) override; }; } diff --git a/src/server/types/server.hpp b/src/server/types/server.hpp index 3c760f3..f6806b2 100644 --- a/src/server/types/server.hpp +++ b/src/server/types/server.hpp @@ -39,6 +39,4 @@ namespace tpp utils::http_server http_server; }; - - int start_server(); } diff --git a/src/server/utils/config.cpp b/src/server/utils/config.cpp index ce0c90b..e41333a 100644 --- a/src/server/utils/config.cpp +++ b/src/server/utils/config.cpp @@ -33,7 +33,7 @@ namespace config {define_field("database_host", field_type::string, "localhost")}, {define_field("database_port", field_type::number_unsigned, 3306)}, {define_field("database_name", field_type::string, "mgstpp")}, - {define_field("use_konami_auth", field_type::boolean, true)}, + {define_field("use_konami_auth", field_type::boolean, false)}, {define_field("cert_file", field_type::string, "")}, {define_field("key_file", field_type::string, "")}, }; diff --git a/src/server/utils/http_server.cpp b/src/server/utils/http_server.cpp index 8f2bae9..277e2a5 100644 --- a/src/server/utils/http_server.cpp +++ b/src/server/utils/http_server.cpp @@ -2,6 +2,8 @@ #include "http_server.hpp" +#include "component/console.hpp" + #include namespace utils @@ -9,7 +11,6 @@ namespace utils namespace { std::size_t thread_index{}; - std::unordered_map thread_list; } http_connection::http_connection(mg_connection* c) @@ -35,7 +36,7 @@ namespace utils void http_connection::clear_task() { - const auto task = this->get_data(); + const auto task = this->get_data(); if (task == nullptr) { return; @@ -46,24 +47,32 @@ namespace utils task->thread.join(); } - thread_list.erase(task->index); + delete task; std::memset(this->conn_->data, 0, MG_DATA_SIZE); } void http_connection::reply_async(const std::function& cb) const { const auto index = thread_index++; - auto thread_data = &thread_list[index]; + auto task = new task_data_t{}; - thread_data->index = index; - thread_data->thread = std::thread([=]() +#ifdef HTTP_DEBUG + task->start = std::chrono::high_resolution_clock::now(); + console::debug("[HTTP Server] [Request %lli] Started\n", index); +#endif + task->thread = std::thread([=]() { const auto result = cb(); - thread_data->params = result; - thread_data->done = true; + task->params = result; + task->done = true; +#ifdef HTTP_DEBUG + const auto now = std::chrono::high_resolution_clock::now(); + console::debug("[HTTP Server] [Request %lli] Finished in %lli msec\n", index, + std::chrono::duration_cast(now - task->start).count()); +#endif }); - this->set_data(thread_data); + this->set_data(task); } http_server::http_server() @@ -85,7 +94,7 @@ namespace utils { const auto inst = reinterpret_cast(fn_data); http_connection conn = c; - const auto response = conn.get_data(); + const auto task = conn.get_data(); switch (ev) { @@ -111,14 +120,14 @@ namespace utils } case MG_EV_POLL: { - if (response == nullptr || !response->done) + if (task == nullptr || !task->done) { return; } try { - conn.reply(response->params.code, response->params.headers, response->params.body); + conn.reply(task->params.code, task->params.headers, task->params.body); } catch (const std::exception& e) { diff --git a/src/server/utils/http_server.hpp b/src/server/utils/http_server.hpp index cd64124..b73b6e9 100644 --- a/src/server/utils/http_server.hpp +++ b/src/server/utils/http_server.hpp @@ -5,6 +5,8 @@ #include +#define HTTP_DEBUG + namespace utils { struct request_params @@ -21,8 +23,11 @@ namespace utils std::string body; }; - struct thread_data_t + struct task_data_t { +#ifdef HTTP_DEBUG + std::chrono::high_resolution_clock::time_point start; +#endif response_params params; std::thread thread; std::size_t index;