aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk/riven_card.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/mohawk/riven_card.cpp')
-rw-r--r--engines/mohawk/riven_card.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/engines/mohawk/riven_card.cpp b/engines/mohawk/riven_card.cpp
index f387bc450b..d3166f31fc 100644
--- a/engines/mohawk/riven_card.cpp
+++ b/engines/mohawk/riven_card.cpp
@@ -66,7 +66,7 @@ void RivenCard::loadCardResource(uint16 id) {
// Apply script patches for this card
uint32 globalId = _vm->getStack()->getCardGlobalId(id);
for (uint i = 0; i < _scripts.size(); i++) {
- _scripts[i].script->applyCardPatches(_vm, globalId, _scripts[i].type);
+ _scripts[i].script->applyCardPatches(_vm, globalId, _scripts[i].type, 0xFFFF);
}
delete inStream;
@@ -252,8 +252,10 @@ void RivenCard::loadHotspots(uint16 id) {
uint16 hotspotCount = inStream->readUint16BE();
_hotspots.resize(hotspotCount);
+ uint32 globalId = _vm->getStack()->getCardGlobalId(id);
for (uint16 i = 0; i < hotspotCount; i++) {
_hotspots[i] = new RivenHotspot(_vm, inStream);
+ _hotspots[i]->applyScriptPatches(globalId);
}
delete inStream;
@@ -642,6 +644,13 @@ RivenScriptPtr RivenHotspot::getScript(uint16 scriptType) const {
return RivenScriptPtr();
}
+
+void RivenHotspot::applyScriptPatches(uint32 cardGlobalId) {
+ for (uint16 i = 0; i < _scripts.size(); i++) {
+ _scripts[i].script->applyCardPatches(_vm, cardGlobalId, _scripts[i].type, _blstID);
+ }
+}
+
bool RivenHotspot::isEnabled() const {
return (_flags & kFlagEnabled) != 0;
}