OSDN Git Service

[Refactor] #38997 do_cmd_wiz_summon() に player_type * 引数を追加. / Add player_type *...
authordeskull <deskull@users.sourceforge.jp>
Wed, 20 Nov 2019 02:40:04 +0000 (11:40 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Wed, 20 Nov 2019 02:40:04 +0000 (11:40 +0900)
src/wizard2.c

index bab01b3..cdf2476 100644 (file)
@@ -1409,12 +1409,12 @@ static void do_cmd_wiz_learn(void)
  * @param num 生成処理回数
  * @return なし
  */
-static void do_cmd_wiz_summon(int num)
+static void do_cmd_wiz_summon(player_type *caster_ptr, int num)
 {
        int i;
        for (i = 0; i < num; i++)
        {
-               (void)summon_specific(0, p_ptr->y, p_ptr->x, p_ptr->current_floor_ptr->dun_level, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
+               (void)summon_specific(0, caster_ptr->y, caster_ptr->x, caster_ptr->current_floor_ptr->dun_level, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
        }
 }
 
@@ -1888,7 +1888,7 @@ void do_cmd_debug(player_type *creature_ptr)
        /* Summon Random Monster(s) */
        case 's':
                if (command_arg <= 0) command_arg = 1;
-               do_cmd_wiz_summon(command_arg);
+               do_cmd_wiz_summon(creature_ptr, command_arg);
                break;
 
        /* Special(Random Artifact) Objects */