void set_zangband_visited_towns(player_type *creature_ptr);
void set_zangband_quest(player_type *creature_ptr, quest_type *const q_ptr, int loading_quest_index, const QUEST_IDX old_inside_quest);
void set_zangband_class(player_type *creature_ptr);
+void set_zangband_learnt_spells(player_type *creature_ptr);
rd_u32b(&creature_ptr->spell_forgotten2);
if (z_older_than(10, 0, 5))
- set_zangband_spells(creature_ptr);
+ set_zangband_learnt_spells(creature_ptr);
else
rd_s16b(&creature_ptr->learned_spells);
return 21;
}
+static errr load_store(player_type *creature_ptr)
+{
+ u16b tmp16u;
+ rd_u16b(&tmp16u);
+ int town_count = tmp16u;
+ rd_u16b(&tmp16u);
+ for (int i = 1; i < town_count; i++)
+ for (int j = 0; j < tmp16u; j++)
+ if (rd_store(creature_ptr, i, j))
+ return 22;
+
+ return 0;
+}
+
/*!
* @brief セーブファイル読み込み処理の実体 / Actually read the savefile
* @return エラーコード
if (load_inventory_result != 0)
return load_inventory_result;
- u16b tmp16u;
- rd_u16b(&tmp16u);
- int town_count = tmp16u;
- rd_u16b(&tmp16u);
- for (int i = 1; i < town_count; i++)
- for (int j = 0; j < tmp16u; j++)
- if (rd_store(creature_ptr, i, j))
- return 22;
+ errr load_store_result = load_store(creature_ptr);
+ if (load_store_result != 0)
+ return load_store_result;
rd_s16b(&creature_ptr->pet_follow_distance);
byte tmp8u;
rd_byte(&tmp8u);
if (tmp8u)
creature_ptr->pet_extra_flags |= PF_OPEN_DOORS;
+
rd_byte(&tmp8u);
if (tmp8u)
creature_ptr->pet_extra_flags |= PF_PICKUP_ITEMS;