dropping gold on an altar

<Someone> reported that dropping gold on an altar prints no message.
As a side effect, gnostic conduct was never affected, which seemed odd;
dropping other known objects would still affect your gnostic conduct.
While fixing this, I noticed a GOLDOBJ-related bug when dropping gold while
levitating.
This commit is contained in:
cohrs
2002-07-02 05:55:23 +00:00
parent 2c277e15d1
commit c6ec3e35a7
2 changed files with 9 additions and 6 deletions

View File

@@ -135,6 +135,7 @@ unmap "I" symbols when searching while blind and levitating
monsters that are frozen or sleeping cannot be grateful for untrapping
grammar of blessed-detection eating warning messages when eating 1 of N objects
message for charging for items lost in a cursed magic bag wasn't always shown
dropping gold on an altar printed no message and didn't change gnostic conduct
Platform- and/or Interface-Specific Fixes

View File

@@ -218,13 +218,13 @@ void
doaltarobj(obj) /* obj is an object dropped on an altar */
register struct obj *obj;
{
if (Blind || obj->oclass == GOLD_CLASS)
if (Blind)
return;
/* KMH, conduct */
u.uconduct.gnostic++;
if (obj->blessed || obj->cursed) {
if ((obj->blessed || obj->cursed) && obj->oclass != GOLD_CLASS) {
There("is %s flash as %s %s the altar.",
an(hcolor(obj->blessed ? amber : Black)),
doname(obj), otense(obj, "hit"));
@@ -483,7 +483,13 @@ register struct obj *obj;
#endif
if (!can_reach_floor()) {
if(flags.verbose) You("drop %s.", doname(obj));
#ifndef GOLDOBJ
if (obj->oclass != GOLD_CLASS || obj == invent) freeinv(obj);
#else
/* Ensure update when we drop gold objects */
if (obj->oclass == GOLD_CLASS) flags.botl = 1;
freeinv(obj);
#endif
hitfloor(obj);
return(1);
}
@@ -507,10 +513,6 @@ register struct obj *obj;
#else
/* Ensure update when we drop gold objects */
if (obj->oclass == GOLD_CLASS) flags.botl = 1;
/* Money is usually not in our inventory */
/*if (obj->oclass != GOLD_CLASS || obj == invent)*/
/* !!!! make sure we don't drop "created" gold not in inventory any more,*/
/* or this will crash !!!! */
freeinv(obj);
#endif
if (!u.uswallow && ship_object(obj, u.ux, u.uy, FALSE)) return;