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/store.c | |
parent | 120fed37d8974553e25e5c83ba74c1bb08d71404 (diff) |
Refactor: Remove duplicate code for accessing inventory/floor object
Diffstat (limited to 'src/store.c')
-rw-r--r-- | src/store.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/store.c b/src/store.c index 979c955a..78120846 100644 --- a/src/store.c +++ b/src/store.c @@ -2968,18 +2968,8 @@ void store_sell(void) } if (!get_item(&item, q, s, (USE_EQUIP | USE_INVEN))) return; - /* Get the item (in the pack) */ - if (item >= 0) - { - o_ptr = &p_ptr->inventory[item]; - } - - /* Get the item (on the floor) */ - else - { - o_ptr = &o_list[0 - item]; - } - + /* Get the item */ + o_ptr = get_object(item); object_flags(o_ptr, &f1, &f2, &f3, &f4, &f5, &esp); |