OSDN Git Service

割引価格の魔法棒の回数が過充填されないように修正。
authorhabu <habu@0568b783-4c39-0410-ac80-bf13821ea2a2>
Tue, 5 Jan 2010 07:51:38 +0000 (07:51 +0000)
committerhabu <habu@0568b783-4c39-0410-ac80-bf13821ea2a2>
Tue, 5 Jan 2010 07:51:38 +0000 (07:51 +0000)
src/store.c

index bd0187b..eb8ba0d 100644 (file)
@@ -1058,12 +1058,6 @@ static void mass_produce(object_type *o_ptr)
                                if (cost < 1601L) size += damroll(1, 5);
                                else if (cost < 3201L) size += damroll(1, 3);
                        }
-
-                       /* Ensure that mass-produced rods and wands get the correct pvals. */
-                       if ((o_ptr->tval == TV_ROD) || (o_ptr->tval == TV_WAND))
-                       {
-                               o_ptr->pval *= size;
-                       }
                        break;
                }
        }
@@ -1111,6 +1105,12 @@ msg_print("
 
        /* Save the total pile size */
        o_ptr->number = size - (size * discount / 100);
+
+       /* Ensure that mass-produced rods and wands get the correct pvals. */
+       if ((o_ptr->tval == TV_ROD) || (o_ptr->tval == TV_WAND))
+       {
+               o_ptr->pval *= o_ptr->number;
+       }
 }