Skip to content

Commit

Permalink
[Bug Fix] Fix empty InsertMany in bot starting items. (#3653)
Browse files Browse the repository at this point in the history
Not checking if the vector is empty before it inserts still inserts when there’s nothing.
  • Loading branch information
Kinglykrab authored Oct 24, 2023
1 parent 49d4d0a commit 2df4289
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion zone/bot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 };

0 comments on commit 2df4289

Please sign in to comment.