-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
80 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Release AddOn | ||
|
||
on: | ||
push: | ||
tags: | ||
- '**' | ||
|
||
env: | ||
GITHUB_OAUTH: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
|
||
- uses: BigWigsMods/packager@master | ||
with: | ||
args: release.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
local GetCategoryAppearances = C_TransmogCollection.GetCategoryAppearances | ||
|
||
-- probably not the right way to do this and taints everything | ||
function C_TransmogCollection.GetCategoryAppearances(...) | ||
local visualsList = GetCategoryAppearances(...) | ||
if HideAppearanceDB then | ||
-- iterate from end to beginning for tremove | ||
for i = #visualsList, 1, -1 do | ||
if HideAppearanceDB[visualsList[i].visualID] then | ||
tremove(visualsList, i) | ||
end | ||
end | ||
end | ||
return visualsList | ||
end | ||
|
||
local f = CreateFrame("Frame") | ||
|
||
function f:OnEvent(event, addon) | ||
if addon == "HideAppearance" then | ||
HideAppearanceDB = HideAppearanceDB or {} | ||
for _, model in pairs(WardrobeCollectionFrame.ItemsCollectionFrame.Models) do | ||
model:HookScript("OnMouseDown", self.AddHideButton) | ||
end | ||
end | ||
end | ||
f:RegisterEvent("ADDON_LOADED") | ||
f:SetScript("OnEvent", f.OnEvent) | ||
|
||
function f.AddHideButton(model, button) | ||
if button == "RightButton" then | ||
UIDropDownMenu_AddButton({notCheckable = true, disabled = true}) | ||
UIDropDownMenu_AddButton({notCheckable = true, text = HIDE, func = function() | ||
f:HideTransmog(model) | ||
end}) | ||
end | ||
end | ||
|
||
function f:HideTransmog(model) | ||
local visualID = model.visualInfo.visualID | ||
local source = WardrobeCollectionFrame_GetSortedAppearanceSources(visualID)[1] | ||
local name, link = GetItemInfo(source.itemID) | ||
-- add to filter list | ||
HideAppearanceDB[visualID] = name | ||
-- update wardrobe window | ||
WardrobeCollectionFrame.ItemsCollectionFrame:RefreshVisualsList() | ||
WardrobeCollectionFrame.ItemsCollectionFrame:UpdateItems() | ||
-- print message | ||
print("Hiding "..link.." from the Appearances Tab") | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
## Interface: 80300 | ||
## Version: 1.0 | ||
## Title: HideAppearance | ||
## Notes: Adds a dropdown button for hiding Wardrobe Appearances | ||
## Author: Ketho | ||
## SavedVariables: HideAppearanceDB | ||
## LoadOnDemand: 1 | ||
## LoadWith: Blizzard_Collections | ||
|
||
HideAppearance.lua |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters