When you get an item in the Relay Browser, KoLmafia gives you a "use" link, which takes you to inv_equip.php. If you don't have the stats to equip it, the equip fails, but KoLmafia apparently tries to put it in the appropriate equipment slot (as seen on the Gear Changer) and removes it from inventory.
"refresh" calls api.php which fixes the Gear Changer.
"refresh inv" refreshes inventory and the item is seen to be back in inventory (where it never left).
My debug log shows this:
Note that if we had done that with an EquipmentRequest, we would not have even tried, since we new the stats were inadequate, but if we had tried, that javascript invocation of charpane.php would have induced us to get api.php.
I expect this is reproducible without a "use" link by doing visit_url( "inv_equip.php?which=2&action=equip&whichitem=2069&pwd&ajax=1" ).
I expect the bug is in EquipmentRequest.parseEquipmentChange().
"refresh" calls api.php which fixes the Gear Changer.
"refresh inv" refreshes inventory and the item is seen to be back in inventory (where it never left).
My debug log shows this:
Code:
Requesting: http://www.kingdomofloathing.com/inv_equip.php?which=2&action=equip&whichitem=2069&pwd&ajax=1
Retrieved: http://www.kingdomofloathing.com/inv_equip.php?which=2&action=equip&whichitem=2069&pwd&ajax=1
ResponseText has 507 characters.
<script type="text/javascript">top.charpane.location.href="charpane.php";</script>
<script type="text/javascript">if (window.updateInv) updateInv([])</script>
<center><table width=95% cellspacing=0 cellpadding=0><tr><td style="color: white;" align=center bgcolor=blue><b>Results:</b></td></tr><tr><td style="padding: 5px; border: 1px solid blue;"><center><table><tr><td>You must have at least 70 base Moxie to equip that item.</td></tr></table></center></td></tr><tr><td height=4></td></tr></table></center>
Processing results...
Requesting: http://www.kingdomofloathing.com/charpane.php
Retrieved: http://www.kingdomofloathing.com/charpane.php
I expect this is reproducible without a "use" link by doing visit_url( "inv_equip.php?which=2&action=equip&whichitem=2069&pwd&ajax=1" ).
I expect the bug is in EquipmentRequest.parseEquipmentChange().