Closed aladdin1404 closed 7 years ago
Thanks aladdin1404, this bug turns out to be an important lesson in just how much Umoria uses global state.
Here's a short description of the issue (functions given as they are currently named):
In the create_food()
function (spells.cpp
), I take a copy of the treasureID
for the current dungeon tile, but in the original code it was just a reference to that treasureID
. This becomes a bug because the dungeonPlaceRandomObjectAt()
function changes the treasure id
on that tile, and it's that new treasureID
that should be used on the next line when the inventoryItemCopyTo()
function is called, but I'm still using the old copied value.
I will need to make a good scan through all the code to see if there are similar issues to this. If so, there are probably not too many, but still, I will need to take care on this.
Once I've finished with my current refactoring task I'll fix this bug and make a new release.
Many thanks for your time to make report this. It's greatly appreciated.
Bug fixed with commit 18d2b17
This spell works ok in 5.7.0