• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

変愚蛮怒のメインリポジトリです


Commit MetaInfo

Revisione502742a7dc39800ddccb9e09a1f226324dfa331 (tree)
Time2019-08-29 23:47:32
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #38997 do_cmd_refill_lamp() に player_type * 引数を追加. / Add player_type * argument to do_cmd_refill_lamp().

Change Summary

Incremental Difference

--- a/src/cmd/cmd-item.c
+++ b/src/cmd/cmd-item.c
@@ -923,7 +923,7 @@ void do_cmd_inscribe(player_type *creature_ptr)
923923 * Refill the players lamp (from the pack or floor)
924924 * @return なし
925925 */
926-static void do_cmd_refill_lamp(void)
926+static void do_cmd_refill_lamp(player_type *user_ptr)
927927 {
928928 OBJECT_IDX item;
929929 object_type *o_ptr;
@@ -936,13 +936,13 @@ static void do_cmd_refill_lamp(void)
936936 q = _("どの油つぼから注ぎますか? ", "Refill with which flask? ");
937937 s = _("油つぼがない。", "You have no flasks of oil.");
938938
939- o_ptr = choose_object(p_ptr, &item, q, s, (USE_INVEN | USE_FLOOR), 0);
939+ o_ptr = choose_object(user_ptr, &item, q, s, (USE_INVEN | USE_FLOOR), 0);
940940 if (!o_ptr) return;
941941
942- take_turn(p_ptr, 50);
942+ take_turn(user_ptr, 50);
943943
944944 /* Access the lantern */
945- j_ptr = &p_ptr->inventory_list[INVEN_LITE];
945+ j_ptr = &user_ptr->inventory_list[INVEN_LITE];
946946
947947 /* Refuel */
948948 j_ptr->xtra4 += o_ptr->xtra4;
@@ -980,7 +980,7 @@ static void do_cmd_refill_lamp(void)
980980 floor_item_optimize(0 - item);
981981 }
982982
983- p_ptr->update |= (PU_TORCH);
983+ user_ptr->update |= (PU_TORCH);
984984 }
985985
986986 /*!
@@ -1085,7 +1085,7 @@ void do_cmd_refill(player_type *creature_ptr)
10851085 /* It's a lamp */
10861086 else if (o_ptr->sval == SV_LITE_LANTERN)
10871087 {
1088- do_cmd_refill_lamp();
1088+ do_cmd_refill_lamp(creature_ptr);
10891089 }
10901090
10911091 /* It's a torch */
Show on old repository browser