OSDN Git Service

ランダムクエスト中にパターンvaultでテレポートした時に落ちていたのを修正。
authormogami <mogami@0568b783-4c39-0410-ac80-bf13821ea2a2>
Fri, 28 Jun 2002 11:28:11 +0000 (11:28 +0000)
committermogami <mogami@0568b783-4c39-0410-ac80-bf13821ea2a2>
Fri, 28 Jun 2002 11:28:11 +0000 (11:28 +0000)
src/cmd4.c
src/defines.h
src/dungeon.c

index b265409..ab7b9c4 100644 (file)
@@ -583,6 +583,29 @@ errr do_cmd_write_nikki(int type, int num, cptr note)
 #endif
                        break;
                }
+               case NIKKI_PAT_TELE:
+               {
+                       cptr to;
+                       if (!dun_level)
+#ifdef JP
+                               to = "ÃϾå";
+#else
+                               to = "the surface";
+#endif
+                       else
+#ifdef JP
+                               to = format("%d³¬(%s)", dun_level, d_name+d_info[dungeon_type].name);
+#else
+                               to = format("level %d of %s", dun_level, d_name+d_info[dungeon_type].name);
+#endif
+                               
+#ifdef JP
+                       fprintf(fff, " %2d:%02d %20s %s¤Ø¤È¥Ñ¥¿¡¼¥ó¤ÎÎϤǰÜÆ°¤·¤¿¡£\n", hour, min, note_level, to);
+#else
+                       fprintf(fff, " %2d:%02d %20s use Pattern to teleport to %s.\n", hour, min, note_level, to);
+#endif
+                       break;
+               }
                case NIKKI_LEVELUP:
                {
 #ifdef JP
index 1321a9d..ef25692 100644 (file)
@@ -4377,6 +4377,7 @@ extern int PlayerUID;
 #define NIKKI_GAMESTART   19
 #define NIKKI_WIZ_TELE    20
 #define NIKKI_NAMED_PET   21
+#define NIKKI_PAT_TELE    22
 
 #define MAX_MANE 16
 #define MAX_MONSPELLS 96
index c2702a8..e60a951 100644 (file)
@@ -672,6 +672,14 @@ msg_format("%d 
        /* Change level */
        dun_level = command_arg;
 
+       leave_quest_check();
+
+       if (record_stair) do_cmd_write_nikki(NIKKI_PAT_TELE,0,NULL);
+
+       p_ptr->inside_quest = 0;
+       p_ptr->leftbldg = FALSE;
+       energy_use = 0;
+
        /* Leaving */
        p_ptr->leaving = TRUE;
 }