OSDN Git Service

[Refactor] #37353 leave_tower_check() to quest.c.
authordeskull <deskull@users.sourceforge.jp>
Wed, 6 Mar 2019 14:36:28 +0000 (23:36 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Wed, 6 Mar 2019 14:36:28 +0000 (23:36 +0900)
src/dungeon.c
src/externs.h
src/quest.c
src/quest.h

index dd15605..b5e83d8 100644 (file)
@@ -1042,28 +1042,6 @@ static void notice_lite_change(object_type *o_ptr)
        }
 }
 
-/*!
- * @brief 「塔」クエストの各階層から離脱する際の処理
- * @return なし
- */
-void leave_tower_check(void)
-{
-       leaving_quest = p_ptr->inside_quest;
-       /* Check for Tower Quest */
-       if (leaving_quest &&
-               (quest[leaving_quest].type == QUEST_TYPE_TOWER) &&
-               (quest[QUEST_TOWER1].status != QUEST_STATUS_COMPLETED))
-       {
-               if(quest[leaving_quest].type == QUEST_TYPE_TOWER)
-               {
-                       quest[QUEST_TOWER1].status = QUEST_STATUS_FAILED;
-                       quest[QUEST_TOWER1].complev = p_ptr->lev;
-                       update_playtime();
-                       quest[QUEST_TOWER1].comptime = current_world_ptr->play_time;
-               }
-       }
-}
-
 
 /*!
  * @brief !!を刻んだ魔道具の時間経過による再充填を知らせる処理 / If player has inscribed the object with "!!", let him know when it's recharged. -LM-
index e8f8f23..c17aa6a 100644 (file)
@@ -553,7 +553,6 @@ extern concptr do_spell(REALM_IDX realm, SPELL_IDX spell, BIT_FLAGS mode);
 extern bool trump_summoning(int num, bool pet, POSITION y, POSITION x, DEPTH lev, int type, BIT_FLAGS mode);
 
 /* dungeon.c */
-extern void leave_tower_check(void);
 extern void extract_option_vars(void);
 extern void determine_bounty_uniques(void);
 extern void determine_today_mon(bool conv_old);
index ea82629..64a68bc 100644 (file)
@@ -480,3 +480,25 @@ void leave_quest_check(void)
                }
        }
 }
+
+/*!
+ * @brief 「塔」クエストの各階層から離脱する際の処理
+ * @return なし
+ */
+void leave_tower_check(void)
+{
+       leaving_quest = p_ptr->inside_quest;
+       /* Check for Tower Quest */
+       if (leaving_quest &&
+               (quest[leaving_quest].type == QUEST_TYPE_TOWER) &&
+               (quest[QUEST_TOWER1].status != QUEST_STATUS_COMPLETED))
+       {
+               if (quest[leaving_quest].type == QUEST_TYPE_TOWER)
+               {
+                       quest[QUEST_TOWER1].status = QUEST_STATUS_FAILED;
+                       quest[QUEST_TOWER1].complev = p_ptr->lev;
+                       update_playtime();
+                       quest[QUEST_TOWER1].comptime = current_world_ptr->play_time;
+               }
+       }
+}
index 8217105..4ce6e2f 100644 (file)
@@ -26,3 +26,4 @@ void quest_discovery(QUEST_IDX q_idx);
 extern QUEST_IDX quest_number(DEPTH level);
 extern QUEST_IDX random_quest_number(DEPTH level);
 extern void leave_quest_check(void);
+extern void leave_tower_check(void);