OSDN Git Service

[Refactor] #38997 do_cmd_wiz_named_friendly(), do_cmd_wiz_named() に player_type ...
authordeskull <deskull@users.sourceforge.jp>
Tue, 5 Nov 2019 15:49:35 +0000 (00:49 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Tue, 5 Nov 2019 15:49:35 +0000 (00:49 +0900)
src/wizard2.c

index 05d3d69..bd6c1f6 100644 (file)
@@ -1428,9 +1428,9 @@ static void do_cmd_wiz_summon(int num)
  * @details
  * This function is rather dangerous
  */
-static void do_cmd_wiz_named(MONRACE_IDX r_idx)
+static void do_cmd_wiz_named(player_type *summoner_ptr, MONRACE_IDX r_idx)
 {
-       (void)summon_named_creature(0, p_ptr->y, p_ptr->x, r_idx, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
+       (void)summon_named_creature(0, summoner_ptr->y, summoner_ptr->x, r_idx, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
 }
 
 
@@ -1442,13 +1442,12 @@ static void do_cmd_wiz_named(MONRACE_IDX r_idx)
  * @details
  * This function is rather dangerous
  */
-static void do_cmd_wiz_named_friendly(MONRACE_IDX r_idx)
+static void do_cmd_wiz_named_friendly(player_type *summoner_ptr, MONRACE_IDX r_idx)
 {
-       (void)summon_named_creature(0, p_ptr->y, p_ptr->x, r_idx, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP | PM_FORCE_PET));
+       (void)summon_named_creature(0, summoner_ptr->y, summoner_ptr->x, r_idx, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP | PM_FORCE_PET));
 }
 
 
-
 /*!
  * @brief プレイヤー近辺の全モンスターを消去する /
  * Hack -- Delete all nearby monsters
@@ -1811,12 +1810,12 @@ void do_cmd_debug(player_type *creature_ptr)
 
        /* Summon _friendly_ named monster */
        case 'N':
-               do_cmd_wiz_named_friendly(command_arg);
+               do_cmd_wiz_named_friendly(creature_ptr, command_arg);
                break;
 
        /* Summon Named Monster */
        case 'n':
-               do_cmd_wiz_named(command_arg);
+               do_cmd_wiz_named(creature_ptr, command_arg);
                break;
 
        /* Dump option bits usage */