mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-05 18:24:12 +00:00
Add property behaviors migration (#790)
* Add behaviors migration Add migration for behaviors. Tested that the tables get altered correctly, names are set correctly. Tested that I can place models, both regular and Brick-by-Brick ones and that they get deleted properly. Tested that picking up models and re-placing them down properly updates them in the tables. * Only update when empty
This commit is contained in:
@@ -2545,7 +2545,7 @@ void GameMessages::HandleBBBSaveRequest(RakNet::BitStream* inStream, Entity* ent
|
||||
delete ugcs;
|
||||
|
||||
//Insert into the db as a BBB model:
|
||||
auto* stmt = Database::CreatePreppedStmt("INSERT INTO `properties_contents`(`id`, `property_id`, `ugc_id`, `lot`, `x`, `y`, `z`, `rx`, `ry`, `rz`, `rw`) VALUES (?,?,?,?,?,?,?,?,?,?,?)");
|
||||
auto* stmt = Database::CreatePreppedStmt("INSERT INTO `properties_contents` VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
|
||||
stmt->setUInt64(1, newIDL);
|
||||
stmt->setUInt64(2, propertyId);
|
||||
stmt->setUInt(3, blueprintIDSmall);
|
||||
@@ -2557,6 +2557,13 @@ void GameMessages::HandleBBBSaveRequest(RakNet::BitStream* inStream, Entity* ent
|
||||
stmt->setDouble(9, 0.0f); // ry
|
||||
stmt->setDouble(10, 0.0f); // rz
|
||||
stmt->setDouble(11, 0.0f); // rw
|
||||
stmt->setString(12, "Objects_14_name"); // Model name. TODO make this customizable
|
||||
stmt->setString(13, ""); // Model description. TODO implement this.
|
||||
stmt->setDouble(14, 0); // behavior 1. TODO implement this.
|
||||
stmt->setDouble(15, 0); // behavior 2. TODO implement this.
|
||||
stmt->setDouble(16, 0); // behavior 3. TODO implement this.
|
||||
stmt->setDouble(17, 0); // behavior 4. TODO implement this.
|
||||
stmt->setDouble(18, 0); // behavior 5. TODO implement this.
|
||||
stmt->execute();
|
||||
delete stmt;
|
||||
|
||||
|
Reference in New Issue
Block a user