Skip to content

Commit

Permalink
fix: loading of fluid items (#116)
Browse files Browse the repository at this point in the history
This fixes the loading of fluid items.
  • Loading branch information
phacUFPE authored Aug 28, 2024
1 parent 7dd98f2 commit f1f256b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion data/items/items.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
<item id="16" name="mead"/>
<item id="17" name="tea"/>
<item id="18" name="ink"/>
<!-- 12.85 last fluid is 18, 19+ is a loop from 0 to 18 over and over again -->
<item id="19" name="candyfluid"/>
<item id="20" name="chocolate"/>
<!-- 13.40 last fluid is 20, 21+ is a loop from 0 to 20 over and over again -->

<item id="100" name="void"/>
<item id="101" name="earth"/>
Expand Down
4 changes: 2 additions & 2 deletions source/items.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit f1f256b

Please sign in to comment.