shop gold vs hangup
From the newsgroup: hangup save while picking up gold from the floor in a shop would duplicate that gold in the save file. First the gold amount was being added to hero's gold, then two messages were given [pline() or prinv() about pickup followed by one from costly_gold() about shop credit], and lastly the floor gold would be removed. The second message could trigger --More-- and provide a controllable interruption point between giving the gold to the hero and removing it from the floor. Change this to do the removal step before feedback.
This commit is contained in:
@@ -366,6 +366,7 @@ could get "suddenly you cannot see the <mon>" while invisible mon remained
|
|||||||
cutting a long worm in half would trigger segfault/accvio crash if the hit
|
cutting a long worm in half would trigger segfault/accvio crash if the hit
|
||||||
took parent down to 1 hit point or if long worms had become extinct
|
took parent down to 1 hit point or if long worms had become extinct
|
||||||
blinded invisible hero can't see self as invisible via ';' or '/'
|
blinded invisible hero can't see self as invisible via ';' or '/'
|
||||||
|
a hangup save while picking up gold from shop floor could duplicate that gold
|
||||||
|
|
||||||
|
|
||||||
Platform- and/or Interface-Specific Fixes
|
Platform- and/or Interface-Specific Fixes
|
||||||
|
|||||||
+4
-4
@@ -1281,6 +1281,10 @@ boolean telekinesis; /* not picking it up directly by hand */
|
|||||||
costly_gold(obj->ox, obj->oy, gold_capacity);
|
costly_gold(obj->ox, obj->oy, gold_capacity);
|
||||||
} else {
|
} else {
|
||||||
u.ugold += count;
|
u.ugold += count;
|
||||||
|
if (count == obj->quan)
|
||||||
|
delobj(obj);
|
||||||
|
else
|
||||||
|
obj->quan -= count;
|
||||||
if ((nearload = near_capacity()) != 0)
|
if ((nearload = near_capacity()) != 0)
|
||||||
pline("%s %ld gold piece%s.",
|
pline("%s %ld gold piece%s.",
|
||||||
nearload < MOD_ENCUMBER ?
|
nearload < MOD_ENCUMBER ?
|
||||||
@@ -1289,10 +1293,6 @@ boolean telekinesis; /* not picking it up directly by hand */
|
|||||||
else
|
else
|
||||||
prinv((char *) 0, obj, count);
|
prinv((char *) 0, obj, count);
|
||||||
costly_gold(obj->ox, obj->oy, count);
|
costly_gold(obj->ox, obj->oy, count);
|
||||||
if (count == obj->quan)
|
|
||||||
delobj(obj);
|
|
||||||
else
|
|
||||||
obj->quan -= count;
|
|
||||||
}
|
}
|
||||||
context.botl = 1;
|
context.botl = 1;
|
||||||
if (context.run) nomul(0);
|
if (context.run) nomul(0);
|
||||||
|
|||||||
Reference in New Issue
Block a user