Skip to content

Commit

Permalink
Fix a few reported issues
Browse files Browse the repository at this point in the history
Had a report of garrison in-progress missions causing issues.  Couldn't
repro but made some improvements that should help.

Made some changes to WagoAnalytics shim that will hopefully resolve the
errors there.
  • Loading branch information
Caerdon committed May 11, 2024
1 parent b231f43 commit 0e79754
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .pkgmeta
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ externals:
url: https://github.com/tekkub/libdatabroker-1-1
branch: master
libs/WagoAnalytics:
url: https://github.com/wagoio/WagoAnalytics.git
url: https://github.com/wagoio/WagoAnalyticsShim.git
branch: main

enable-nolib-creation: no
2 changes: 1 addition & 1 deletion CaerdonWardrobe.toc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
## Title: Caerdon Wardrobe
## Notes: Shows BOE / BOA, openable, and unlearned pets, toys, mounts and wardrobe indicator on bank / bag / auction / merchant / guild bank / loot frame / loot roll / encounter journal slots
## Author: Caerdon
## Version: v3.6.0
## Version: v3.6.1
## SavedVariables: CaerdonWardrobeConfig
## OptionalDeps: WagoAnalytics, WoWUnit, AdiBags, AngrierWorldQuests, ArkInventory, Baganator, Bagnon, BaudBag, BetterBags, cargBags_Nivaya, Combuctor, ElvUI, Inventorian, KkthnxUI, LiteBag, Pawn, Skillet, Sorted, VenturePlan, WorldQuestsList, WorldQuestTracker, ZygorGuidesViewer

Expand Down
38 changes: 20 additions & 18 deletions features/Mission.lua
Original file line number Diff line number Diff line change
Expand Up @@ -83,27 +83,29 @@ function MissionMixin:OnGarrisonLandingScrollBoxRangeChanged(sortPending)
local missionIndex = scrollBox:FindIndex(elementData)

local index = 1;
for id, reward in pairs(elementData.rewards) do
local button = missionButton.Rewards[index];
if button.itemLink and button.itemID and button.itemID > 0 then
local options = {
relativeFrame = button.Icon,
statusOffsetX = 3,
statusOffsetY = 3
}

local item = CaerdonItem:CreateFromItemLink(button.itemLink)
CaerdonWardrobe:UpdateButton(button, item, self, {
locationKey = format("garrisonlandingbutton-%d-%d", button.itemID, id)
}, options)
else
CaerdonWardrobe:ClearButton(button)
if elementData.rewards then
for id, reward in pairs(elementData.rewards) do
local button = missionButton.Rewards[index];
if button.itemLink and button.itemID and button.itemID > 0 then
local options = {
relativeFrame = button.Icon,
statusOffsetX = 3,
statusOffsetY = 3
}

local item = CaerdonItem:CreateFromItemLink(button.itemLink)
CaerdonWardrobe:UpdateButton(button, item, self, {
locationKey = format("garrisonlandingbutton-%d-%d", button.itemID, id)
}, options)
else
CaerdonWardrobe:ClearButton(button)
end

index = index + 1
end

index = index + 1
end

for index = (#elementData.rewards + 1), #missionButton.Rewards do
for index = ((#elementData.rewards or 0) + 1), #missionButton.Rewards do
CaerdonWardrobe:ClearButton(missionButton.Rewards[index])
end
end)
Expand Down

0 comments on commit 0e79754

Please sign in to comment.