Bug - Fixed Inaccurate spleen tracking at low levels

roippi

Developer
Correct, my original fix for this didn't quite work correctly so it never saw the light of day. I'll take another look tonight.
 

slyz

Developer
Here is a quick patch I came up with, based on Veracity's fix for the "You are too scared of Bs" message. Unfortunately, I won't be in a position to test it for a few days.

Note that the patch also adds "UseItemRequest.lastItemUsed = null;", which was meant to fix this issue. I have been using Mafia with this for a little while, and haven't noticed any strange behavior, so I'm inclined to commit it along with this.
 

Attachments

  • consumptionLevel_slyz.patch
    1.7 KB · Views: 26
Last edited:

roippi

Developer
Ah, clever fix for that other problem.

Possible minor quibble is that drunkenness might be out-of-sync until a charpane refresh happens. Unless that happens anyway at some point.

Does the inventory count go out of sync too until a refresh? I forget already, I tested this myself a couple of weeks ago.
 

slyz

Developer
The drunkness should be parsed from the result text (in ResultProcessor.processResults() ), so it won't be incremented before using the drink anyway.

I forgot to add a "ResultProcessor.processResult( item );" line, to maintain the inventory in sync. I update the patch posted in the post above.
 

slyz

Developer
I attempted to use a glimmering roc feather at level 3 via the automatic [use] link on acquisition
I just tried testing my patch on a level 10 multi with a frozen banquet, but I couldn't:
- eat it via a CLI command or the Item Manager
- eat it via the KoL interface
- eat it via a use link after "acquiring" it from the mall or my closet, since Mafia doesn't add a [use] link to items that don't meet the level requirement.

The only way I could try to eat it was via the /eat chat macro:
Code:
> inv frozen banquet

frozen banquet (2)

> /eat frozen banquet

Ingesting a frozen banquet.
[color=red]Item level too high.[/color]

> inv frozen banquet

frozen banquet (3)

I hadn't realized that, at this point of UseItemRequest.parseConsumption(), the item hasn't been removed from inventory yet. I updated the post with the patch one more time.
 
Top