[Bug Fix] Fix empty InsertMany in bot starting items. (#3653)

Not checking if the vector is empty before it inserts still inserts when there’s nothing.
This commit is contained in:
Alex King 2023-10-24 18:15:42 -04:00 committed by GitHub
parent 49d4d0acc3
commit 2df4289588
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8773,7 +8773,9 @@ void Bot::AddBotStartingItems(uint16 race_id, uint8 class_id)
}
}
BotInventoriesRepository::InsertMany(content_db, v);
if (!v.empty()) {
BotInventoriesRepository::InsertMany(content_db, v);
}
}
uint8 Bot::spell_casting_chances[SPELL_TYPE_COUNT][PLAYER_CLASS_COUNT][EQ::constants::STANCE_TYPE_COUNT][cntHSND] = { 0 };