OSDN Git Service

[Refactor] #38997 identify_fully() にplayer_type * 引数を追加 / Added player_type * argumen...
authorHourier <hourier@users.sourceforge.jp>
Wed, 8 Jan 2020 13:01:43 +0000 (22:01 +0900)
committerHourier <hourier@users.sourceforge.jp>
Wed, 8 Jan 2020 13:01:43 +0000 (22:01 +0900)
16 files changed:
src/bldg.c
src/cmd/cmd-activate.c
src/cmd/cmd-read.c
src/cmd/cmd-usestaff.c
src/cmd/cmd-zaprod.c
src/racial.c
src/realm-craft.c
src/realm-death.c
src/realm-hissatsu.c
src/realm-life.c
src/realm-nature.c
src/realm-sorcery.c
src/realm-trump.c
src/spells.h
src/spells3.c
src/wizard2.c

index 9701eab..1b628dd 100644 (file)
@@ -3890,7 +3890,7 @@ static void bldg_process_command(player_type *player_ptr, building_type *bldg, i
                /* Do nothing */
                break;
        case BACT_RESEARCH_ITEM:
-               paid = identify_fully(FALSE);
+               paid = identify_fully(player_ptr, FALSE);
                break;
        case BACT_TOWN_HISTORY:
                town_history();
index 8bdfc20..e76347d 100644 (file)
@@ -1462,14 +1462,14 @@ bool activate_artifact(player_type *user_ptr, object_type *o_ptr)
                msg_print(_("明るく輝いている...", "It glows brightly..."));
                detect_all(user_ptr, DETECT_RAD_DEFAULT);
                probing(user_ptr);
-               identify_fully(FALSE);
+               identify_fully(user_ptr, FALSE);
                break;
        }
 
        case ACT_ID_FULL:
        {
                msg_print(_("黄色く輝いている...", "It glows yellow..."));
-               identify_fully(FALSE);
+               identify_fully(user_ptr, FALSE);
                break;
        }
 
index 5520503..4669e41 100644 (file)
@@ -203,7 +203,7 @@ void exe_read(player_type *creature_ptr, INVENTORY_IDX item, bool known)
 
                case SV_SCROLL_STAR_IDENTIFY:
                {
-                       if (!identify_fully(FALSE)) used_up = FALSE;
+                       if (!identify_fully(creature_ptr, FALSE)) used_up = FALSE;
                        ident = TRUE;
                        break;
                }
