Bug - Fixed using items that are optionally consumed adds them to tally

Veracity

Developer
Staff member
If you use an item which is sometimes consumed and sometimes not consumed - a scroll of drastic healing, for example - UseItemRequest.parseConsumption assumes it is used - and removes it from inventory - and then, after checking the responseText, if it was not consumed, it adds it back. This will add it to the session tally, even thought the item was not necessarily acquired this session.

That method should be refactored to remove the item from inventory AFTER responseText has been checked and it is known t have actually been consumed.
 
What a big job. Revision 15825 refactors that method as proposed.

It is quite possible I made errors and certain items will not be removed when they should be (I used return rather than break) or will be removed when they should not be (I used break rather than return). I'll leave this open for now in case somebody notices such issues and wants to report it here - although I bet that they will open new bug reports, instead.
 
And ... as predicted, the first new bug report has been opened for this. I'm just going to mark this one Fixed and deal with individual bugs, one by one, as they are reported. :)
 
Back
Top