aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2018-04-08 19:51:50 -0400
committerPaul Gilbert2018-04-08 19:51:50 -0400
commit30f0da8660d3cc389cfdec307c526cef432d668d (patch)
tree943815cbc0d9157abb818f25b830c8d9e649c350
parent90f2bb6a154e36a8594d3541faf03c505d805354 (diff)
downloadscummvm-rg350-30f0da8660d3cc389cfdec307c526cef432d668d.tar.gz
scummvm-rg350-30f0da8660d3cc389cfdec307c526cef432d668d.tar.bz2
scummvm-rg350-30f0da8660d3cc389cfdec307c526cef432d668d.zip
XEEN: Fix reading and setting character specific flags
-rw-r--r--engines/xeen/party.cpp8
-rw-r--r--engines/xeen/scripts.cpp2
2 files changed, 5 insertions, 5 deletions
diff --git a/engines/xeen/party.cpp b/engines/xeen/party.cpp
index cb8072f060..eafc026e34 100644
--- a/engines/xeen/party.cpp
+++ b/engines/xeen/party.cpp
@@ -1412,16 +1412,16 @@ bool Party::giveTake(int takeMode, uint takeVal, int giveMode, uint giveVal, int
_gold += _vm->getRandomNumber(1, giveVal);
break;
case 103:
- assert(takeVal < 128);
- _worldFlags[takeVal] = true;
+ assert(giveVal < 128);
+ _worldFlags[giveVal] = true;
break;
case 104:
assert(giveVal < 30);
_questFlags[files._ccNum][giveVal] = true;
break;
case 107:
- assert(takeVal < 24);
- _characterFlags[ps._rosterId][takeVal] = true;
+ assert(giveVal < 24);
+ _characterFlags[ps._rosterId][giveVal] = true;
break;
default:
break;
diff --git a/engines/xeen/scripts.cpp b/engines/xeen/scripts.cpp
index df94845ce8..464130be69 100644
--- a/engines/xeen/scripts.cpp
+++ b/engines/xeen/scripts.cpp
@@ -1829,7 +1829,7 @@ bool Scripts::ifProc(int action, uint32 val, int mode, int charIndex) {
break;
case 107:
// Get value of character flag
- error("Unused");
+ v = party._characterFlags[ps->_rosterId][val] ? val : 0xffffffff;
break;
default:
break;