diff options
author | Jesse Luehrs <doy@tozt.net> | 2014-08-07 00:03:47 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2014-08-07 00:05:14 -0400 |
commit | 708f960817cd97c90d627e83010dde7118cacd08 (patch) | |
tree | a3d8a9a74359e89eb7865119f38649cd41da2484 | |
parent | 0abe53da1a5c1c1b834f67354ffc6514a98e7fe8 (diff) | |
download | crawl-ref-708f960817cd97c90d627e83010dde7118cacd08.tar.gz crawl-ref-708f960817cd97c90d627e83010dde7118cacd08.zip |
also set gold from dump file
-rw-r--r-- | crawl-ref/source/wiz-you.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/crawl-ref/source/wiz-you.cc b/crawl-ref/source/wiz-you.cc index b10b599e8f..ffc9a4d2e4 100644 --- a/crawl-ref/source/wiz-you.cc +++ b/crawl-ref/source/wiz-you.cc @@ -1131,18 +1131,21 @@ static bool _chardump_check_stats3(const vector<string> &tokens) if (size <= 5 || tokens[0] != "Gold") return false; - for (size_t k = 1; k < size; k++) + bool found; + for (size_t k = 0; k < size; k++) { if (tokens[k] == "Dex") { you.base_stats[STAT_DEX] = debug_cap_stat(atoi(tokens[k+1].c_str())); you.redraw_stats.init(true); you.redraw_evasion = true; - return true; + found = true; } + else if (tokens[k] == "Gold") + you.set_gold(atoi(tokens[k+1].c_str())); } - return false; + return found; } static bool _chardump_check_char(const vector<string> &tokens) |