aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/xeen/locations.cpp7
-rw-r--r--engines/xeen/locations.h2
-rw-r--r--engines/xeen/scripts.cpp2
3 files changed, 7 insertions, 4 deletions
diff --git a/engines/xeen/locations.cpp b/engines/xeen/locations.cpp
index 00e7c0e762..e2359df69c 100644
--- a/engines/xeen/locations.cpp
+++ b/engines/xeen/locations.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;
diff --git a/engines/xeen/locations.h b/engines/xeen/locations.h
index d3b2794732..ad0a8e2cee 100644
--- a/engines/xeen/locations.h
+++ b/engines/xeen/locations.h
@@ -364,7 +364,7 @@ public:
/**
* 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
diff --git a/engines/xeen/scripts.cpp b/engines/xeen/scripts.cpp
index 81ba0caab9..f126a658a2 100644
--- a/engines/xeen/scripts.cpp
+++ b/engines/xeen/scripts.cpp
@@ -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;