From 4c151c069562fc169adedf709242d4e9583dc0e5 Mon Sep 17 00:00:00 2001 From: Deskull Date: Sat, 12 Jan 2019 22:51:10 +0900 Subject: [PATCH] =?utf8?q?[Refactor]=20#37353=20=E3=82=B3=E3=83=A1?= =?utf8?q?=E3=83=B3=E3=83=88=E6=95=B4=E7=90=86=E3=80=82=20/=20Refactor=20c?= =?utf8?q?omments.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/cmd-item.c | 1 - src/cmd2.c | 1 - src/object2.c | 14 +------------- 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/src/cmd-item.c b/src/cmd-item.c index 29c085894..d83ef9d0a 100644 --- a/src/cmd-item.c +++ b/src/cmd-item.c @@ -376,7 +376,6 @@ void do_cmd_wield(void) /* Player touches it */ o_ptr->marked |= OM_TOUCHED; - /* Increase the weight */ p_ptr->total_weight += q_ptr->weight; /* Increment the equip counter by hand */ diff --git a/src/cmd2.c b/src/cmd2.c index 6e59e9537..5735c9505 100644 --- a/src/cmd2.c +++ b/src/cmd2.c @@ -3701,7 +3701,6 @@ bool do_cmd_throw(int mult, bool boomerang, OBJECT_IDX shuriken) /* Wear the new stuff */ object_copy(o_ptr, q_ptr); - /* Increase the weight */ p_ptr->total_weight += q_ptr->weight; /* Increment the equip counter by hand */ diff --git a/src/object2.c b/src/object2.c index 22e430f39..326515e4c 100644 --- a/src/object2.c +++ b/src/object2.c @@ -126,7 +126,6 @@ void excise_object_idx(OBJECT_IDX o_idx) POSITION y = j_ptr->iy; POSITION x = j_ptr->ix; - /* Grid */ c_ptr = &cave[y][x]; /* Scan all objects in the grid */ @@ -222,7 +221,6 @@ void delete_object(POSITION y, POSITION x) /* Refuse "illegal" locations */ if (!in_bounds(y, x)) return; - /* Grid */ c_ptr = &cave[y][x]; /* Scan all objects in the grid */ @@ -5291,7 +5289,6 @@ OBJECT_IDX drop_near(object_type *j_ptr, PERCENTAGE chance, POSITION y, POSITION } - /* Grid */ c_ptr = &cave[by][bx]; /* Scan objects in that grid for combination */ @@ -5306,7 +5303,6 @@ OBJECT_IDX drop_near(object_type *j_ptr, PERCENTAGE chance, POSITION y, POSITION /* Check for combination */ if (object_similar(o_ptr, j_ptr)) { - /* Combine the items */ object_absorb(o_ptr, j_ptr); /* Success */ @@ -6004,13 +6000,10 @@ s16b inven_carry(object_type *o_ptr) /* Check if the two items can be combined */ if (object_similar(j_ptr, o_ptr)) { - /* Combine the items */ object_absorb(j_ptr, o_ptr); - /* Increase the weight */ p_ptr->total_weight += (o_ptr->number * o_ptr->weight); p_ptr->update |= (PU_BONUS); - p_ptr->window |= (PW_INVEN); /* Success */ @@ -6080,16 +6073,11 @@ s16b inven_carry(object_type *o_ptr) /* Player touches it, and no longer marked */ j_ptr->marked = OM_TOUCHED; - /* Increase the weight */ p_ptr->total_weight += (j_ptr->number * j_ptr->weight); /* Count the items */ inven_cnt++; - p_ptr->update |= (PU_BONUS); - - /* Combine and Reorder pack */ - p_ptr->update |= (PU_COMBINE | PU_REORDER); - + p_ptr->update |= (PU_BONUS | PU_COMBINE | PU_REORDER); p_ptr->window |= (PW_INVEN); /* Return the slot */ -- 2.11.0