diff options
author | Bardur Arantsson <bardur@scientician.net> | 2012-03-04 17:47:43 +0100 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2012-03-29 20:41:39 +0200 |
commit | 4d6770696a172bae4ef18a00cb1e59f06e641faf (patch) | |
tree | 6b6475485d731f4ad2a54c84dacfaafec347f8a9 /src/q_one.c | |
parent | 120fed37d8974553e25e5c83ba74c1bb08d71404 (diff) |
Refactor: Remove duplicate code for accessing inventory/floor object
Diffstat (limited to 'src/q_one.c')
-rw-r--r-- | src/q_one.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/q_one.c b/src/q_one.c index 14c5343d..4bfeaf3e 100644 --- a/src/q_one.c +++ b/src/q_one.c @@ -199,17 +199,7 @@ bool_ quest_one_identify_hook(char *fmt) { object_type *o_ptr; - /* Inventory */ - if (item >= 0) - { - o_ptr = &p_ptr->inventory[item]; - } - - /* Floor */ - else - { - o_ptr = &o_list[0 - item]; - } + o_ptr = get_object(item); if ((o_ptr->name1 == ART_POWER) && (!object_known_p(o_ptr))) { |