• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revision0f1a508455d57ff0b2c40182589e9bd8304411fe (tree)
Time2019-05-05 11:40:44
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #38997 restrict_monster_to_dungeon() の引数整理.

Change Summary

Incremental Difference

--- a/src/monster2.c
+++ b/src/monster2.c
@@ -831,9 +831,9 @@ static int chameleon_change_m_idx = 0;
831831 * @param r_idx チェックするモンスター種族ID
832832 * @return 召喚条件が一致するならtrue / Return TRUE is the monster is OK and FALSE otherwise
833833 */
834-static bool restrict_monster_to_dungeon(MONRACE_IDX r_idx)
834+static bool restrict_monster_to_dungeon(DUNGEON_IDX d_idx, MONRACE_IDX r_idx)
835835 {
836- dungeon_type *d_ptr = &d_info[p_ptr->dungeon_idx];
836+ dungeon_type *d_ptr = &d_info[d_idx];
837837 monster_race *r_ptr = &r_info[r_idx];
838838 byte a;
839839
@@ -1069,7 +1069,8 @@ errr get_mon_num_prep(monsterrace_hook_type monster_hook,
10691069 /* Accept this monster */
10701070 entry->prob2 = entry->prob1;
10711071
1072- if (current_floor_ptr->dun_level && (!p_ptr->inside_quest || is_fixed_quest_idx(p_ptr->inside_quest)) && !restrict_monster_to_dungeon(entry->index) && !p_ptr->inside_battle)
1072+ if (current_floor_ptr->dun_level && (!p_ptr->inside_quest || is_fixed_quest_idx(p_ptr->inside_quest)) &&
1073+ !restrict_monster_to_dungeon(p_ptr->dungeon_idx, entry->index) && !p_ptr->inside_battle)
10731074 {
10741075 int hoge = entry->prob2 * d_info[p_ptr->dungeon_idx].special_div;
10751076 entry->prob2 = hoge / 64;
Show on old repository browser