index 0516095..e496bc2 100644 (file)
@@ -83,7 +83,7 @@ int staff_effect(player_type *creature_ptr, OBJECT_SUBTYPE_VALUE sval, bool *use
                case SV_STAFF_IDENTIFY:
                {
                        if (powerful) {
-                               if (!identify_fully(FALSE)) *use_charge = FALSE;
+                               if (!identify_fully(creature_ptr, FALSE)) *use_charge = FALSE;
                        }
                        else {
                                if (!ident_spell(creature_ptr, FALSE)) *use_charge = FALSE;
index 4241a52..5306a2b 100644 (file)
@@ -55,7 +55,7 @@ int rod_effect(player_type *creature_ptr, OBJECT_SUBTYPE_VALUE sval, DIRECTION d
        case SV_ROD_IDENTIFY:
        {
                if (powerful) {
-                       if (!identify_fully(FALSE)) *use_charge = FALSE;
+                       if (!identify_fully(creature_ptr, FALSE)) *use_charge = FALSE;
                }
                else {
                        if (!ident_spell(creature_ptr, FALSE)) *use_charge = FALSE;
index 5726b29..32e7fb6 100644 (file)
@@ -501,7 +501,7 @@ static bool exe_racial_power(player_type *creature_ptr, s32b command)
                        }
                        else if (command == -4)
                        {
-                               if (!identify_fully(FALSE)) return FALSE;
+                               if (!identify_fully(creature_ptr, FALSE)) return FALSE;
                        }
                        break;
                }
@@ -602,7 +602,7 @@ static bool exe_racial_power(player_type *creature_ptr, s32b command)
                {
                        if (creature_ptr->lev > 29)
                        {
-                               if (!identify_fully(TRUE)) return FALSE;
+                               if (!identify_fully(creature_ptr, TRUE)) return FALSE;
                        }
                        else
                        {
index 7bc94d5..335c2ec 100644 (file)
@@ -439,7 +439,7 @@ concptr do_craft_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode)
                {
                        if (cast)
                        {
-                               if (!identify_fully(FALSE)) return NULL;
+                               if (!identify_fully(caster_ptr, FALSE)) return NULL;
                        }
                }
                break;
index 0a14fc1..9223dd6 100644 (file)
@@ -546,7 +546,7 @@ concptr do_death_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode)
                                }
                                else
                                {
-                                       if (!identify_fully(FALSE)) return NULL;
+                                       if (!identify_fully(caster_ptr, FALSE)) return NULL;
                                }
                        }
                }
index a6ee702..69ee1ad 100644 (file)
@@ -348,7 +348,7 @@ concptr do_hissatsu_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mo
                {
                        if (plev > 44)
                        {
-                               if (!identify_fully(TRUE)) return NULL;
+                               if (!identify_fully(caster_ptr, TRUE)) return NULL;
                        }
                        else
                        {
index 8af69d5..7e5863e 100644 (file)
@@ -455,7 +455,7 @@ concptr do_life_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode)
                {
                        if (cast)
                        {
-                               if (!identify_fully(FALSE)) return NULL;
+                               if (!identify_fully(caster_ptr, FALSE)) return NULL;
                        }
                }
                break;
index 905c54a..03a100c 100644 (file)
@@ -402,7 +402,7 @@ concptr do_nature_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode
                {
                        if (cast)
                        {
-                               if (!identify_fully(FALSE)) return NULL;
+                               if (!identify_fully(caster_ptr, FALSE)) return NULL;
                        }
                }
                break;
index 4bb1283..88fae4d 100644 (file)
@@ -287,7 +287,7 @@ concptr do_sorcery_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mod
                {
                        if (cast)
                        {
-                               if (!identify_fully(FALSE)) return NULL;
+                               if (!identify_fully(caster_ptr, FALSE)) return NULL;
                        }
                }
                break;
index ae49d07..14b41fe 100644 (file)
@@ -498,7 +498,7 @@ concptr do_trump_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode)
                {
                        if (cast)
                        {
-                               if (!identify_fully(FALSE)) return NULL;
+                               if (!identify_fully(caster_ptr, FALSE)) return NULL;
                        }
                }
                break;
index 7d6ceab..207ebc4 100644 (file)
@@ -307,7 +307,7 @@ extern bool artifact_scroll(player_type *caster_ptr);
 extern bool ident_spell(player_type *caster_ptr, bool only_equip);
 extern bool mundane_spell(player_type *ownner_ptr, bool only_equip);
 extern bool identify_item(player_type *owner_ptr, object_type *o_ptr);
-extern bool identify_fully(bool only_equip);
+extern bool identify_fully(player_type *caster_ptr, bool only_equip);
 extern bool recharge(player_type *caster_ptr, int power);
 extern void display_spell_list(player_type *caster_ptr);
 extern EXP experience_of_spell(player_type *caster_ptr, SPELL_IDX spell, REALM_IDX use_realm);
index ce5c5f2..1f0232e 100644 (file)
@@ -1862,7 +1862,7 @@ bool mundane_spell(player_type *owner_ptr, bool only_equip)
  * Fully "identify" an object in the inventory -BEN-
  * This routine returns TRUE if an item was identified.
  */
-bool identify_fully(bool only_equip)
+bool identify_fully(player_type *caster_ptr, bool only_equip)
 {
        OBJECT_IDX item;
        object_type *o_ptr;
@@ -1891,10 +1891,10 @@ bool identify_fully(bool only_equip)
 
        s = _("*鑑定*するべきアイテムがない。", "You have nothing to *identify*.");
 
-       o_ptr = choose_object(p_ptr, &item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR | IGNORE_BOTHHAND_SLOT), 0);
+       o_ptr = choose_object(caster_ptr, &item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR | IGNORE_BOTHHAND_SLOT), 0);
        if (!o_ptr) return (FALSE);
 
-       old_known = identify_item(p_ptr, o_ptr);
+       old_known = identify_item(caster_ptr, o_ptr);
 
        /* Mark the item as fully known */
        o_ptr->ident |= (IDENT_MENTAL);
index cbd7295..2f5afec 100644 (file)
@@ -1788,7 +1788,7 @@ void do_cmd_debug(player_type *creature_ptr)
 
                /* View item info */
        case 'f':
-               identify_fully(FALSE);
+               identify_fully(creature_ptr, FALSE);
                break;
 
                /* Create desired feature */