U337 - putting gold in a shop container

When you drop a container in a shop, gold in that container is added to
your credit.  However, if you put gold into a container after it was already
on the shop floor, no credit was given.  Then when you picked up the bag or
tried to take out the gold, you'd be debited for it.  This change causes
in_container to handle gold the same as container dropping does.
This commit is contained in:
cohrs
2003-03-17 05:38:36 +00:00
parent b85f492320
commit f159dd596c
2 changed files with 5 additions and 1 deletions

View File

@@ -1802,6 +1802,9 @@ register struct obj *obj;
Strcpy(buf, the(xname(current_container)));
You("put %s into %s.", doname(obj), buf);
/* gold in container always needs to be added to credit */
if (floor_container && obj->oclass == COIN_CLASS)
sellobj(obj, current_container->ox, current_container->oy);
(void) add_to_container(current_container, obj);
current_container->owt = weight(current_container);
}