Skip to content

Commit

Permalink
NPCs: uncache weapon value on weapon removal
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mlangsdorf committed Sep 22, 2019
1 parent 0ef7a0f commit fc7ae57
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/character.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1251,6 +1251,7 @@ item Character::remove_weapon()
{
item tmp = weapon;
weapon = item();
cached_info.erase( "weapon_value" );
return tmp;
}

Expand Down

0 comments on commit fc7ae57

Please sign in to comment.