• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revisiona48f5e3ddf4dbff40844e78101081b44a86d15bb (tree)
Time2019-06-20 21:32:44
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #38997 do_cmd_open_chest() に player_type * 引数を追加.

Change Summary

Incremental Difference

--- a/src/cmd-basic.c
+++ b/src/cmd-basic.c
@@ -552,14 +552,14 @@ static OBJECT_IDX chest_check(POSITION y, POSITION x, bool trapped)
552552 * @details
553553 * Assume there is no monster blocking the destination
554554 */
555-static bool do_cmd_open_chest(POSITION y, POSITION x, OBJECT_IDX o_idx)
555+static bool do_cmd_open_chest(player_type *creature_ptr, POSITION y, POSITION x, OBJECT_IDX o_idx)
556556 {
557557 int i, j;
558558 bool flag = TRUE;
559559 bool more = FALSE;
560560 object_type *o_ptr = &current_floor_ptr->o_list[o_idx];
561561
562- take_turn(p_ptr, 100);
562+ take_turn(creature_ptr, 100);
563563
564564 /* Attempt to unlock it */
565565 if (o_ptr->pval > 0)
@@ -568,11 +568,11 @@ static bool do_cmd_open_chest(POSITION y, POSITION x, OBJECT_IDX o_idx)
568568 flag = FALSE;
569569
570570 /* Get the "disarm" factor */
571- i = p_ptr->skill_dis;
571+ i = creature_ptr->skill_dis;
572572
573573 /* Penalize some conditions */
574- if (p_ptr->blind || no_lite()) i = i / 10;
575- if (p_ptr->confused || p_ptr->image) i = i / 10;
574+ if (creature_ptr->blind || no_lite()) i = i / 10;
575+ if (creature_ptr->confused || creature_ptr->image) i = i / 10;
576576
577577 /* Extract the difficulty */
578578 j = i - o_ptr->pval;
@@ -890,7 +890,7 @@ void do_cmd_open(player_type *creature_ptr)
890890 }
891891 else if (o_idx)
892892 {
893- more = do_cmd_open_chest(y, x, o_idx);
893+ more = do_cmd_open_chest(creature_ptr, y, x, o_idx);
894894 }
895895 else
896896 {
Show on old repository browser