From 2ed4f389c28fa47ae5e16d747d0eb81e3a498acf Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Wed, 14 Jan 2009 15:31:00 +0000 Subject: * Fix 2477235: Use inscription check when switching back from butchering tool in case it was autoinscribed {!w}. * Make TSO reclaim holy wrath weapons an Elyvilon worshipper is attempting to destroy (flavour only). (FR 2497133) * Disallow Dissolution outside of the Slime Pits. * Explain 'e' as "Drain corpses" for Vampires in the command help. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8450 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/item_use.cc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source/item_use.cc') diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index ee73745107..36a15df6ec 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -219,7 +219,10 @@ static bool _valid_weapon_swap(const item_def &item) return (false); } -bool wield_weapon(bool auto_wield, int slot, bool show_weff_messages) +// If force is true, don't check weapon inscriptions. +// (Assuming the player was already prompted for that.) +bool wield_weapon(bool auto_wield, int slot, bool show_weff_messages, + bool force) { if (inv_count() < 1) { @@ -318,8 +321,11 @@ bool wield_weapon(bool auto_wield, int slot, bool show_weff_messages) return (false); // For non-auto_wield cases checked above. - if (auto_wield && !check_warning_inscriptions(new_wpn, OPER_WIELD)) + if (auto_wield && !force + && !check_warning_inscriptions(new_wpn, OPER_WIELD)) + { return (false); + } // Wield the weapon. if (!safe_to_remove_or_wear(new_wpn, false)) -- cgit v1.2.3-54-g00ecf