unpaid shop goods in inventory (trunk only)
Inventory display adds "(unpaid, N zorkmids)" to carried unpaid items, but it didn't show anything comparable for indirect unpaid ones (hero-owned containers holding shop-owned objects). Now it will include "(contents, N zorkmids)" in such cases.
This commit is contained in:
14
src/objnam.c
14
src/objnam.c
@@ -827,17 +827,11 @@ ring:
|
||||
Strcat(bp, " (alternate weapon; not wielded)");
|
||||
}
|
||||
if(obj->owornmask & W_QUIVER) Strcat(bp, " (in quiver)");
|
||||
if(obj->unpaid) {
|
||||
xchar ox, oy;
|
||||
long quotedprice = unpaid_cost(obj);
|
||||
struct monst *shkp = (struct monst *)0;
|
||||
if (!iflags.suppress_price && count_unpaid(obj)) {
|
||||
long quotedprice = unpaid_cost(obj, TRUE);
|
||||
|
||||
if (Has_contents(obj) &&
|
||||
get_obj_location(obj, &ox, &oy, BURIED_TOO|CONTAINED_TOO) &&
|
||||
costly_spot(ox, oy) &&
|
||||
(shkp = shop_keeper(*in_rooms(ox, oy, SHOPBASE))))
|
||||
quotedprice += contained_cost(obj, shkp, 0L, FALSE, TRUE);
|
||||
Sprintf(eos(bp), " (unpaid, %ld %s)",
|
||||
Sprintf(eos(bp), " (%s, %ld %s)",
|
||||
obj->unpaid ? "unpaid" : "contents",
|
||||
quotedprice, currency(quotedprice));
|
||||
}
|
||||
if (!strncmp(prefix, "a ", 2) &&
|
||||
|
||||
Reference in New Issue
Block a user