I believe this was on 28334:
Trade 14 Embers for 7 throwin' embers
You acquire throwin' ember (7)
Preference availableSeptEmbers changed from 14 to 0
Preference availableSeptEmbers changed from 0 to -14
Preference availableSeptEmbers changed from -14 to 0
This was from a
JavaScript:
buy($coinmaster`Sept-Ember Censer`, toBuy, item);
, where the item was throwin' embers and the toBuy was 14.
Having poked around at the source code, I suspect that the process went something like this:
- CoinMasterRequest.parseBalance is called as part of the transaction. It parses the response text of the purchase, and
sets the preference down to 0, seeing that the page lists me as having 0 embers
- CoinMasterRequest.completePurchase
decrements the preference
by 14, (technically it looks like it does a negative increment?)
- CoinMasterRequest.parseBalance is called a second time.
Looking around, I see that parseBalance is called both by SeptEmberCenserRequest.visitShop and by CoinMasterRequest.parseResponse. It's not clear whether they're each being called once as part of this, or if the latter is being called twice.
Worth noting that the censer uniquely has, as part of breakfast, a visit to the shop.php to set the preference. To my knowledge this is not part of the Mr Store 2002 code. So we still get that bouncing back-and-forth thing, but without the issue of not initializing the value.