From efec41ca56e99e99d7954ac31175f0da352f9120 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Fri, 12 Jan 2018 20:45:59 +0100 Subject: [PATCH] Fix broken SHOW logic for potions. --- src/laws.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/src/laws.c b/src/laws.c index 75ab7372a..dbb99adc1 100644 --- a/src/laws.c +++ b/src/laws.c @@ -2414,26 +2414,22 @@ static void reshow_other(unit * u, struct order *ord, const char *s) { if (itype) { /* if this is a potion, we need the right alchemy skill */ - int i = i_get(u->items, itype); - err = 36; /* we do not have this item? */ - if (i <= 0 && (itype->flags & ITF_POTION)) { + if (itype->flags & ITF_POTION) { /* we don't have the item, but it is a potion. do we know it? */ int level = potion_level(itype); - if (level > 0 && 2 * level > effskill(u, SK_ALCHEMY, 0)) { - itype = NULL; + if (level > 0 && 2 * level <= effskill(u, SK_ALCHEMY, 0)) { + display_potion(u, itype); + found = true; } } - } - - if (itype) { - if (itype->flags & ITF_POTION) { - display_potion(u, itype); - } else { - display_item(u, itype); + int i = i_get(u->items, itype); + if (i > 0) { + found = true; + display_item(u, itype); + } } - found = true; } if (sp) {