diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-07-26 09:21:24 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-07-26 09:21:24 +0000 |
commit | cf8b9522f2eb8cb8dcd044816b3f04bf83387f78 (patch) | |
tree | 554b1e0021223ac9b59518a077d7cedd018fa96e /crawl-ref/source/hiscores.cc | |
parent | c42f897ecb019559f3838a8133dd62eadfd73568 (diff) | |
download | crawl-ref-cf8b9522f2eb8cb8dcd044816b3f04bf83387f78.tar.gz crawl-ref-cf8b9522f2eb8cb8dcd044816b3f04bf83387f78.zip |
Record gold found, spent and remaining for tournament banners.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10417 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/hiscores.cc')
-rw-r--r-- | crawl-ref/source/hiscores.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/crawl-ref/source/hiscores.cc b/crawl-ref/source/hiscores.cc index 03180c5b12..1748581bd4 100644 --- a/crawl-ref/source/hiscores.cc +++ b/crawl-ref/source/hiscores.cc @@ -623,6 +623,10 @@ void scorefile_entry::init_with_fields() kills = fields->long_field("kills"); maxed_skills = fields->str_field("maxskills"); + + gold = fields->int_field("gold"); + gold_found = fields->int_field("goldfound"); + gold_spent = fields->int_field("goldspent"); } void scorefile_entry::set_base_xlog_fields() const @@ -689,6 +693,10 @@ void scorefile_entry::set_base_xlog_fields() const fields->add_field("kills", "%ld", kills); if (!maxed_skills.empty()) fields->add_field("maxskills", "%s", maxed_skills.c_str()); + + fields->add_field("gold", "%d", gold); + fields->add_field("goldfound", "%d", gold_found); + fields->add_field("goldspent", "%d", gold_spent); } void scorefile_entry::set_score_fields() const @@ -886,6 +894,9 @@ void scorefile_entry::reset() num_runes = 0; kills = 0L; maxed_skills.clear(); + gold = 0; + gold_found = 0; + gold_spent = 0; } static int _award_modified_experience() @@ -1076,6 +1087,10 @@ void scorefile_entry::init() num_turns = you.num_turns; + gold = you.gold; + gold_found = you.attribute[ATTR_GOLD_FOUND]; + gold_spent = you.attribute[ATTR_PURCHASES]; + #ifdef WIZARD wiz_mode = (you.wizard ? 1 : 0); #else |