Go to Page... |
Compatibility: | BfA content patch (8.2.5) Shadows of Argus (7.3.0) Tomb of Sargeras (7.2.0) Return to Karazhan (7.1.5) Legion (7.0.3) |
Updated: | 10-23-19 07:35 PM |
Created: | unknown |
Downloads: | 50,475 |
Favorites: | 387 |
MD5: |
Urban Achiever is a replacement Achievement frame.
Features
Comment Options |
ironrawkfist |
View Public Profile |
Send a private message to ironrawkfist |
Find More Posts by ironrawkfist |
Add ironrawkfist to Your Buddy List |
09-08-10, 09:39 AM | |
|
I had an access to the current cataclysm BETA. (Thanks to WoWInterface)
I will work on the cataclysm compatibility as soon as I successfully copy my rogue on beta server. |
|
Tomate |
View Public Profile |
Send a private message to Tomate |
Find More Posts by Tomate |
Add Tomate to Your Buddy List |
Tomate |
View Public Profile |
Send a private message to Tomate |
Find More Posts by Tomate |
Add Tomate to Your Buddy List |
zerstreuter |
View Public Profile |
Send a private message to zerstreuter |
Find More Posts by zerstreuter |
Add zerstreuter to Your Buddy List |
Tomate |
View Public Profile |
Send a private message to Tomate |
Find More Posts by Tomate |
Add Tomate to Your Buddy List |
zerstreuter |
View Public Profile |
Send a private message to zerstreuter |
Find More Posts by zerstreuter |
Add zerstreuter to Your Buddy List |
09-30-10, 12:12 PM | |
|
I have try you it but I can't reproduce your issue.
It actually works like I explain in my last post. I really think it is an other addon which cause the issue. Try to link an achievement or track one with all your other addon disable. After that if your issue persist try to clean your WTF folder. Finally, if it still persist you are screwed. |
|
Tomate |
View Public Profile |
Send a private message to Tomate |
Find More Posts by Tomate |
Add Tomate to Your Buddy List |
10-07-10, 04:31 AM | |
|
For the Cataclysm compatibility, I think I will not succeed alone.
I will need some help. I will post on forum to get some help. |
|
Tomate |
View Public Profile |
Send a private message to Tomate |
Find More Posts by Tomate |
Add Tomate to Your Buddy List |
10-07-10, 12:40 PM | |
|
It seems if you have carbonite enabled, it breaks achievement tracking
Last edited by Codex : 10-07-10 at 12:41 PM.
|
|
Codex |
View Public Profile |
Send a private message to Codex |
Find More Posts by Codex |
Add Codex to Your Buddy List |
10-16-10, 12:32 AM | ||
A Kobold Labourer
Forum posts: 0
File comments: 14
Uploads: 0
|
... and where? |
|
|
Lightning |
View Public Profile |
Send a private message to Lightning |
Find More Posts by Lightning |
Add Lightning to Your Buddy List |
10-18-10, 06:15 AM | ||
|
But, I am encounter two problems. The fist one a change in the API forbid us to check achievement info on an inexistent achievement ID. To avoid this issue I made a PHP script which dump the current achievement database from WoWhead. After that I encounter an other issue which I don't know how to deal with. I will try to open a Topic on the forum and add a link here with the log of the error and the code which produce the error.
Last edited by Tomate : 10-18-10 at 06:24 AM.
|
|
|
Tomate |
View Public Profile |
Send a private message to Tomate |
Find More Posts by Tomate |
Add Tomate to Your Buddy List |
10-18-10, 01:54 PM | |
A Kobold Labourer
Forum posts: 0
File comments: 24
Uploads: 0
|
An easier way to handle the GetAchievementInfo problem would be to use pcall to simulate a try/catch. (about 3 places it seems)
+-- local id, name, points, completed, month, day, year, description, _,_, reward = GetAchievementInfo(id) +local retok, id, name, points, completed, month, day, year, description, _,_, reward = pcall (GetAchievementInfo,id) +if not retok then return nil end |
|
elaundar |
View Public Profile |
Send a private message to elaundar |
Find More Posts by elaundar |
Add elaundar to Your Buddy List |
10-18-10, 04:17 PM | |
A Kobold Labourer
Forum posts: 0
File comments: 24
Uploads: 0
|
Here is a diff (-U5) of the changes I made to get Urban Achiever working again. I was having problems with getting the SetScripts to pass in the args correctly, so I just split them into separate functions.
Awesome add-on Tomate; couldn't stand playing without it. Feel free to use my changes as needed/wanted. Code:
--- ~/Downloads/UrbanAchiever/Main.lua 2010-08-28 12:18:22.000000000 -0500 +++ Main.lua 2010-10-18 17:15:56.000000000 -0500 @@ -451,12 +451,12 @@ self:RefreshAchievementButtons("name a") end function self:GetSearchString(id) if not type(id) == "number" then return end - local id, name, points, completed, month, day, year, description, _,_, reward = GetAchievementInfo(id) - if not id then return nil end + local retok, id, name, points, completed, month, day, year, description, _,_, reward = pcall (GetAchievementInfo,id) + if not retok or not id then return nil end if completed then if year < 10 then year = "0" .. year; end if (GetLocale() == "frFR") then @@ -477,16 +477,32 @@ end --Add all the info to the master list return searchStr:lower() end -function self:ButtonScroll(arg1, scrollbar, offset) +function UrbanAchiever_CatButtonScroll(self1, arg1) --arg1 = 1 for up, -1 for down - if IsShiftKeyDown() then arg1 = arg1 * 5 end --Shift = longer scroll - local sMin, sMax = self.frame[scrollbar]:GetMinMaxValues() - self[offset] = math.min(sMax, math.max(sMin, self[offset] + (arg1 * -1))) - self.frame[scrollbar]:SetValue(self[offset]) + if IsShiftKeyDown() then arg1 = arg1 * 5 end --Shift = longer scroll + local sMin, sMax = self.frame.catScroll:GetMinMaxValues() + self.catOffset = math.min(sMax, math.max(sMin, self.catOffset+ (arg1 * -1))) + self.frame.catScroll:SetValue(self.catOffset) +end + +function UrbanAchiever_AchButtonScroll(self1, arg1) + --arg1 = 1 for up, -1 for down + if IsShiftKeyDown() then arg1 = arg1 * 5 end --Shift = longer scroll + local sMin, sMax = self.frame.achScroll:GetMinMaxValues() + self.achOffset = math.min(sMax, math.max(sMin, self.achOffset+ (arg1 * -1))) + self.frame.achScroll:SetValue(self.achOffset) +end + +function UrbanAchiever_CriteriaButtonScroll(self1, arg1) + --arg1 = 1 for up, -1 for down + if IsShiftKeyDown() then arg1 = arg1 * 5 end --Shift = longer scroll + local sMin, sMax = self.frame.criteriaScroll:GetMinMaxValues() + self.criteriaOffset = math.min(sMax, math.max(sMin, self.criteriaOffset+ (arg1 * -1))) + self.frame.criteriaScroll:SetValue(self.criteriaOffset) end function self:ToggleFrame() if self.frame == nil then self:Initialize("","") end if self.frame == nil then return end @@ -828,25 +844,21 @@ self.frame.catScroll:SetPoint("TOPLEFT", self.frame.catButtons[2], "TOPRIGHT") self.frame.catScroll:SetPoint("BOTTOMLEFT", self.frame.catButtons[#self.frame.catButtons - 1], "BOTTOMRIGHT") self.frame.catScroll:SetWidth(16) self.frame.catScroll:SetMinMaxValues(0,0) self.frame.catScroll:SetValueStep(1) - self.frame.catScroll:SetScript("OnValueChanged", function() - self:OnCatScroll() - end) + self.frame.catScroll:SetScript("OnValueChanged", UrbanAchiever_OnCatScroll) self.frame.catScroll:SetValue(1) --Achievement Button Scroll Bar self.frame.achScroll = CreateFrame("Slider", "$parentAchSlider", self.frame, "UIPanelScrollBarTemplate") self.frame.achScroll:SetPoint("TOPLEFT", self.frame.achButtons[2], "TOPRIGHT") self.frame.achScroll:SetPoint("BOTTOMLEFT", self.frame.achButtons[#self.frame.achButtons - 1], "BOTTOMRIGHT") self.frame.achScroll:SetWidth(16) self.frame.achScroll:SetMinMaxValues(0,0) self.frame.achScroll:SetValueStep(1) - self.frame.achScroll:SetScript("OnValueChanged", function() - self:OnAchScroll() - end) + self.frame.achScroll:SetScript("OnValueChanged",UrbanAchiever_OnAchScroll) self.frame.achScroll:SetValue(1) --Achievement Display Frame self.frame.display = CreateFrame("Frame", "$parentDisplayFrame", self.frame) self.frame.display.backdrop = self.frame.display:CreateTexture("$parentBG", "BACKGROUND") @@ -944,13 +956,11 @@ self.frame.criteriaScroll:SetPoint("TOPLEFT", self.frame.display.criteriaButtons[2], "TOPRIGHT", 1,0) self.frame.criteriaScroll:SetPoint("BOTTOMLEFT", self.frame.display.criteriaButtons[#self.frame.display.criteriaButtons - 1], "BOTTOMRIGHT", 1,0) self.frame.criteriaScroll:SetWidth(16) self.frame.criteriaScroll:SetMinMaxValues(0,0) self.frame.criteriaScroll:SetValueStep(1) - self.frame.criteriaScroll:SetScript("OnValueChanged", function() - self:OnCriteriaScroll() - end) + self.frame.criteriaScroll:SetScript("OnValueChanged", UrbanAchiever_OnCriteriaScroll) self.frame.criteriaScroll:SetValue(1) self.frame.criteriaScroll:Show() self.frame.display.criteria = self.frame.display:CreateFontString("$parentCriteria", "ARTWORK", "GameFontNormal") self.frame.display.criteria:SetPoint("TOPLEFT", 0, -135) @@ -1024,19 +1034,11 @@ end self.achOffset = 0 self:RefreshCategoryButtons() self:RefreshAchievementButtons() end) - button:SetScript("OnMouseWheel", function() - self:ButtonScroll(arg1, "catScroll", "catOffset") - --[[--arg1 = 1 for up, -1 for down - local sMin, sMax = self.frame.catScroll:GetMinMaxValues() - self.catOffset = math.min(sMax, math.max(sMin, self.catOffset + (arg1 * -1))) - self.frame.catScroll:SetValue(self.catOffset) - --self:RefreshCategoryButtons()]]-- - - end) + button:SetScript("OnMouseWheel",UrbanAchiever_CatButtonScroll) return button end function self:CreateAchievementButton(name, parent) @@ -1166,19 +1168,11 @@ self:RefreshAchievementButtons(false) self:SetDisplayAchievement(id) end end end) - button:SetScript("OnMouseWheel", function() - self:ButtonScroll(arg1, "achScroll", "achOffset") - --[[--arg1 = 1 for up, -1 for down - local sMin, sMax = self.frame.achScroll:GetMinMaxValues() - self.achOffset = math.min(sMax, math.max(sMin, self.achOffset + (arg1 * -1))) - self.frame.achScroll:SetValue(self.achOffset) - --self:RefreshAchievementButtons() - ]]-- - end) + button:SetScript("OnMouseWheel", UrbanAchiever_AchButtonScroll) return button end function self:CreateCriteriaButton(name, parent) @@ -1216,13 +1210,11 @@ highlightTexture:SetTexCoord(0, 1, 0.56, 0.73) --highlightTexture:SetAllPoints(button) button:SetHighlightTexture("Interface\\FriendsFrame\\UI-FriendsFrame-HighlightBar", "ADD") - button:SetScript("OnMouseWheel", function() - self:ButtonScroll(arg1, "criteriaScroll", "criteriaOffset") - end) + button:SetScript("OnMouseWheel", UrbanAchiever_CriteriaButtonScroll) button:SetScript("OnClick", function() local id = button:GetID() if button.icon:IsShown() then self:SetDisplayAchievement(id) @@ -1338,25 +1330,22 @@ end ------------------------------------------------------------- --Scroll Stuff ------------------------------------------------------------- -function self:OnCatScroll() - --arg1 = GetValue() - self.catOffset = arg1 +function UrbanAchiever_OnCatScroll(self1) + self.catOffset = self1:GetValue() self:RefreshCategoryButtons() end -function self:OnAchScroll() - --arg1 = GetValue() - self.achOffset = arg1 +function UrbanAchiever_OnAchScroll(self1) + self.achOffset = self1:GetValue() self:RefreshAchievementButtons(false) end -function self:OnCriteriaScroll() - --arg1 = GetValue() - self.criteriaOffset = arg1 +function UrbanAchiever_OnCriteriaScroll(self1) + self.criteriaOffset = self1:GetValue() self:RefreshCriteriaButtons() end ------------------------------------------------------------- --Core Stuff @@ -1445,11 +1434,12 @@ end end end function self:SetAchievementButton(button, id, offset) - local id, name, points, completed, month, day, year, description, _, icon, reward = GetAchievementInfo(id) + local retok, id, name, points, completed, month, day, year, description, _,icon, reward = pcall (GetAchievementInfo,id) + if not retok then return nil end if completed then if year < 10 then year = "0" .. year; end @@ -1549,11 +1539,11 @@ end --Update this achievement self.masterList[id].searchString = self:GetSearchString(id) - local id, name, points, completed, month, day, year, description, _, icon, reward = GetAchievementInfo(id) + local retok, id, name, points, completed, month, day, year, description, _,icon, reward = pcall (GetAchievementInfo,id) self.frame.display:Show() self.frame.display.icon:SetTexture(icon) self.frame.display.name:SetText(name) self.frame.display.desc:SetText(description) @@ -1691,15 +1681,17 @@ end end if criteriaType == CRITERIA_TYPE_ACHIEVEMENT then --Its a meta achievement - _,_,_,_,_,_,_,_,_,icon = GetAchievementInfo(criteriaAssetID) - self.frame.display.criteriaButtons[buttonNum].icon:SetTexture(icon) - self.frame.display.criteriaButtons[buttonNum].icon:Show() - offset = offset + 16 - self.frame.display.criteriaButtons[buttonNum]:SetID(criteriaAssetID) + retok,_,_,_,_,_,_,_,_,_,icon = pcall (GetAchievementInfo,criteriaAssetID) + if retok then + self.frame.display.criteriaButtons[buttonNum].icon:SetTexture(icon) + self.frame.display.criteriaButtons[buttonNum].icon:Show() + offset = offset + 16 + self.frame.display.criteriaButtons[buttonNum]:SetID(criteriaAssetID) + end elseif (bit.band(criteriaFlags, ACHIEVEMENT_CRITERIA_PROGRESS_BAR) == ACHIEVEMENT_CRITERIA_PROGRESS_BAR) then --Its a progress bar offset = 1 self.frame.display.criteriaButtons[buttonNum]:Hide() str = ""
Last edited by elaundar : 10-18-10 at 04:28 PM.
|
|
elaundar |
View Public Profile |
Send a private message to elaundar |
Find More Posts by elaundar |
Add elaundar to Your Buddy List |
10-18-10, 05:39 PM | |
|
A big thanks elaundar for your help.
I am not sur of what I have done. It seems it was an issue with the scroll binding. Can you explain a bit what you have done, I haven't the time to look all your code to see all diff. |
|
Tomate |
View Public Profile |
Send a private message to Tomate |
Find More Posts by Tomate |
Add Tomate to Your Buddy List |
10-18-10, 06:37 PM | |
A Kobold Labourer
Forum posts: 0
File comments: 24
Uploads: 0
|
Sure thing!
Basically, once I had the Achievement lookup working, I ran into several nil values. I tracked them down to the self.*Offset variables being nil. Since the variables had a default value set, I isolated the problem to be in ButtonScroll and On*Scroll functions. Something seems to have changed in how SetScript() is passing variables. My wow lua is so limited, I couldn't figure out exactly what, but I was able to look at a few addons that were working to figure out what to change. I finally just decided to use the default passing mechanism (which passes self and arg1). Unfortunately, this meant that buttonScoll needed to be split into 3 different methods rather than just passing in the scrollbar/offset. (I suspect there is a better way to do this, but it works ) |
|
elaundar |
View Public Profile |
Send a private message to elaundar |
Find More Posts by elaundar |
Add elaundar to Your Buddy List |