Browse Source

Apply suggestions from code review

Co-authored-by: Vincent Stumpf <vincents.995@gmail.com>
Atemo 1 year ago
parent
commit
4a7d2b45b5
1 changed files with 3 additions and 5 deletions
  1. 3 5
      src/map/skill.cpp

+ 3 - 5
src/map/skill.cpp

@@ -9430,9 +9430,9 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
 		if (sd) {
 		if (sd) {
 			int ebottle = pc_search_inventory(sd,ITEMID_EMPTY_BOTTLE);
 			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 )
 			if( ebottle >= 0 )
 				ebottle = sd->inventory.u.items_inventory[ebottle].amount;
 				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
 	// Check on player's inventory
 	for (const auto &it : produce->materials) {
 	for (const auto &it : produce->materials) {