• 0

    posted a message on NPCScan

    I added some lines to CanAddToScanList in Scanner.lua so that rares keep getting spotted if they drop toys or mounts that the character doesn't have yet, or pets (even if they have 3), even if their related achievements are completed.

     

    if detection.rares and not isQuestCompleted then
    	if npc.mounts then
    		for i = 1, #npc.mounts do
    			local _, _, _, _, _, _, _, _, _, hideOnChar, isCollected = _G.C_MountJournal.GetMountInfoByID(_G.C_MountJournal.GetMountFromSpell(npc.mounts[i].spellID))
    			if not hideOnChar and not isCollected then
    				return true
    			end
    		end
    	end
    
    	if npc.pets then
    		return true
    	end
    
    	if npc.toys then
    		for i = 1, #npc.toys do
    			if not _G.PlayerHasToy(npc.toys[i].itemID) then
    				return true
    			end
    		end
    	end
    end

     I put these lines just before the check for isTameable (to get alerts on tameble rares that drop pets even with the tameables detection disabled), so I had to move the isQuestCompleted declaration to be just before the new lines.

    Posted in: General AddOns
  • To post a comment, please or register a new account.