Apply suggestions from code review

Co-authored-by: Vincent Stumpf <vincents.995@gmail.com>
This commit is contained in:
Atemo 2023-06-13 17:27:06 +02:00 committed by GitHub
parent 86fcc98081
commit 4a7d2b45b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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<s_skill_produce_db_entry> produce_alcohol = skill_can_produce_mix(sd,ITEMID_ALCOHOL,-1, 100);
std::shared_ptr<s_skill_produce_db_entry> produce_acid = skill_can_produce_mix(sd,ITEMID_ACID_BOTTLE,-1, 50);
std::shared_ptr<s_skill_produce_db_entry> 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<s_skill_produce_db_entry> skill_can_produce_mix(map_session_data
}
}
if (produce->materials.empty())
return produce;
// Check on player's inventory
for (const auto &it : produce->materials) {