forked from github/server
Fix broken SHOW logic for potions.
This commit is contained in:
parent
4d38a40e96
commit
efec41ca56
1 changed files with 9 additions and 13 deletions
22
src/laws.c
22
src/laws.c
|
@ -2414,26 +2414,22 @@ static void reshow_other(unit * u, struct order *ord, const char *s) {
|
||||||
|
|
||||||
if (itype) {
|
if (itype) {
|
||||||
/* if this is a potion, we need the right alchemy skill */
|
/* 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? */
|
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? */
|
/* we don't have the item, but it is a potion. do we know it? */
|
||||||
int level = potion_level(itype);
|
int level = potion_level(itype);
|
||||||
if (level > 0 && 2 * level > effskill(u, SK_ALCHEMY, 0)) {
|
if (level > 0 && 2 * level <= effskill(u, SK_ALCHEMY, 0)) {
|
||||||
itype = NULL;
|
display_potion(u, itype);
|
||||||
|
found = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (itype) {
|
|
||||||
if (itype->flags & ITF_POTION) {
|
|
||||||
display_potion(u, itype);
|
|
||||||
}
|
|
||||||
else {
|
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) {
|
if (sp) {
|
||||||
|
|
Loading…
Reference in a new issue