• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revision1158788dc4a1ebe2377ef2abd146b7990d55cbd2 (tree)
Time2019-06-27 00:18:29
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

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

Change Summary

Incremental Difference

--- a/src/core.c
+++ b/src/core.c
@@ -2204,7 +2204,7 @@ static void process_world_aux_mutation(void)
22042204 if (one_in_(20))
22052205 {
22062206 msg_print(NULL);
2207- if (one_in_(3)) lose_all_info();
2207+ if (one_in_(3)) lose_all_info(p_ptr);
22082208 else wiz_dark();
22092209 (void)teleport_player_aux(100, TELEPORT_NONMAGICAL | TELEPORT_PASSIVE);
22102210 wiz_dark();
--- a/src/mind.c
+++ b/src/mind.c
@@ -1905,7 +1905,7 @@ void do_cmd_mind(void)
19051905 if (b < 5)
19061906 {
19071907 msg_print(_("なんてこった!頭の中が真っ白になった!", "Oh, no! Your mind has gone blank!"));
1908- lose_all_info();
1908+ lose_all_info(p_ptr);
19091909 }
19101910 else if (b < 15)
19111911 {
--- a/src/mspells4.c
+++ b/src/mspells4.c
@@ -2497,7 +2497,7 @@ void spell_RF6_FORGET(MONSTER_IDX m_idx)
24972497 {
24982498 msg_print(_("しかし効力を跳ね返した!", "You resist the effects!"));
24992499 }
2500- else if (lose_all_info())
2500+ else if (lose_all_info(p_ptr))
25012501 {
25022502 msg_print(_("記憶が薄れてしまった。", "Your memories fade away."));
25032503 }
--- a/src/player-effects.c
+++ b/src/player-effects.c
@@ -3638,7 +3638,7 @@ bool restore_level(player_type *creature_ptr)
36383638 /*
36393639 * Forget everything
36403640 */
3641-bool lose_all_info(void)
3641+bool lose_all_info(player_type *creature_ptr)
36423642 {
36433643 int i;
36443644
@@ -3648,7 +3648,7 @@ bool lose_all_info(void)
36483648 /* Forget info about objects */
36493649 for (i = 0; i < INVEN_TOTAL; i++)
36503650 {
3651- object_type *o_ptr = &p_ptr->inventory_list[i];
3651+ object_type *o_ptr = &creature_ptr->inventory_list[i];
36523652 if (!o_ptr->k_idx) continue;
36533653
36543654 /* Allow "protection" by the MENTAL flag */
@@ -3666,10 +3666,10 @@ bool lose_all_info(void)
36663666 /* Hack -- Clear the "felt" flag */
36673667 o_ptr->ident &= ~(IDENT_SENSE);
36683668 }
3669- p_ptr->update |= (PU_BONUS);
3670- p_ptr->update |= (PU_COMBINE | PU_REORDER);
3669+ creature_ptr->update |= (PU_BONUS);
3670+ creature_ptr->update |= (PU_COMBINE | PU_REORDER);
36713671
3672- p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER);
3672+ creature_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER);
36733673
36743674 /* Mega-Hack -- Forget the map */
36753675 wiz_dark();
--- a/src/player-effects.h
+++ b/src/player-effects.h
@@ -65,7 +65,7 @@ extern bool do_dec_stat(player_type *creature_ptr, int stat);
6565 extern bool do_res_stat(player_type *creature_ptr, int stat);
6666 extern bool do_inc_stat(player_type *creature_ptr, int stat);
6767 extern bool restore_level(player_type *creature_ptr);
68-extern bool lose_all_info(void);
68+extern bool lose_all_info(player_type *creature_ptr);
6969 extern void gain_exp_64(s32b amount, u32b amount_frac);
7070 extern void gain_exp(s32b amount);
7171 extern void calc_android_exp(void);
--- a/src/player-status.c
+++ b/src/player-status.c
@@ -5464,7 +5464,7 @@ void sanity_blast(monster_type *m_ptr, bool necro)
54645464 case 20:
54655465 case 21:
54665466 /* Amnesia */
5467- if (lose_all_info())
5467+ if (lose_all_info(p_ptr))
54685468 msg_print(_("あまりの恐怖に全てのことを忘れてしまった!", "You forget everything in your utmost terror!"));
54695469 break;
54705470 }
--- a/src/spells2.c
+++ b/src/spells2.c
@@ -2619,7 +2619,7 @@ bool activate_ty_curse(bool stop_ty, int *count)
26192619 if (!one_in_(6)) break;
26202620 case 24:
26212621 msg_print(_("ほえ?私は誰?ここで何してる?", "Huh? Who am I? What am I doing here?"));
2622- lose_all_info();
2622+ lose_all_info(p_ptr);
26232623 if (!one_in_(6)) break;
26242624 case 25:
26252625 /*
@@ -3256,7 +3256,7 @@ void wild_magic(int spell)
32563256 apply_disenchant(1);
32573257 break;
32583258 case 31:
3259- lose_all_info();
3259+ lose_all_info(p_ptr);
32603260 break;
32613261 case 32:
32623262 fire_ball(GF_CHAOS, 0, spell + 5, 1 + (spell / 10));
--- a/src/spells3.c
+++ b/src/spells3.c
@@ -3452,7 +3452,7 @@ bool booze(player_type *creature_ptr)
34523452 if (one_in_(13) && (creature_ptr->pclass != CLASS_MONK))
34533453 {
34543454 ident = TRUE;
3455- if (one_in_(3)) lose_all_info();
3455+ if (one_in_(3)) lose_all_info(p_ptr);
34563456 else wiz_dark();
34573457 (void)teleport_player_aux(100, TELEPORT_NONMAGICAL | TELEPORT_PASSIVE);
34583458 wiz_dark();
Show on old repository browser