]> granicus.if.org Git - nethack/commitdiff
computing cost of stolen container contents
authorcohrs <cohrs>
Fri, 15 Feb 2002 05:12:38 +0000 (05:12 +0000)
committercohrs <cohrs>
Fri, 15 Feb 2002 05:12:38 +0000 (05:12 +0000)
the cost didn't multiply get_cost value by the object quan

doc/fixes34.0
src/shk.c

index e203b3d35d99179f7f30af9f9957e77ab36f8601..69e350a18a3349c7443a1520449350912cb6febe 100644 (file)
@@ -431,6 +431,7 @@ monsters with M3_WANTSBOOK often couldn't move in the Wizard-level
 Vlad should want the Candelabrum
 if you float_down on a trap in which you're already trapped, don't retrap
 applying whip toward hidden mimic displays mimic name before "Wait!" message
+stealing a container didn't multiply cost of stolen contained objects by quan
 
 
 Platform- and/or Interface-Specific Fixes
index 11b0286f65f4738d0c43e0b4bc4b0b412c9c6ce1..12cb3498958bf9bfa84e321835442da31f0aba23 100644 (file)
--- a/src/shk.c
+++ b/src/shk.c
@@ -2373,11 +2373,11 @@ register boolean ininv;
            if (!Has_contents(otmp)) {
                if(ininv) {
                    if(otmp->unpaid)
-                       price += get_cost(otmp, shkp);
+                       price += otmp->quan * get_cost(otmp, shkp);
                } else {
                    if(!otmp->no_charge) {
                        if(otmp->oclass != FOOD_CLASS || !otmp->oeaten)
-                           price += get_cost(otmp, shkp);
+                           price += otmp->quan * get_cost(otmp, shkp);
                    }
                    otmp->no_charge = 0;
                }