• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revision4a8966def4338989cb0e911af30b9c3bda411f16 (tree)
Time2019-07-02 23:34:59
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

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

Change Summary

Incremental Difference

--- a/src/avatar.c
+++ b/src/avatar.c
@@ -53,11 +53,11 @@ concptr virtue[MAX_VIRTUE] =
5353 * @return 比較の真偽値を返す
5454 * @todo 引数名を直しておく
5555 */
56-bool compare_virtue(int type, int num, int tekitou)
56+bool compare_virtue(player_type *creature_ptr, int type, int num, int tekitou)
5757 {
5858 int vir;
59- if (virtue_number(p_ptr, type))
60- vir = p_ptr->virtues[virtue_number(p_ptr, type) - 1];
59+ if (virtue_number(creature_ptr, type))
60+ vir = creature_ptr->virtues[virtue_number(creature_ptr, type) - 1];
6161 else
6262 vir = 0;
6363
--- a/src/avatar.h
+++ b/src/avatar.h
@@ -22,7 +22,7 @@
2222
2323 #define VIRTUE_LARGE 1
2424 #define VIRTUE_SMALL 2
25-extern bool compare_virtue(int type, int num, int tekitou);
25+extern bool compare_virtue(player_type *creature_ptr, int type, int num, int tekitou);
2626 extern int virtue_number(player_type *creature_ptr, int type);
2727 extern concptr virtue[MAX_VIRTUE];
2828 extern void get_virtues(player_type *creature_ptr);
--- a/src/core.c
+++ b/src/core.c
@@ -426,7 +426,7 @@ static void sense_inventory1(void)
426426 }
427427 }
428428
429- if (compare_virtue(V_KNOWLEDGE, 100, VIRTUE_LARGE)) heavy = TRUE;
429+ if (compare_virtue(p_ptr, V_KNOWLEDGE, 100, VIRTUE_LARGE)) heavy = TRUE;
430430
431431 /*** Sense everything ***/
432432
Show on old repository browser