Skip to content

Commit

Permalink
Code format - (Clang-format)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Sep 17, 2024
1 parent 4325240 commit 1f0043c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/creatures/npcs/npc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ void Npc::onPlayerSellItem(std::shared_ptr<Player> player, uint16_t itemId, uint
continue;
}

if(item->hasAttribute(ItemAttribute_t::DURATION)){
if (item->hasAttribute(ItemAttribute_t::DURATION)) {
continue;
}

Expand All @@ -409,10 +409,10 @@ void Npc::onPlayerSellItem(std::shared_ptr<Player> player, uint16_t itemId, uint
}

auto totalRemoved = amount - toRemove;
if(totalRemoved == 0){
if (totalRemoved == 0) {
return;
}

auto totalCost = static_cast<uint64_t>(sellPrice * totalRemoved);
g_logger().debug("[Npc::onPlayerSellItem] - Removing items from player {} amount {} of items with id {} on shop for npc {}", player->getName(), toRemove, itemId, getName());
if (totalRemoved > 0 && totalCost > 0) {
Expand Down
2 changes: 1 addition & 1 deletion src/creatures/players/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4120,7 +4120,7 @@ std::map<uint32_t, uint32_t> &Player::getAllItemTypeCount(std::map<uint32_t, uin

std::map<uint16_t, uint16_t> &Player::getAllSaleItemIdAndCount(std::map<uint16_t, uint16_t> &countMap) const {
for (const auto &item : getAllInventoryItems(false, true)) {
if(item->hasAttribute(ItemAttribute_t::DURATION)){
if (item->hasAttribute(ItemAttribute_t::DURATION)) {
continue;
}
countMap[item->getID()] += item->getItemCount();
Expand Down

0 comments on commit 1f0043c

Please sign in to comment.