Skip to content

Commit

Permalink
Update iologindata_save_player.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Luan Luciano authored Mar 14, 2024
1 parent 3c9408d commit cc6928f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/io/functions/iologindata_save_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -812,8 +812,8 @@ bool IOLoginDataSave::savePlayerOutfits(std::shared_ptr<Player> player) {

DBInsert outfitQuery("INSERT INTO `player_outfits` (`player_id`, `outfit_id`, `addons`) VALUES ");

for (const auto &[outfit_id, addons] : player->outfits) {
query << player->getGUID() << ',' << outfit_id << ',' << addons;
for (const auto &[outfitIdPlayer, addonsPlayer] : player->outfits) {

Check warning on line 815 in src/io/functions/iologindata_save_player.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

[cppcheck] reported by reviewdog 🐶 Variable 'outfitIdPlayer' is not assigned a value. Raw Output: src/io/functions/iologindata_save_player.cpp:815:Variable 'outfitIdPlayer' is not assigned a value.
query << player->getGUID() << ',' << outfitIdPlayer << ',' << addonsPlayer;
if (!outfitQuery.addRow(query)) {
return false;
}
Expand Down Expand Up @@ -842,8 +842,8 @@ bool IOLoginDataSave::savePlayerMounts(std::shared_ptr<Player> player) {

DBInsert mountQuery("INSERT INTO `player_mounts` (`player_id`, `mount_id`) VALUES ");

for (const auto &mount : player->mounts) {
query << player->getGUID() << ',' << mount;
for (const auto &mountId : player->mounts) {
query << player->getGUID() << ',' << mountId;
if (!mountQuery.addRow(query)) {
return false;
}
Expand Down

0 comments on commit cc6928f

Please sign in to comment.