変愚蛮怒のメインリポジトリです
Revision | 0f1a508455d57ff0b2c40182589e9bd8304411fe (tree) |
---|---|
Time | 2019-05-05 11:40:44 |
Author | deskull <deskull@user...> |
Commiter | deskull |
[Refactor] #38997 restrict_monster_to_dungeon() の引数整理.
@@ -831,9 +831,9 @@ static int chameleon_change_m_idx = 0; | ||
831 | 831 | * @param r_idx チェックするモンスター種族ID |
832 | 832 | * @return 召喚条件が一致するならtrue / Return TRUE is the monster is OK and FALSE otherwise |
833 | 833 | */ |
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) | |
835 | 835 | { |
836 | - dungeon_type *d_ptr = &d_info[p_ptr->dungeon_idx]; | |
836 | + dungeon_type *d_ptr = &d_info[d_idx]; | |
837 | 837 | monster_race *r_ptr = &r_info[r_idx]; |
838 | 838 | byte a; |
839 | 839 |
@@ -1069,7 +1069,8 @@ errr get_mon_num_prep(monsterrace_hook_type monster_hook, | ||
1069 | 1069 | /* Accept this monster */ |
1070 | 1070 | entry->prob2 = entry->prob1; |
1071 | 1071 | |
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) | |
1073 | 1074 | { |
1074 | 1075 | int hoge = entry->prob2 * d_info[p_ptr->dungeon_idx].special_div; |
1075 | 1076 | entry->prob2 = hoge / 64; |