From be9f773b92d011e6cb8a1bdfa72ae323807b8468 Mon Sep 17 00:00:00 2001 From: dolorous Date: Sun, 20 Apr 2008 21:40:08 +0000 Subject: 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 --- crawl-ref/source/spells2.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'crawl-ref/source/spells2.cc') 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; -- cgit v1.2.3-54-g00ecf