Skip to content
Permalink
Browse files

XEEN: Clear prior pending treasure when loading savegame

  • Loading branch information
dreammaster committed Apr 14, 2018
1 parent a189f2c commit 7b6dd298e4b1afbe3d58fbe75dd686d78de15ba8
Showing with 12 additions and 0 deletions.
  1. +6 −0 engines/xeen/party.cpp
  2. +5 −0 engines/xeen/party.h
  3. +1 −0 engines/xeen/saves.cpp
@@ -87,6 +87,12 @@ void Treasure::clear() {
}
}

void Treasure::reset() {
clear();
_hasItems = false;
_gold = _gems = 0;
}

/*------------------------------------------------------------------------*/

const int BLACKSMITH_DATA1[4][4] = {
@@ -87,6 +87,11 @@ class Treasure {
* Clears the treasure list
*/
void clear();

/**
* Completely reset the treasure data
*/
void reset();
};

/**
@@ -190,6 +190,7 @@ Common::Error SavesManager::loadGameState(int slot) {

// Reset any combat information from the previous game
combat.reset();
party._treasure.reset();

// Load the new map
map.clearMaze();

0 comments on commit 7b6dd29

Please sign in to comment.
You can’t perform that action at this time.