There's no capacity for the shop logic to handle gold without also
changing the credit/debit within it, so gold must always be handled in
`sellobj()`, even when the state of it is set to `SELL_DONTSELL`.
This is needed for an upcoming bug fix.
Based on DynaHack commit
b0784c5 (Credit/debit gold in containers even
in sellobj_state SELL_DONTSELL) by me.
offer = ltmp + cltmp;
/* get one case out of the way: nothing to sell, and no gold */
- if (!isgold && ((offer + gltmp) == 0L || sell_how == SELL_DONTSELL)) {
+ if (!(isgold || cgold)
+ && ((offer + gltmp) == 0L || sell_how == SELL_DONTSELL)) {
boolean unpaid = is_unpaid(obj);
if (container) {
currency(eshkp->credit));
}
- if (!offer) {
+ if (!offer || sell_how == SELL_DONTSELL) {
if (!isgold) {
if (container)
dropped_container(obj, shkp, FALSE);