Bug - Fixed Frosty mug wonkiness

gulaschkanone

New member
I've been experiencing weirdness with the handling of frosty mugs (no other consumption helpers though). It's like the flag that the next thing is to be drank through a mug instead of normally is never cleared; since it isn't an explicit preference, I can't tell for sure though. Behavior I saw: Typing "drink frosty mug, whatever" for one single thing would cause all subsequent drinkings to throw a "Consumption helper failed"; today, I drank 6 perfect boozes without ever indicating for them to be mugged (last time I used a frosty mug was yesterday for nightcap; I didn't close the mafia instance before relogging after rollover), and the first 5 of those did consume the mugs I happened to have in inventory. Didn't think to do anything like turning debug logging on, but hopefully it's enough info.
 

tricus

New member
I just experienced this same bug. On the 19th I used my first frosty mug ever, and ever since then mafia has been using frosty mugs without me asking, and without writing anything to the CLI or session log!. Mafia was even kindly restoring my HP before each drink. 24 mugs were used this way before I realized it was happening. Mugs were not auto-used when drinking a Lucky Lindy, so it is inventory drinks only. (I suppose that is a normal limitation of frosty mugs)

gulaschkanone seems to have hit the nail on the head with the insight:
It's like the flag that the next thing is to be drank through a mug instead of normally is never cleared
 
Last edited:

lostcalpolydude

Developer
Staff member
I just experienced this same bug. On the 19th I used my first frosty mug ever, and ever since then mafia has been using frosty mugs without me asking, and without writing anything to the CLI or session log!. Mafia was even kindly restoring my HP before each drink. 24 mugs were used this way before I realized it was happening. Mugs were not auto-used when drinking a Lucky Lindy, so it is inventory drinks only. (I suppose that is a normal limitation of frosty mugs)

gulaschkanone seems to have hit the nail on the head with the insight:

Did you go several days without closing mafia?
 

lostcalpolydude

Developer
Staff member
It's like the flag that the next thing is to be drank through a mug instead of normally is never cleared
The flag for using a frosty mug is only stored in memory. There's no way it can be saved once mafia is completely closed. So I really have no idea what's going on then.
 
If Mafia isn't noting anything in the session log, then it's likely this is a bug on KoL's side. First step here would be to confirm whether or not it still happens when you're not running Mafia.
 

tricus

New member
Hi Laserrobotics. Two facts rule out server-side shenanigans:
1. mafia invokes HP auto-restore before drinking the next drink, so it knows that a mug is going to be used next.
2. mafia's inventory count of frosty mugs decrements by 1, which it couldn't know if it was server-side misbehaviour.

Completed for confirmation:
0. Had previously put frosty mugs in the closet and unchecked "Take items from closet whenever needed" to stop the problem from occurring.
1. Logged into KoL with browser only (cache clean), took frosty mugs out of closet, drank booze. No frosty mug used. OK.
2. Logged into newly launched mafia, drank booze via inventory, CLI and Item Manager, no frosty mug used. OK.
3. In Item Manager, queued up a frosty mug and booze, drank, frosty mug used as expected. OK.
4. In CLI, drank booze, frosty mug used unexpectedly, no log message about a mug being used, log message about HP loss.
5. Checked "Take items from closet whenever needed", put frosty mugs in closet, drank booze (successfully), got message Consumption helper failed, and a frosty mug and the booze appear in the Item Manager queue, frosty mug was not taken from closet.
6. Exited mafia, re-launched, drank again with frosty mug in inventory, no frosty mug used. OK. (This contradicts my prior assertion that "I always shutdown and restart mafia": I must have been mistaken. bmaher, this corresponds to your statement that the value is in-memory only).

So anyway, somehow after using one frosty mug mafia thinks all future drinking must also use frosty mugs. Can workaround by closing and restarting mafia or by putting frosty mugs in closet and unchecking "Take items from closet whenever needed".

EDIT: Using a frosty mug via the relay browser doesn't seem to trigger the issue. It is specifically related to using or queueing up a frosty mug in the Item Manager.
 
Last edited:
I haven't used frosty mugs, so I wasn't aware of the significance of it restoring your HP before attempting to drink. That said, you have now provided significantly more information that is likely going to be helpful in determining the root of the issue.
 

Veracity

Developer
Staff member
The root issue is that EatItemRequest has 9 places where it manipulates currentFoodHelperCount and DrinkItemRequest has 8 places where it manipulates currentDrinkHelperCount. The missing line?

Code:
			DrinkItemRequest.queuedDrinkHelperCount -= 1;
Try revision 17312.
 
Top