CheckInteractDistance(id, 1) and CanInspect(id) then
if not inspecting then
inspecting = guid;
- print("Sending inspect", UnitName(id));
NotifyInspect(id);
redoGuid = guid;
CTimerAfter(20, redo);
end
local function inspectReady(guid)
- if not guid or inspecting ~= guid then print("Got inspect from elsewhere"); return end
+ if not guid or inspecting ~= guid then return end
local cached = cache[guid];
if cached and cached.id and UnitGUID(cached.id) == guid then
local time = GetTime();
if not inspectui then ClearInspectPlayer() end
if (cached.needItems and cached.weapon) or
(not cached.needItems and cached.talent ~= nil) then
- print("Got inspect done", UnitName(id));
cached.cb(guid, cached.spec, cached.talent, cached.weapon, cached.wrist);
else
pending[guid] = true;