Hekili Priority Helper

Hekili Priority Helper

44M Downloads

[FEATURE]? Spamming GetItemInfo with index numbers

Kanegasi opened this issue ยท 2 comments

commented

Before You Begin

  • I confirm that I have downloaded the latest version of the addon.
  • I am not playing on a private server.
  • I checked for an existing, open ticket for this request and was not able to find one.
  • I edited the title of this feature request (above) so that it describes the issue I am reporting.

Feature Request

Not really a feature request, but it's not an error or a spec recommendation. It's more of a code issue.

Every time you update gear, you loop through class.gear, feeding all keys into GetItemInfo. Unfortunately, you arrange some item IDs into values with indexes, causing you to call GetItemInfo(1) up to GetItemInfo(16), which then spams the GET_ITEM_INFO_RECEIVED event for 1 through 16 several times.

Additional Information

debugstack:

[string "hooksecurefunc("GetItemInfo",function(ID) if ID==1 then print(debugstack()) end end)"]:1: in function <[string "hooksecurefunc("GetItemInfo",function(ID) i..."]:1>
[string "=[C]"]: in function `GetItemInfo'
[string "@Interface\AddOns\Hekili\Utils.lua"]:589: in function <Interface\AddOns\Hekili\Utils.lua:587>
[string "@Interface\AddOns\Hekili\Events.lua"]:685: in function `updateGear'
[string "@Interface\AddOns\Hekili\Events.lua"]:900: in function `handler'
[string "@Interface\AddOns\Hekili\Events.lua"]:65: in function <Interface\AddOns\Hekili\Events.lua:56>

Contact Information

No response

commented

Thanks, I'll put some bounds on this. And probably use some caching because those item events can be surprisingly expensive.

commented

I did some checking, and real items should be cached after a single run, but I'll prevent item slots from being sent to GetItemInfo since that's nonsensical. Thanks again.