From: mogami Date: Fri, 15 Nov 2002 07:05:42 +0000 (+0000) Subject: 魔力喰いで失敗してロッドが壊れたとき、残りのロッドのtimeoutが異常になるバグ修正。 X-Git-Tag: v2.1.2~1726 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=67d0906c3669458b8ef20c3beaddba89d9f4253d;p=hengband%2Fhengband.git 魔力喰いで失敗してロッドが壊れたとき、残りのロッドのtimeoutが異常になるバグ修正。 またデバッグコマンド使用中に見付けたo_ptr->pvalをロッドの古い仕様に添って 書き変えていた古いコード削除。 --- diff --git a/src/spells3.c b/src/spells3.c index 349afee93..378e5db54 100644 --- a/src/spells3.c +++ b/src/spells3.c @@ -5906,8 +5906,8 @@ msg_format(" #endif /* Reduce rod stack maximum timeout, drain wands. */ - if (o_ptr->tval == TV_ROD) o_ptr->timeout -= k_ptr->pval; - if (o_ptr->tval == TV_WAND) o_ptr->pval = o_ptr->pval * (o_ptr->number - 1) / o_ptr->number; + if (o_ptr->tval == TV_ROD) o_ptr->timeout = MIN(o_ptr->timeout, k_ptr->pval * (o_ptr->number - 1)); + else if (o_ptr->tval == TV_WAND) o_ptr->pval = o_ptr->pval * (o_ptr->number - 1) / o_ptr->number; } else diff --git a/src/wizard2.c b/src/wizard2.c index 2046d79e9..1a70474e0 100644 --- a/src/wizard2.c +++ b/src/wizard2.c @@ -1177,10 +1177,6 @@ static void wiz_quantity_item(object_type *o_ptr) /* Accept modifications */ o_ptr->number = tmp_int; - - /* Hack -- rod pvals must change if the number in the stack does. -LM- */ - if (o_ptr->tval == TV_ROD) - o_ptr->pval = o_ptr->pval * o_ptr->number / tmp_qnt; } }