From b67f5f0d642cf5720b3a229977e9f1c584700913 Mon Sep 17 00:00:00 2001 From: XProger Date: Mon, 15 Oct 2018 08:20:49 +0300 Subject: [PATCH] fix scion pickup --- src/format.h | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/format.h b/src/format.h index 1fb1b74..5f5ebc3 100644 --- a/src/format.h +++ b/src/format.h @@ -1818,6 +1818,18 @@ namespace TR { (type >= STONE_ITEM_1 && type <= STONE_ITEM_4); } + static bool isPuzzleItem(Type type) { + return type >= PUZZLE_1 && type <= PUZZLE_4; + } + + static bool isKeyItem(Type type) { + return type >= KEY_ITEM_1 && type <= KEY_ITEM_4; + } + + static bool isCrossLevelItem(Type type) { + return !isPuzzleItem(type) && !isKeyItem(type) && (type != LEADBAR); + } + bool isPickup() const { return isPickup(type); } @@ -1884,7 +1896,9 @@ namespace TR { case KEY_ITEM_4 : return INV_KEY_4; case LEADBAR : return INV_LEADBAR; - //case Entity::SCION : return Entity::INV_SCION; + case SCION_PICKUP_QUALOPEC : + case SCION_PICKUP_DROP : + case SCION_PICKUP_HOLDER : return Entity::INV_SCION; default : return type; } } @@ -1915,8 +1929,8 @@ namespace TR { case INV_KEY_4 : return KEY_ITEM_4; case INV_LEADBAR : return LEADBAR; - //case Entity::SCION : return Entity::INV_SCION; - default : return type; + case INV_SCION : return SCION_PICKUP_DROP; + default : return type; } }