From 524f5642d55c29e6f1ecedd5a64cb1e96e00c7d6 Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 11 Jul 2019 13:29:33 -0700 Subject: [PATCH] poly'd hero theft fix I moved some stuff around after testing the changes in 58583cacf8511625fd805ecbb050481f28de9411 before committing it. It accidentally ended up with 'gold' always being Null at the first place it gets used (to vary the feedback when stealing everything except gold). --- src/uhitm.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/uhitm.c b/src/uhitm.c index c6fc30c2a..83bb49ca2 100644 --- a/src/uhitm.c +++ b/src/uhitm.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 uhitm.c $NHDT-Date: 1562806586 2019/07/11 00:56:26 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.210 $ */ +/* NetHack 3.6 uhitm.c $NHDT-Date: 1562876956 2019/07/11 20:29:16 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.211 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1522,6 +1522,7 @@ struct attack *mattk; } *minvent_ptr = stealoid; /* put armor back into minvent */ } + gold = findgold(mdef->minvent); if (stealoid) { /* we will be taking everything */ if (gender(mdef) == (int) u.mfemale && youmonst.data->mlet == S_NYMPH) @@ -1538,11 +1539,11 @@ struct attack *mattk; stolen c'trice corpse or monster wielding one and having gloves stolen) is less bookkeeping than skipping it within the loop or taking it out once and then trying to figure out how to put it back */ - if ((gold = findgold(mdef->minvent)) != 0) + if (gold) obj_extract_self(gold); while ((otmp = mdef->minvent) != 0) { - if (gold) /* put 'mdef's gold back */ + if (gold) /* put 'mdef's gold back after remembering mdef->minvent */ mpickobj(mdef, gold), gold = 0; if (!Upolyd) break; /* no longer have ability to steal */