Removed UNIT_SPELLCAST_FAILED_QUIET handling (#18)
* Make sure items from import lists are cached * Remove UNIT_SPELLCAST_FAILED_QUIET handling Several talents seem to have a pulsing silent fail, EG blessed weapons, while watching for the event doesn't appear to help detect when crafter interrupts their craft.
This commit is contained in:
@@ -1314,6 +1314,7 @@ function TSM:ImportGroup(importStr, groupPath)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local items = {}
|
local items = {}
|
||||||
|
local bulkquerybuffer = {}
|
||||||
local currentSubPath = ""
|
local currentSubPath = ""
|
||||||
for _, str in ipairs(TSMAPI:SafeStrSplit(importStr, ",")) do
|
for _, str in ipairs(TSMAPI:SafeStrSplit(importStr, ",")) do
|
||||||
str = str:trim()
|
str = str:trim()
|
||||||
@@ -1336,10 +1337,13 @@ function TSM:ImportGroup(importStr, groupPath)
|
|||||||
currentSubPath = subPath
|
currentSubPath = subPath
|
||||||
elseif itemString then
|
elseif itemString then
|
||||||
items[itemString] = currentSubPath
|
items[itemString] = currentSubPath
|
||||||
|
local item = Item:CreateFromID(tonumber(noSpaceStr))
|
||||||
|
if not item:IsCached() then bulkquerybuffer[#bulkquerybuffer+1] = item.itemID end
|
||||||
else
|
else
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
TSMAPI:BulkQuery(bulkquerybuffer)
|
||||||
|
|
||||||
local num = 0
|
local num = 0
|
||||||
for itemString, subPath in pairs(items) do
|
for itemString, subPath in pairs(items) do
|
||||||
|
|||||||
@@ -50,7 +50,6 @@ function GUI:OnEnable()
|
|||||||
GUI:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED", "EventHandler")
|
GUI:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED", "EventHandler")
|
||||||
GUI:RegisterEvent("UNIT_SPELLCAST_INTERRUPTED", "EventHandler")
|
GUI:RegisterEvent("UNIT_SPELLCAST_INTERRUPTED", "EventHandler")
|
||||||
GUI:RegisterEvent("UNIT_SPELLCAST_FAILED", "EventHandler")
|
GUI:RegisterEvent("UNIT_SPELLCAST_FAILED", "EventHandler")
|
||||||
GUI:RegisterEvent("UNIT_SPELLCAST_FAILED_QUIET", "EventHandler")
|
|
||||||
GUI:RegisterEvent("GUILDBANKFRAME_OPENED", "GatheringEventHandler")
|
GUI:RegisterEvent("GUILDBANKFRAME_OPENED", "GatheringEventHandler")
|
||||||
GUI:RegisterEvent("GUILDBANKFRAME_CLOSED", "GatheringEventHandler")
|
GUI:RegisterEvent("GUILDBANKFRAME_CLOSED", "GatheringEventHandler")
|
||||||
GUI:RegisterEvent("GUILDBANKBAGSLOTS_CHANGED", "GatheringEventHandler")
|
GUI:RegisterEvent("GUILDBANKBAGSLOTS_CHANGED", "GatheringEventHandler")
|
||||||
@@ -240,7 +239,7 @@ function GUI:EventHandler(event, ...)
|
|||||||
-- no longer casting a spell so discard spellID
|
-- no longer casting a spell so discard spellID
|
||||||
TSM.currentspell = nil
|
TSM.currentspell = nil
|
||||||
-- TSMAPI:CreateTimeDelay("craftingQueueUpdateThrottle", 0.2, GUI.UpdateQueue)
|
-- TSMAPI:CreateTimeDelay("craftingQueueUpdateThrottle", 0.2, GUI.UpdateQueue)
|
||||||
elseif event == "UNIT_SPELLCAST_INTERRUPTED" or event == "UNIT_SPELLCAST_FAILED" or event == "UNIT_SPELLCAST_FAILED_QUIET" then
|
elseif event == "UNIT_SPELLCAST_INTERRUPTED" or event == "UNIT_SPELLCAST_FAILED" then
|
||||||
local unit = ...
|
local unit = ...
|
||||||
if unit ~= "player" then return end
|
if unit ~= "player" then return end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user