Unskilled herbalism & mining node collection patch #141


  • Fixed
  • Patch
Closed
Assigned to moonfann
  • _ForgeUser27530368 created this issue Sep 9, 2016

    What does the provided patch do?

    Fixes the ability to collect herbalism and mining nodes when a character does not have these professions and clicks a node.

    This functionality broke at some point as it used to work correctly.

    Please provide any additional information below.

    Info

    Changes to the wow api "UI_ERROR_MESSAGE" event appears to have broken existing functionality at some point.

    The 'Collector:UIError' function inside Collector.lua has been updated to correctly detect nodes when tapped by a player who does not have the mining or herbalism skill (as originally intended).

    NOTE: String matching for msg2 may need to be run through the NL[] translation object for correct language support across wow installs not using the enUS language as default.

    Fix

    Inside Collector.lua ammend the 'Collector:UIError(event,msg)' function as shown below:

    function Collector:UIError(event,msg,msg2)
    	local what = tooltipLeftText1:GetText();
    	if not what then return end
    	
    	-- UIError msg = 261 for unskilled gather.
    	if msg == 261 then
    		if strfind(msg2, "Requires Herbalism") then
    			self:addItem(herbSpell,what)
    		elseif strfind(msg2, "Requires Mining") then
    			self:addItem(miningSpell,what)
    		end
    	end
    	
    	if strfind(msg, miningSpell) then
    		self:addItem(miningSpell,what)
    	elseif strfind(msg, herbSkill) then
    		self:addItem(herbSpell,what)
    	elseif strfind(msg, pickSpell) or strfind(msg, openSpell) then -- locked box or failed pick
    		self:addItem(openSpell, what)
    	elseif strfind(msg, NL["Lumber Mill"]) then -- timber requires lumber mill
    		self:addItem(loggingSpell, what)
    	end
    end
    
  • _ForgeUser27530368 added the tags New Patch Sep 9, 2016
  • _ForgeUser27530368 edited description Sep 9, 2016
  • nevcairiel posted a comment Sep 11, 2016

    Fixed differently, thanks for reporting.

  • nevcairiel removed a tag New Sep 11, 2016
  • nevcairiel added a tag Fixed Sep 11, 2016
  • nevcairiel closed issue Sep 11, 2016

To post a comment, please login or register a new account.