Skip to content

Commit

Permalink
Fixed UnDress button work.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wetxius committed Sep 28, 2019
1 parent 82651b4 commit efb1052
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions ShestakUI/Modules/Misc/Misc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,15 @@ strip:SetWidth(strip:GetTextWidth() + 40)
strip:SetPoint("RIGHT", DressUpFrameResetButton, "LEFT", -2, 0)
strip:RegisterForClicks("AnyUp")
strip:SetScript("OnClick", function(self, button)
local actor = self.model:GetPlayerActor()
if button == "RightButton" then
self.model:UndressSlot(19)
-- actor:UndressSlot(19) -- FIXME
else
self.model:Undress()
actor:Undress()
end
PlaySound(SOUNDKIT.GS_TITLE_OPTION_OK)
end)
strip.model = DressUpModel
strip.model = DressUpFrame.ModelScene

strip:RegisterEvent("AUCTION_HOUSE_SHOW")
strip:RegisterEvent("AUCTION_HOUSE_CLOSED")
Expand All @@ -152,11 +153,11 @@ strip:SetScript("OnEvent", function(self)
self:ClearAllPoints()
self:SetPoint("TOP", SideDressUpModelResetButton, "BOTTOM", 0, -3)
self.model = SideDressUpModel
elseif self.model ~= DressUpModel then
self:SetParent(DressUpModel)
elseif self.model ~= DressUpFrame.ModelScene then
self:SetParent(DressUpFrame.ModelScene)
self:ClearAllPoints()
self:SetPoint("RIGHT", DressUpFrameResetButton, "LEFT", -2, 0)
self.model = DressUpModel
self.model = DressUpFrame.ModelScene
end
end)

Expand Down

0 comments on commit efb1052

Please sign in to comment.