summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/main.cc
diff options
context:
space:
mode:
authorChris Campbell <chriscampbell89@gmail.com>2014-05-19 00:32:54 +0100
committerChris Campbell <chriscampbell89@gmail.com>2014-05-19 01:05:37 +0100
commit19692ce2669c42a46a4831debd04b2cda9bf1356 (patch)
tree3cd15b5f488492f4283e7f3577ebed2201f64664 /crawl-ref/source/main.cc
parentddce04797bb75fef9909ccdea3b5818c9a4b6a44 (diff)
downloadcrawl-ref-19692ce2669c42a46a4831debd04b2cda9bf1356.tar.gz
crawl-ref-19692ce2669c42a46a4831debd04b2cda9bf1356.zip
Ignore gold from transferred saves when calculating Gozag's fee (#8567)
Fixes some saves taking a huge time to load or being completely unloadable when trying to recalculate Gozag's service fee by counting all the gold on every saved level.
Diffstat (limited to 'crawl-ref/source/main.cc')
-rw-r--r--crawl-ref/source/main.cc42
1 files changed, 0 insertions, 42 deletions
diff --git a/crawl-ref/source/main.cc b/crawl-ref/source/main.cc
index b2b61c16a6..b68e045c31 100644
--- a/crawl-ref/source/main.cc
+++ b/crawl-ref/source/main.cc
@@ -229,7 +229,6 @@ static void _god_greeting_message(bool game_start);
static void _take_starting_note();
static void _startup_hints_mode();
static void _set_removed_types_as_identified();
-static void _count_all_gold();
static void _compile_time_asserts();
@@ -419,7 +418,6 @@ NORETURN static void _launch_game()
init_hints_options();
_set_removed_types_as_identified();
- _count_all_gold();
if (!game_start && you.prev_save_version != Version::Long)
{
@@ -671,46 +669,6 @@ static void _set_removed_types_as_identified()
you.type_ids[OBJ_POTIONS][POT_SLOWING] = ID_KNOWN_TYPE;
}
-// Count gold generated on all levels.
-// Needed for calculating Gozag's service fee.
-static void _count_all_gold()
-{
- if (crawl_state.game_is_arena() || you.attribute[ATTR_GOLD_GENERATED] > 0)
- return;
-
- vector<PlaceInfo> list = you.get_all_place_info(true, false);
- for (unsigned int i = 0; i < list.size(); i++)
- {
- for (int j = 1; j <= brdepth[list[i].branch]; j++)
- {
- level_id lid(list[i].branch, j);
- if (is_existing_level(lid))
- {
- level_excursion le;
- le.go_to(lid);
- for (rectangle_iterator ri(0); ri; ++ri)
- {
- for (stack_iterator k(*ri); k; ++k)
- {
- if (k->base_type != OBJ_GOLD)
- continue;
-
- you.attribute[ATTR_GOLD_GENERATED] += k->quantity;
- }
- if (monster* mons = monster_at(*ri))
- {
- if (mons->inv[MSLOT_GOLD] != NON_ITEM)
- {
- you.attribute[ATTR_GOLD_GENERATED]
- += mitm[mons->inv[MSLOT_GOLD]].quantity;
- }
- }
- }
- }
- }
- }
-}
-
#ifdef WIZARD
static void _do_wizard_command(int wiz_command, bool silent_fail)
{