Scrap (Junk Seller)

Scrap (Junk Seller)

21M Downloads

Destroying items on vendor open is failing (Lua error)

KyrosKrane opened this issue ยท 0 comments

commented

Running Software (issues missing this information will be deleted):

  • Addon version: 9.0.1
  • Server patch: 9.0.2.37474

Have you read the changelog? (please don't waste our time)
Yes.

Describe the bug
Opening a vendor when an item with no vendor sell value is marked as junk causes a lua error. (I'm guessing that destroying an item now requires a hardware event, and opening the vendor window doesn't count.)

To Reproduce
Steps to reproduce the behaviour:

  1. Obtain an item with no vendor sell value. (That's an item you could not normally sell to a vendor.)
  2. Open a vendor and set the item as junk by picking it up and clicking the Sell Junk button.
  3. Close the vendor.
  4. Reopen the vendor by right clicking.
  5. The error appears. The junk item is placed on your cursor.

Expected behaviour
A lua error does not appear. The item is either destroyed automatically, or remains in your bag.

Error Logs

24x [ADDON_ACTION_BLOCKED] AddOn 'Scrap' tried to call the protected function 'DeleteCursorItem()'.
[string "@!BugGrabber\BugGrabber.lua"]:519: in function <!BugGrabber\BugGrabber.lua:519>
[string "=[C]"]: in function `DeleteCursorItem'
[string "@Scrap\addons\merchant\button.lua"]:200: in function `Sell'
[string "@Scrap\addons\merchant\button.lua"]:60: in function `?'
[string "@TomTom\libs\CallbackHandler-1.0\CallbackHandler-1.0-7.lua"]:119: in function <...Tom\libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:119>
[string "=[C]"]: ?
[string "@TomTom\libs\CallbackHandler-1.0\CallbackHandler-1.0-7.lua"]:29: in function <...Tom\libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:25>
[string "@TomTom\libs\CallbackHandler-1.0\CallbackHandler-1.0-7.lua"]:64: in function `SendMessage'
[string "@Bagnon\common\Wildpants\libs\WildAddon-1.0\WildAddon-1.0-1.lua"]:83: in function `SendSignal'
[string "@Scrap\addons\main\main.lua"]:53: in function <Scrap\addons\main\main.lua:53>
[string "=[C]"]: ?
[string "@TomTom\libs\CallbackHandler-1.0\CallbackHandler-1.0-7.lua"]:29: in function <...Tom\libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:25>
[string "@TomTom\libs\CallbackHandler-1.0\CallbackHandler-1.0-7.lua"]:64: in function `Fire'
[string "@TomTom\libs\AceEvent-3.0\AceEvent-3.0-4.lua"]:120: in function <...aceTomTom\libs\AceEvent-3.0\AceEvent-3.0.lua:119>

Additional context
Note that if you clear the item off your cursor and click the Sell Junk button after the vendor is opened, the item is destroyed normally and without error.

Also note that if you have multiple items with no vendor value marked as junk and you open the vendor window, the items are shuffled around in your bags when you open the vendor window. All the items are destroyed normally when you click the sell junk button.

Proposed fix: Scrap does not attempt to destroy items with no vendor value on vendor open. It only does so when the Sell Junk button is pressed.