diff options
author | Paul Gilbert | 2017-12-29 00:41:55 -0500 |
---|---|---|
committer | Paul Gilbert | 2017-12-29 00:41:55 -0500 |
commit | 45891aed916f5377c1a8fed8c02ce5ec32ea52e4 (patch) | |
tree | 8a15e63d5bb5641cfc9412046ebfca66fa528b8e /engines/xeen | |
parent | fb73c1a3ccbf3ce489cd2539a2e4b769a138a055 (diff) | |
download | scummvm-rg350-45891aed916f5377c1a8fed8c02ce5ec32ea52e4.tar.gz scummvm-rg350-45891aed916f5377c1a8fed8c02ce5ec32ea52e4.tar.bz2 scummvm-rg350-45891aed916f5377c1a8fed8c02ce5ec32ea52e4.zip |
XEEN: Implement sets & checks for _questItems
Diffstat (limited to 'engines/xeen')
-rw-r--r-- | engines/xeen/party.cpp | 4 | ||||
-rw-r--r-- | engines/xeen/scripts.cpp | 6 |
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 ¶ms) { 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: |