summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells2.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-20 21:40:08 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-20 21:40:08 +0000
commitbe9f773b92d011e6cb8a1bdfa72ae323807b8468 (patch)
tree53ed40f27f2e4ddbb6ea3457af9439c4b51d6c80 /crawl-ref/source/spells2.cc
parentb632d87fcd548863d67ce4ac10d50e2ea08384ff (diff)
downloadcrawl-ref-be9f773b92d011e6cb8a1bdfa72ae323807b8468.tar.gz
crawl-ref-be9f773b92d011e6cb8a1bdfa72ae323807b8468.zip
Avoid cluttering the recovery channel when restoring stats.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4419 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells2.cc')
-rw-r--r--crawl-ref/source/spells2.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc
index 783f4a92e6..ee976ad7e5 100644
--- a/crawl-ref/source/spells2.cc
+++ b/crawl-ref/source/spells2.cc
@@ -690,10 +690,11 @@ bool brand_weapon(brand_type which_brand, int power)
} // end brand_weapon()
// Restore the stat in which_stat by the amount in stat_gain, displaying
-// a message if suppress_msg is false. If stat_gain is 0, restore the
-// stat completely.
+// a message if suppress_msg is false, and doing so in the recovery
+// channel if recovery is true. If stat_gain is 0, restore the stat
+// completely.
bool restore_stat(unsigned char which_stat, unsigned char stat_gain,
- bool suppress_msg)
+ bool suppress_msg, bool recovery)
{
bool stat_restored = false;
@@ -750,7 +751,7 @@ bool restore_stat(unsigned char which_stat, unsigned char stat_gain,
{
msg += " returning.";
if ( !suppress_msg )
- mpr(msg.c_str(), MSGCH_RECOVERY);
+ mpr(msg.c_str(), (recovery) ? MSGCH_RECOVERY : MSGCH_PLAIN);
if (stat_gain == 0 || *ptr_stat + stat_gain > *ptr_stat_max)
stat_gain = *ptr_stat_max - *ptr_stat;