OSDN Git Service

鍛冶師のアイテムかどうかの判定にはtval/xtra3の直接指定ではなく, 元々
authornothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Thu, 12 Jun 2003 11:14:04 +0000 (11:14 +0000)
committernothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Thu, 12 Jun 2003 11:14:04 +0000 (11:14 +0000)
object2.cにある関数を使うように変更.

src/cmd6.c
src/externs.h
src/flavor.c
src/load.c
src/object1.c
src/object2.c

index b74cfab..f2336ff 100644 (file)
@@ -5738,7 +5738,7 @@ msg_print("
                return;
        }
 
-       if ((o_ptr->tval > TV_CAPTURE) && (o_ptr->xtra3))
+       if (item_tester_hook_smith(o_ptr))
        {
                switch (o_ptr->xtra3-1)
                {
index 5310ca1..39f3e6f 100644 (file)
@@ -946,6 +946,7 @@ extern void reorder_pack(void);
 extern void display_koff(int k_idx);
 extern object_type *choose_warning_item(void);
 extern bool process_warning(int xx, int yy);
+extern bool item_tester_hook_smith(object_type *o_ptr);
 extern void do_cmd_kaji(bool only_browse);
 
 /* racial.c */
index 99a5977..0b085b9 100644 (file)
@@ -2389,7 +2389,7 @@ void object_desc(char *buf, object_type *o_ptr, int pref, int mode)
        /* while (*s == '~') s++; */
 
 #ifdef JP
-       if ((o_ptr->tval > TV_CAPTURE) && o_ptr->xtra3)
+       if (item_tester_hook_smith(o_ptr))
        {
                t = object_desc_str(t,format("ÃÃÌê»Õ%s¤Î",player_name));
        }
@@ -2534,7 +2534,7 @@ void object_desc(char *buf, object_type *o_ptr, int pref, int mode)
                }
        }
 #else
-       if ((o_ptr->tval > TV_CAPTURE) && o_ptr->xtra3)
+       if (item_tester_hook_smith(o_ptr))
        {
                t = object_desc_str(t,format(" of %s the Smith",player_name));
        }
@@ -2749,7 +2749,7 @@ t = object_desc_str(t, "(
        if (have_flag(flgs, TR_SHOW_MODS)) show_weapon = TRUE;
 
        /* Display the item like a weapon */
-       if ((o_ptr->tval > TV_CAPTURE) && (o_ptr->xtra3 == 1 + ESSENCE_SLAY_GLOVE))
+       if (item_tester_hook_smith(o_ptr) && (o_ptr->xtra3 == 1 + ESSENCE_SLAY_GLOVE))
                show_weapon = TRUE;
 
        /* Display the item like a weapon */
index 0a25318..5070e5f 100644 (file)
@@ -430,7 +430,7 @@ static void rd_item_old(object_type *o_ptr)
                rd_byte(&o_ptr->xtra3);
                if (h_older_than(1, 3, 0, 1))
                {
-                       if (o_ptr->tval > TV_CAPTURE && o_ptr->xtra3 >= 1+96)
+                       if (item_tester_hook_smith(o_ptr) && o_ptr->xtra3 >= 1+96)
                                o_ptr->xtra3 += -96 + MIN_SPECIAL_ESSENCE;
                }
 
index 35372a7..12c9110 100644 (file)
@@ -144,7 +144,7 @@ void object_flags(object_type *o_ptr, u32b flgs[TR_FLAG_SIZE])
        for (i = 0; i < TR_FLAG_SIZE; i++)
                flgs[i] |= o_ptr->art_flags[i];
 
-       if ((o_ptr->tval > TV_CAPTURE) && o_ptr->xtra3)
+       if (item_tester_hook_smith(o_ptr))
        {
                int add = o_ptr->xtra3 - 1;
 
@@ -277,7 +277,7 @@ void object_flags_known(object_type *o_ptr, u32b flgs[TR_FLAG_SIZE])
                        flgs[i] |= o_ptr->art_flags[i];
        }
 
-       if ((o_ptr->tval > TV_CAPTURE) && o_ptr->xtra3)
+       if (item_tester_hook_smith(o_ptr))
        {
                int add = o_ptr->xtra3 - 1;
 
@@ -1877,7 +1877,7 @@ return "
 
        }
 
-       if ((o_ptr->tval > TV_CAPTURE) && o_ptr->xtra3)
+       if (item_tester_hook_smith(o_ptr))
        {
                switch (o_ptr->xtra3 - 1)
                {
index 38be7a4..240dfde 100644 (file)
@@ -8209,7 +8209,7 @@ static void add_essence(int mode)
 }
 
 
-static bool item_tester_hook_kaji(object_type *o_ptr)
+bool item_tester_hook_smith(object_type *o_ptr)
 {
        switch (o_ptr->tval)
        {
@@ -8247,7 +8247,7 @@ static void erase_essence(void)
        char o_name[MAX_NLEN];
        u32b flgs[TR_FLAG_SIZE];
 
-       item_tester_hook = item_tester_hook_kaji;
+       item_tester_hook = item_tester_hook_smith;
 
        /* Get an item */
 #ifdef JP