summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/externs.h
diff options
context:
space:
mode:
authorennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573>2009-04-18 15:08:40 +0000
committerennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573>2009-04-18 15:08:40 +0000
commit4f56baa35df811304ef3e45c83471fcfd43bce2c (patch)
tree32443c8d02e82c16a5e8f1153e3ce194e9b8f02b /crawl-ref/source/externs.h
parent92a70a7bda3d5a52fd6cc016b748e6bf59fb81e4 (diff)
downloadcrawl-ref-4f56baa35df811304ef3e45c83471fcfd43bce2c.tar.gz
crawl-ref-4f56baa35df811304ef3e45c83471fcfd43bce2c.zip
[2758242] Fixing segfault during debug_mons_scan due to an mprf not matching its format string with its var args. Also, fixing clone function from chaos brand that was causing this where cloned items in monster inventories weren't setting their link to be part of the new monster's inventory. Refactoring monster holding functions into item_def, where they probably should be.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9618 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/externs.h')
-rw-r--r--crawl-ref/source/externs.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h
index 0e773c455f..e94cc0c68c 100644
--- a/crawl-ref/source/externs.h
+++ b/crawl-ref/source/externs.h
@@ -620,6 +620,16 @@ public:
{
*this = item_def();
}
+
+ // Sets this item as being held by a given monster.
+ void set_holding_monster(int midx);
+
+ // Returns monster holding this item. NULL if none.
+ monsters* holding_monster() const;
+
+ // Returns true if a monster is holding this item.
+ bool held_by_monster() const;
+
private:
std::string name_aux(description_level_type desc,
bool terse, bool ident,