aboutsummaryrefslogtreecommitdiff
path: root/engines/xeen/character.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/xeen/character.cpp')
-rw-r--r--engines/xeen/character.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/engines/xeen/character.cpp b/engines/xeen/character.cpp
index cbade04248..6f78e6e626 100644
--- a/engines/xeen/character.cpp
+++ b/engines/xeen/character.cpp
@@ -955,6 +955,7 @@ int Character::getNumAwards() const {
ItemCategory Character::makeItem(int p1, int itemIndex, int p3) {
XeenEngine *vm = Party::_vm;
Scripts &scripts = *vm->_scripts;
+ int itemOffset = vm->getGameID() == GType_Swords ? 6 : 0;
if (!p1)
return CATEGORY_WEAPON;
@@ -967,18 +968,18 @@ ItemCategory Character::makeItem(int p1, int itemIndex, int p3) {
// Randomly pick a category and item Id
if (p3 == 12) {
- if (scripts._itemType < 35) {
+ if (scripts._itemType < (35 + itemOffset)) {
category = CATEGORY_WEAPON;
itemId = scripts._itemType;
- } else if (scripts._itemType < 49) {
+ } else if (scripts._itemType < (49 + itemOffset)) {
category = CATEGORY_ARMOR;
- itemId = scripts._itemType - 35;
- } else if (scripts._itemType < 60) {
+ itemId = scripts._itemType - (35 + itemOffset);
+ } else if (scripts._itemType < (60 + itemOffset)) {
category = CATEGORY_ACCESSORY;
- itemId = scripts._itemType - 49;
+ itemId = scripts._itemType - (49 + itemOffset);
} else {
category = CATEGORY_MISC;
- itemId = scripts._itemType - 60;
+ itemId = scripts._itemType - (60 + itemOffset);
}
} else {
switch (p3) {