--- deliantra/server/common/button.C 2006/09/11 20:28:37 1.8 +++ deliantra/server/common/button.C 2006/09/13 23:42:23 1.9 @@ -1,7 +1,7 @@ /* * static char *rcsid_button_c = - * "$Id: button.C,v 1.8 2006/09/11 20:28:37 root Exp $"; + * "$Id: button.C,v 1.9 2006/09/13 23:42:23 root Exp $"; */ /* @@ -366,7 +366,6 @@ return 0; } - /* * operate_altar checks if sacrifice was accepted and removes sacrificed * objects. If sacrifice was succeed return 1 else 0. Might be better to @@ -376,11 +375,9 @@ * If this function returns 1, '*sacrifice' is modified to point to the * remaining sacrifice, or is set to NULL if the sacrifice was used up. */ - int operate_altar (object *altar, object **sacrifice) { - if (!altar->map) { LOG (llevError, "BUG: operate_altar(): altar has no map\n"); @@ -403,6 +400,7 @@ /* Round up any sacrifices. Altars don't make change either */ if (NROF_SACRIFICE (altar) % (*sacrifice)->value) number++; + *sacrifice = decrease_ob_nr (*sacrifice, number); } else @@ -410,6 +408,7 @@ if (altar->msg) new_info_map (NDI_BLACK, altar->map, altar->msg); + return 1; }