OSDN Git Service

[Refactor] #1752 Replaced arrays in initial-equipments-table.h to vector
authorHourier <66951241+Hourier@users.noreply.github.com>
Tue, 5 Oct 2021 13:32:17 +0000 (22:32 +0900)
committerHourier <66951241+Hourier@users.noreply.github.com>
Tue, 12 Oct 2021 13:13:54 +0000 (22:13 +0900)
src/birth/initial-equipments-table.cpp
src/birth/inventory-initializer.cpp

index ef94122..db13fb7 100644 (file)
 constexpr byte FIRST_BOOK = 0;
 
 /*!
- * プレイヤーの職業毎の初期装備テーブル。/\n
- * Each player starts out with a few items, given as tval/sval pairs.\n
- * In addition, he always has some food and a few torches.\n
+ * @brief プレイヤーの職業毎の初期装備テーブル.
+ * @details
+ * 全ての職業が冒険開始時に3つのアイテムを持っている.
+ * そのtval/svalを記したリスト.
  */
 std::vector<std::vector<std::tuple<ItemKindType, byte>>> player_init = {
     {
index f0ec245..e02e40a 100644 (file)
@@ -232,6 +232,8 @@ void player_outfit(player_type *player_ptr)
         add_outfit(player_ptr, q_ptr);
     }
 
+    // @todo 本来read-onlyであるべきプリセットテーブルを書き換えている. 良くないパターン.
+    // 「状況によって特別に持たせたいアイテム」は別途定義すべき.
     if (player_ptr->pclass != CLASS_SORCERER) {
         if (player_ptr->ppersonality == PERSONALITY_SEXY) {
             player_init[player_ptr->pclass][2] = std::make_tuple(ItemKindType::HAFTED, SV_WHIP);