Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ugc Save rocket and car modular assembly data to database #1279

Merged
merged 6 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dGame/dGameMessages/GameMessages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5620,7 +5620,7 @@ void GameMessages::HandleModularBuildFinish(RakNet::BitStream* inStream, Entity*
inv->AddItem(8092, 1, eLootSourceType::QUICKBUILD, eInventoryType::MODELS, config, LWOOBJID_EMPTY, true, false, newIdBig);
}

auto stmt = Database::CreatePreppedStmt("INSERT INTO ugc_modular_build (ugc_id, rocket_ldf) VALUES (?,?)");
auto stmt = Database::CreatePreppedStmt("INSERT INTO ugc_modular_build (ugc_id, ldf_config) VALUES (?,?)");
stmt->setUInt64(1, newIdBig);
stmt->setString(2, GeneralUtils::UTF16ToWTF8(modules));
stmt->execute();
Expand Down
5 changes: 2 additions & 3 deletions migrations/dlu/12_modular_build_ugc.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
CREATE TABLE IF NOT EXISTS ugc_modular_build (
EmosewaMC marked this conversation as resolved.
Show resolved Hide resolved
id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
ugc_id BIGINT NOT NULL,
rocket_ldf VARCHAR(60) NOT NULL
ugc_id BIGINT NOT NULL PRIMARY KEY,
ldf_config VARCHAR(60) NOT NULL
);
Loading