aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2017-12-29 00:41:55 -0500
committerPaul Gilbert2017-12-29 00:41:55 -0500
commit45891aed916f5377c1a8fed8c02ce5ec32ea52e4 (patch)
tree8a15e63d5bb5641cfc9412046ebfca66fa528b8e
parentfb73c1a3ccbf3ce489cd2539a2e4b769a138a055 (diff)
downloadscummvm-rg350-45891aed916f5377c1a8fed8c02ce5ec32ea52e4.tar.gz
scummvm-rg350-45891aed916f5377c1a8fed8c02ce5ec32ea52e4.tar.bz2
scummvm-rg350-45891aed916f5377c1a8fed8c02ce5ec32ea52e4.zip
XEEN: Implement sets & checks for _questItems
-rw-r--r--engines/xeen/party.cpp4
-rw-r--r--engines/xeen/scripts.cpp6
2 files changed, 5 insertions, 5 deletions
diff --git a/engines/xeen/party.cpp b/engines/xeen/party.cpp
index 0a2e5b9f82..20a80a0cf8 100644
--- a/engines/xeen/party.cpp
+++ b/engines/xeen/party.cpp
@@ -860,7 +860,7 @@ bool Party::giveTake(int takeMode, uint takeVal, int giveMode, uint giveVal, int
break;
}
} else {
- error("Invalid id");
+ _questItems[takeVal - 82]--;
}
}
if (!found)
@@ -1129,7 +1129,7 @@ bool Party::giveTake(int takeMode, uint takeVal, int giveMode, uint giveVal, int
return false;
}
} else {
- error("Invalid id");
+ _questItems[giveVal - 82]++;
}
return true;
}
diff --git a/engines/xeen/scripts.cpp b/engines/xeen/scripts.cpp
index 75338eb3f8..11d21ce374 100644
--- a/engines/xeen/scripts.cpp
+++ b/engines/xeen/scripts.cpp
@@ -1248,7 +1248,7 @@ bool Scripts::cmdGiveEnchanted(ParamsIterator &params) {
return true;
} else {
- error("Invalid id");
+ party._questItems[id - 82]++;
}
}
@@ -1570,8 +1570,8 @@ bool Scripts::ifProc(int action, uint32 val, int mode, int charIndex) {
}
}
}
- } else {
- error("Invalid id");
+ } else if (party._questItems[val - 82]) {
+ v = val;
}
break;
case 25: