From fc7ae57f11b5a1db6fb5394ae7a7fcc55e04ec1d Mon Sep 17 00:00:00 2001 From: Mark Langsdorf Date: Sun, 22 Sep 2019 14:40:50 -0500 Subject: [PATCH] NPCs: uncache weapon value on weapon removal Fixes #32613 The trade interface allowed you to remove an NPC's weapon without removing the cached value of the weapon. Invalided the weapon value cache entry when a weapon is removed. --- src/character.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/character.cpp b/src/character.cpp index 1db509dbf949e..f6dafc85670a4 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -1251,6 +1251,7 @@ item Character::remove_weapon() { item tmp = weapon; weapon = item(); + cached_info.erase( "weapon_value" ); return tmp; }