OSDN Git Service

[Refactor] #38824 get_item() を choose_object() に置換完了。 / Replaced get_item() to choose...
[hengband/hengband.git] / src / spells-summon.c
index 4b1ea0a..550a51f 100644 (file)
@@ -120,19 +120,8 @@ bool cast_summon_greater_demon(void)
        item_tester_hook = item_tester_offer;\r
        q = _("どの死体を捧げますか? ", "Sacrifice which corpse? ");\r
        s = _("捧げられる死体を持っていない。", "You have nothing to scrifice.");\r
-       if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return FALSE;\r
-\r
-       /* Get the item (in the pack) */\r
-       if (item >= 0)\r
-       {\r
-               o_ptr = &inventory[item];\r
-       }\r
-\r
-       /* Get the item (on the floor) */\r
-       else\r
-       {\r
-               o_ptr = &o_list[0 - item];\r
-       }\r
+       o_ptr = choose_object(&item, q, s, (USE_INVEN | USE_FLOOR));\r
+       if (!o_ptr) return FALSE;\r
 \r
        summon_lev = plev * 2 / 3 + r_info[o_ptr->pval].level;\r
 \r