From f1f256bac729fe0d5ae1f60a99db0860da7c674f Mon Sep 17 00:00:00 2001 From: Pedro Cruz Date: Tue, 27 Aug 2024 21:23:41 -0300 Subject: [PATCH] fix: loading of fluid items (#116) This fixes the loading of fluid items. --- data/items/items.xml | 4 +++- source/items.cpp | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/data/items/items.xml b/data/items/items.xml index 9fdc89bb..675fd97d 100644 --- a/data/items/items.xml +++ b/data/items/items.xml @@ -20,7 +20,9 @@ - + + + diff --git a/source/items.cpp b/source/items.cpp index 245cd6eb..92de5481 100644 --- a/source/items.cpp +++ b/source/items.cpp @@ -546,8 +546,8 @@ bool ItemDatabase::loadItemFromGameXml(pugi::xml_node itemNode, uint16_t id) { return true; } - // Não verificar isValidID se o ID estiver entre 1 e 18, mas verificar para outros IDs. - if (!(id >= 1 && id <= 18) && !isValidID(id)) { + // Não verificar isValidID se o ID estiver entre LIQUID_FIRST e LIQUID_LAST, mas verificar para outros IDs. + if (!(id >= LIQUID_FIRST && id <= LIQUID_LAST) && !isValidID(id)) { return false; }