From 4a7d2b45b54491c9203dc41c006ddb1c43831201 Mon Sep 17 00:00:00 2001 From: Atemo Date: Tue, 13 Jun 2023 17:27:06 +0200 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Vincent Stumpf --- src/map/skill.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/map/skill.cpp b/src/map/skill.cpp index 2db4cab26d..7f95b0aabe 100755 --- a/src/map/skill.cpp +++ b/src/map/skill.cpp @@ -9430,9 +9430,9 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui if (sd) { int ebottle = pc_search_inventory(sd,ITEMID_EMPTY_BOTTLE); - std::shared_ptr produce_alcohol = skill_can_produce_mix(sd,ITEMID_ALCOHOL,-1, 100); - std::shared_ptr produce_acid = skill_can_produce_mix(sd,ITEMID_ACID_BOTTLE,-1, 50); - std::shared_ptr produce_fire = skill_can_produce_mix(sd,ITEMID_FIRE_BOTTLE,-1, 50); + auto produce_alcohol = skill_can_produce_mix(sd,ITEMID_ALCOHOL,-1, 100); + auto produce_acid = skill_can_produce_mix(sd,ITEMID_ACID_BOTTLE,-1, 50); + auto produce_fire = skill_can_produce_mix(sd,ITEMID_FIRE_BOTTLE,-1, 50); if( ebottle >= 0 ) ebottle = sd->inventory.u.items_inventory[ebottle].amount; @@ -21448,8 +21448,6 @@ std::shared_ptr skill_can_produce_mix(map_session_data } } - if (produce->materials.empty()) - return produce; // Check on player's inventory for (const auto &it : produce->materials) {