Skip to content

Commit

Permalink
Fix some crashing issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Caerdon committed Nov 28, 2022
1 parent 3fc530a commit 54eae64
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
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.3.4
## Version: v3.3.5
## SavedVariables: CaerdonWardrobeConfig
## OptionalDeps: WagoAnalytics, WoWUnit, AdiBags, AngrierWorldQuests, ArkInventory, Bagnon, BaudBag, cargBags_Nivaya, Combuctor, ElvUI, Inventorian, KkthnxUI, Pawn, Sorted, VenturePlan, WorldQuestsList, WorldQuestTab, WorldQuestTracker, ZygorGuidesViewer

Expand Down
15 changes: 8 additions & 7 deletions types/EquipmentMixin.lua
Original file line number Diff line number Diff line change
Expand Up @@ -205,16 +205,17 @@ function CaerdonEquipmentMixin:GetTransmogInfo()

-- print(item:GetItemLink() .. " is dressable")

if not self.dressUp then
self.dressUp = CreateFrame("DressUpModel")
self.dressUp:SetUnit('player')
if not CaerdonWardrobe.dressUp then
CaerdonWardrobe.dressUp = CreateFrame("DressUpModel")
CaerdonWardrobe.dressUp:SetUnit('player')
end

if slotID and slotID > 0 then
self.dressUp:Undress()
self.dressUp:TryOn(itemLink, slotID)
-- Don't think I need to do this unless weapons cause some sort of problem?
-- CaerdonWardrobe.dressUp:Undress()
CaerdonWardrobe.dressUp:TryOn(itemLink, slotID)
-- print("CHECKING FOR SLOT: " .. tostring(slotID))
local transmogInfo = self.dressUp:GetItemTransmogInfo(slotID)
local transmogInfo = CaerdonWardrobe.dressUp:GetItemTransmogInfo(slotID)

if transmogInfo then
sourceID = transmogInfo.appearanceID -- I don't know why, but it is.
Expand Down Expand Up @@ -280,7 +281,7 @@ function CaerdonEquipmentMixin:GetTransmogInfo()
-- -- shouldSearchSources = true
-- end

if shouldSearchSources then
if appearanceID and shouldSearchSources then
local sourceIndex, source
local appearanceSourceIDs = C_TransmogCollection.GetAllAppearanceSources(appearanceID)
for sourceIndex, source in pairs(appearanceSourceIDs) do
Expand Down

0 comments on commit 54eae64

Please sign in to comment.