diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-03-26 16:24:02 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-03-26 16:24:02 +0000 |
commit | 5699e0b53c738196cea517fb8addc9bce952b495 (patch) | |
tree | 2ef1a986b278e0c3278d0af496fe72de0a080c0b /crawl-ref/source | |
parent | 5aff13932a7e9563bb8604e84f86bcfcc0763857 (diff) | |
download | crawl-ref-5699e0b53c738196cea517fb8addc9bce952b495.tar.gz crawl-ref-5699e0b53c738196cea517fb8addc9bce952b495.zip |
Fix 2714466: rods and spellbooks leaking goodness information.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9554 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/makeitem.cc | 3 | ||||
-rw-r--r-- | crawl-ref/source/mon-util.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/religion.cc | 10 |
3 files changed, 10 insertions, 5 deletions
diff --git a/crawl-ref/source/makeitem.cc b/crawl-ref/source/makeitem.cc index fcd502e86c..5ca75012ff 100644 --- a/crawl-ref/source/makeitem.cc +++ b/crawl-ref/source/makeitem.cc @@ -3022,7 +3022,8 @@ static void _give_monster_item(monsters *mon, int thing, { #ifdef DEBUG_DIAGNOSTICS mprf(MSGCH_DIAGNOSTICS, "Destroying %s because %s doesn't want it!", - mthing.name(DESC_PLAIN).c_str(), mon->name(DESC_PLAIN).c_str()); + mthing.name(DESC_PLAIN, false, true).c_str(), + mon->name(DESC_PLAIN, true).c_str()); #endif destroy_item(thing, true); return; diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc index 08dc4be5fa..3738e09ac0 100644 --- a/crawl-ref/source/mon-util.cc +++ b/crawl-ref/source/mon-util.cc @@ -4361,7 +4361,7 @@ bool monsters::pickup(item_def &item, int slot, int near, bool force_merge) } else { - mprf(MSGCH_DIAGNOSTICS, "Items %s thinks it's alread held by " + mprf(MSGCH_DIAGNOSTICS, "Item %s thinks it's already held by " "monster %s.", item.name(DESC_PLAIN, false, true).c_str(), name(DESC_PLAIN, true).c_str()); diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index 17759f78f8..f6da42121e 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -3714,8 +3714,11 @@ bool god_hates_item_handling(const item_def &item) break; } - if (god_hates_spellbook(item) || god_hates_rod(item)) + if (item_type_known(item) + && (god_hates_spellbook(item) || god_hates_rod(item))) + { return (true); + } return (false); } @@ -5032,8 +5035,9 @@ static bool _evil_beings_on_level_attitude_change() && mons_is_evil_or_unholy(monster)) { #ifdef DEBUG_DIAGNOSTICS - mprf(MSGCH_DIAGNOSTICS, "Evil attitude changing: %s on level %d, branch %d", - monster->name(DESC_PLAIN).c_str(), + mprf(MSGCH_DIAGNOSTICS, "Evil attitude changing: %s " + "on level %d, branch %d", + monster->name(DESC_PLAIN, true).c_str(), static_cast<int>(you.your_level), static_cast<int>(you.where_are_you)); #endif |