Forbidden Magic

Forbidden Magic

11M Downloads

Unreachable code in ProfaneWandUpdate.java

Opened this issue ยท 1 comments

commented

There are two if statements in ProfaneWandUpdate.java that check if the contract has been depleted (well the first is an else if but it's just below the if that checks if the contract exists, so that doesn't really matter because the contract won't start empty), the first of which does a return; if true and the second of which seems to be responsible for wands reverting to wand cores upon contract depletion.

commented

It's an ugly bit of code and I'm not entirely sure why I put that else-if return there, but the code does work as intended with the wand burning out at 0 contract. Not worth the trouble of cleaning the code at this point, anyway.