summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-17 20:58:44 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-17 20:58:44 +0000
commitc73877b03fca1af04316fe2890f7696bf32559f1 (patch)
tree8a3acf0aa666d0da673b15930f866547f67297ad /crawl-ref/source
parent9833d48b6c55d79ec4d34559312752af532ff968 (diff)
downloadcrawl-ref-c73877b03fca1af04316fe2890f7696bf32559f1.tar.gz
crawl-ref-c73877b03fca1af04316fe2890f7696bf32559f1.zip
Refix food eating issue bug introduced by my previous fix of it.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6590 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/describe.cc1
-rw-r--r--crawl-ref/source/food.cc2
-rw-r--r--crawl-ref/source/itemname.cc2
-rw-r--r--crawl-ref/source/items.cc6
4 files changed, 8 insertions, 3 deletions
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index 9a7692f1e9..b2f4a2d1cb 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -1638,6 +1638,7 @@ std::string get_item_description( const item_def &item, bool verbose,
<< std::dec << "$"
<< "x: " << item.x << " y: " << item.y
<< " link: " << item.link
+ << " slot: " << item.slot
<< " ident_type: "
<< static_cast<int>(get_ident_type(item));
}
diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc
index 8e876e67f7..833ed25dfc 100644
--- a/crawl-ref/source/food.cc
+++ b/crawl-ref/source/food.cc
@@ -1965,7 +1965,7 @@ static int _player_likes_food_type(int type)
return 0;
}
- mprf(MSGCH_ERROR, "Couldn't handle food type: %d");
+ mprf(MSGCH_ERROR, "Couldn't handle food type: %d", type);
return 0;
}
diff --git a/crawl-ref/source/itemname.cc b/crawl-ref/source/itemname.cc
index a8f79190b3..2d02dccdef 100644
--- a/crawl-ref/source/itemname.cc
+++ b/crawl-ref/source/itemname.cc
@@ -2624,6 +2624,8 @@ const std::string menu_colour_item_prefix(const item_def &item, bool temp)
prefixes.push_back("equipped");
if (is_artefact(item))
prefixes.push_back("artefact");
+ break;
+
default:
break;
}
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc
index b47c332ffe..68f4ca08fd 100644
--- a/crawl-ref/source/items.cc
+++ b/crawl-ref/source/items.cc
@@ -2386,7 +2386,9 @@ static bool _find_subtype_by_name(item_def &item,
item.special = 0;
item.flags = 0;
item.quantity = 1;
- set_ident_flags( item, ISFLAG_KNOW_TYPE | ISFLAG_KNOW_PROPERTIES );
+ // Don't use set_ident_flags in order to avoid triggering notes.
+ // FIXME - is this the proper solution?
+ item.flags |= (ISFLAG_KNOW_TYPE | ISFLAG_KNOW_PROPERTIES);
int type_wanted = -1;
@@ -2472,7 +2474,7 @@ bool item_is_equipped(const item_def &item)
if (you.equip[i] == EQ_NONE)
continue;
- item_def& eq(you.inv[you.equip[i]]);
+ const item_def& eq(you.inv[you.equip[i]]);
if (!is_valid_item(eq))
continue;