Log in to ZYGOR
Log in with social media
OR
Log in with Zygor account
Forgot your password?
  • If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

Bug found in Goal.lua, with fix

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Bug found in Goal.lua, with fix

    Hello, it looks like some of the currency-related goal code hasn't been updated as of release 7.0.23343 with the 9.0.1 API's new namespaced currency functions which return an info table. I've posted my fixes below along with surrounding code for context.

    Goal.lua, line 1515:
    Code:
    	iscomplete = function(self)
    		local info = C_CurrencyInfo.GetCurrencyInfo(self.targetid)
    		local name,got = info.name, info.quantity
    		if not name then return end
    		return got>=self.count, true, norm_nums(got,self.count)
    	end,
    Goal.lua, line 2927 (after above update):
    Code:
    elseif self.action=='earn' then
    		local info = C_CurrencyInfo.GetCurrencyInfo(self.targetid or 0)
    		local name,count = info.name, info.quantity
    		goalcountnow = goalcountnow or count
    		remaining = remaining or max(self.count-goalcountnow,0)
    		text = GenericText(brief,self.action,COLOR_ITEM,(remaining>0 and remaining) or self.count,name,false,self.count and self.count>1,(complete and "_done" or ""))
    		goalcountneeded = (self.exact and self.count) or goalcountneeded or self.count
    Hope that helps!

  • #2
    I will show this to our dev team.
    Become a Fan of Zygor Guides on Facebook:
    http://www.facebook.com/pages/Zygor-...04933799556988

    Follow Zygor Guides on Twitter:
    http://twitter.com/zygorguides

    Comment

    Working...
    X