OSDN Git Service

Merge pull request #1541 from habu1010/feature/fix-useless-smith-essence-for-ammo
authorHabu <habu1010+github@gmail.com>
Fri, 17 Sep 2021 12:46:36 +0000 (21:46 +0900)
committerGitHub <noreply@github.com>
Fri, 17 Sep 2021 12:46:36 +0000 (21:46 +0900)
[Fix] 矢弾に装備品用のエッセンスを付与できる

src/object-enchant/smith-info.cpp

index 3a7a25d..eab69a4 100644 (file)
@@ -83,7 +83,7 @@ bool BasicSmithInfo::can_give_smith_effect_impl(const object_type *o_ptr) const
         return o_ptr->is_melee_ammo();
     }
 
-    return o_ptr->is_weapon_armour_ammo();
+    return o_ptr->is_weapon_armour_ammo() && o_ptr->is_wearable();
 }
 
 ActivationSmithInfo::ActivationSmithInfo(SmithEffect effect, concptr name, SmithCategory category, std::vector<SmithEssence> need_essences, int consumption, TrFlags add_flags, random_art_activation_type act_idx)