AutoBuySell.cs: Fixed bug where armor isn't sold.#6
AutoBuySell.cs: Fixed bug where armor isn't sold.#6Moldair wants to merge 1 commit intoMag-nus:masterfrom
Conversation
Safety check was removing all armor from the list sellitems before getting a loot decision. Found to be cause by EquipbleSlots being tested instead of Equipped Slots. Also, added feedback to the user so they know if there is nothing to buy or sell instead of just exiting silently.
|
In regards to this, is this a patch for an Emu bug, or did this bug also exist in retail? I want to be careful not to change the plugin to work around emu bugs. |
|
Honestly, I'm not sure, but I lean toward a retail bug. If I understood the code correctly, there was a safety check performed to only be able to sell items in the inventory. Items that were currently equipped could not be sold. To your point, I don't know if if the values used in the original game were the same as the ones being used now. My change involved changing the comparison from LongValueKey.EquipableSlots, to LongValueKey.EquippedSlots. My interpretation is the LongValueKey.EquipableSlots is a value that tells the server where it can be equipped, not necessarily is equipped. Therefore, checking an item to see if it can be equipped to a certain slot (>0) results in it being removed from the sale list. The intended function appeared to be only to remove it from the list if it was currently equipped. |
Safety check was removing all armor from the list sellitems before getting a loot decision. Found to be cause by EquipbleSlots being tested instead of Equipped Slots. Also, added feedback to the user so they know if there is nothing to buy or sell instead of just exiting silently.