Permalink
Browse files
XEEN: Fix loading Swords blacksmiths
- Loading branch information
Showing
with
7 additions
and
4 deletions.
-
+5
−2
engines/xeen/locations.cpp
-
+1
−1
engines/xeen/locations.h
-
+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 ¶ms) { |
|
|
} |
|
|
|
|
|
bool Scripts::cmdDoTownEvent(ParamsIterator ¶ms) { |
|
|
_scriptResult = _vm->_locations->doAction((LocationAction)params.readByte()); |
|
|
_scriptResult = _vm->_locations->doAction(params.readByte()); |
|
|
_vm->_party->_stepped = true; |
|
|
_refreshIcons = true; |
|
|
|
|
|
|