Skip to content
Permalink
Browse files

XEEN: Fix loading Swords blacksmiths

  • Loading branch information
dreammaster committed Apr 16, 2018
1 parent 5cba33c commit cdfe8c89f7671a09a418617d059524b88fff2d4c
Showing with 7 additions and 4 deletions.
  1. +5 −2 engines/xeen/locations.cpp
  2. +1 −1 engines/xeen/locations.h
  3. +1 −1 engines/xeen/scripts.cpp
@@ -2240,9 +2240,12 @@ int PyramidLocation::show() {
LocationManager::LocationManager() : _location(nullptr) {
}

int LocationManager::doAction(LocationAction actionId) {
int LocationManager::doAction(int actionId) {
LocationAction action = (g_vm->getGameID() == GType_Swords && actionId > 13 && actionId < 18) ?
BLACKSMITH : (LocationAction)actionId;

// Create the desired location
switch (actionId) {
switch (action) {
case BANK:
_location = new Locations::BankLocation();
break;
@@ -364,7 +364,7 @@ class LocationManager {
/**
* Show a given location, and return any result
*/
int doAction(LocationAction actionId);
int doAction(int actionId);

/**
* Returns true if a town location (bank, blacksmith, etc.) is currently active
@@ -854,7 +854,7 @@ bool Scripts::cmdSpawn(ParamsIterator &params) {
}

bool Scripts::cmdDoTownEvent(ParamsIterator &params) {
_scriptResult = _vm->_locations->doAction((LocationAction)params.readByte());
_scriptResult = _vm->_locations->doAction(params.readByte());
_vm->_party->_stepped = true;
_refreshIcons = true;

0 comments on commit cdfe8c8

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