• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revisiona158b4ba495d23d53f537f11828cd78c847bc44e (tree)
Time2020-01-04 17:16:06
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

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

Change Summary

Incremental Difference

--- a/src/realm-nature.c
+++ b/src/realm-nature.c
@@ -424,7 +424,7 @@ concptr do_nature_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode
424424 {
425425 if (cast)
426426 {
427- if (!rustproof()) return NULL;
427+ if (!rustproof(caster_ptr)) return NULL;
428428 }
429429 }
430430 break;
--- a/src/spells-object.c
+++ b/src/spells-object.c
@@ -700,7 +700,7 @@ bool curse_weapon(bool force, int slot)
700700 * @brief 防具の錆止め防止処理
701701 * @return ターン消費を要する処理を行ったならばTRUEを返す
702702 */
703-bool rustproof(void)
703+bool rustproof(player_type *caster_ptr)
704704 {
705705 OBJECT_IDX item;
706706 object_type *o_ptr;
@@ -713,7 +713,7 @@ bool rustproof(void)
713713 q = _("どの防具に錆止めをしますか?", "Rustproof which piece of armour? ");
714714 s = _("錆止めできるものがありません。", "You have nothing to rustproof.");
715715
716- o_ptr = choose_object(p_ptr, &item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR | IGNORE_BOTHHAND_SLOT), 0);
716+ o_ptr = choose_object(caster_ptr, &item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR | IGNORE_BOTHHAND_SLOT), 0);
717717 if (!o_ptr) return FALSE;
718718
719719 object_desc(o_name, o_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));
@@ -737,7 +737,7 @@ bool rustproof(void)
737737 msg_format("%s %s %s now protected against corrosion.", ((item >= 0) ? "Your" : "The"), o_name, ((o_ptr->number > 1) ? "are" : "is"));
738738 #endif
739739
740- calc_android_exp(p_ptr);
740+ calc_android_exp(caster_ptr);
741741 return TRUE;
742742 }
743743
--- a/src/spells-object.h
+++ b/src/spells-object.h
@@ -8,7 +8,7 @@ extern void acquire_chaos_weapon(player_type *creature_ptr);
88 extern bool curse_armor(player_type *owner_ptr);
99 extern bool curse_weapon_object(player_type *creature_ptr, bool force, object_type *o_ptr);
1010 extern bool curse_weapon(bool force, int slot);
11-extern bool rustproof(void);
11+extern bool rustproof(player_type *caster_ptr);
1212 extern bool brand_bolts(void);
1313 extern bool perilous_secrets(player_type *user_ptr);
1414 extern void get_bloody_moon_flags(object_type *o_ptr);
Show on old repository browser