'D'ropping gold messes up inventory
- new splitobj() behavior requires special casing when !GOLDOBJ and dropping some of your gold, to ensure that the remainder remains the first item in the inventory
This commit is contained in:
5
src/do.c
5
src/do.c
@@ -671,6 +671,11 @@ int retry;
|
||||
cnt = pick_list[i].count;
|
||||
if (cnt < otmp->quan && !welded(otmp) &&
|
||||
(!otmp->cursed || otmp->otyp != LOADSTONE)) {
|
||||
#ifndef GOLDOBJ
|
||||
if (otmp->oclass == GOLD_CLASS)
|
||||
(void) splitobj(otmp, otmp->quan - cnt);
|
||||
else
|
||||
#endif
|
||||
otmp = splitobj(otmp, cnt);
|
||||
}
|
||||
n_dropped += drop(otmp);
|
||||
|
||||
Reference in New Issue
Block a user