From e5bdbc4f1ee95485b412a26b6a203cc71401dce3 Mon Sep 17 00:00:00 2001 From: Alex King <89047260+Kinglykrab@users.noreply.github.com> Date: Sat, 16 Mar 2024 23:09:57 -0400 Subject: [PATCH] [Bug Fix] Fix Bot Cloning (#4186) # Notes - We were not setting `inventories_index` to `0` so it was trying to use the pre-existing unique identifier, causing the query to fail. --- zone/bot_database.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zone/bot_database.cpp b/zone/bot_database.cpp index f43bde970..498e16653 100644 --- a/zone/bot_database.cpp +++ b/zone/bot_database.cpp @@ -1788,7 +1788,8 @@ bool BotDatabase::CreateCloneBotInventory(const uint32 bot_id, const uint32 clon } for (auto& e : l) { - e.bot_id = clone_id; + e.inventories_index = 0; + e.bot_id = clone_id; } return BotInventoriesRepository::InsertMany(database, l);