Better Wardrobe and Transmog

Better Wardrobe and Transmog

6M Downloads

Problem with manual merge of #197

Ketrel opened this issue ยท 2 comments

commented

It looks like this portion wasn't merged right

		if outfit.itemTransmogInfoList then
			local actor = WardrobeTransmogFrame.ModelScene:GetPlayerActor();
			for i = 1, 19  do
                if TransmogUtil.GetSlotName(i) ~= nil then
                    local info = outfit.itemTransmogInfoList[i]
                    local itemTransmogInfo = ItemUtil.CreateItemTransmogInfo(info.appearanceID, info.secondaryAppearanceID, info.illusionID);
                    local slotName = TransmogUtil.GetSlotName(i)
                    if slotName ~= nil then
                        local itemLocation = TransmogUtil.CreateTransmogLocation(slotName, Enum.TransmogType.Appearance, Enum.TransmogModification.None)
                        local itemPending = nil
                        itemPending = TransmogUtil.CreateTransmogPendingInfo(Enum.TransmogPendingType.Apply, info.appearanceID)
                        C_Transmog.SetPending(itemLocation, itemPending)
                        if i == 3 then
                            itemLocation = TransmogUtil.CreateTransmogLocation(slotName, Enum.TransmogType.Appearance, Enum.TransmogModification.Secondary)
                            itemPending = TransmogUtil.CreateTransmogPendingInfo(Enum.TransmogPendingType.Apply, info.secondaryAppearanceID or 0)
                            C_Transmog.SetPending(itemLocation, itemPending)
                        elseif i == 16 or i == 17 then
                            itemLocation = TransmogUtil.CreateTransmogLocation(slotName, Enum.TransmogType.Illusion, Enum.TransmogModification.Main)
                            itemPending = TransmogUtil.CreateTransmogPendingInfo(Enum.TransmogPendingType.Apply, info.illusionID)
                            C_Transmog.SetPending(itemLocation, itemPending)
                        end
                    end
                end
			end

		else
			for i = 1, 19  do
                if TransmogUtil.GetSlotName(i) ~= nil then
                    local appearanceID = outfit[i]
                    local illusionID = 0
                    if i == 16 then
                        illusionID = outfit.mainHandEnchant
                    elseif i == 17 then
                        illusionID = outfit.offHandEnchant
                    end
                    local itemTransmogInfo = ItemUtil.CreateItemTransmogInfo(appearanceID, 0, illusionID);
                    local slotName = TransmogUtil.GetSlotName(i)
                    if slotName ~= nil then
                        local itemLocation = TransmogUtil.CreateTransmogLocation(slotName, Enum.TransmogType.Appearance, Enum.TransmogModification.None)
                        local itemPending = TransmogUtil.CreateTransmogPendingInfo(Enum.TransmogPendingType.Apply, appearanceID)
                        C_Transmog.SetPending(itemLocation, itemPending)
                        if i == 16 or i == 17 then
                            itemLocation = TransmogUtil.CreateTransmogLocation(slotName, Enum.TransmogType.Illusion, Enum.TransmogModification.Main)
                            itemPending = TransmogUtil.CreateTransmogPendingInfo(Enum.TransmogPendingType.Apply, illusionID)
                            C_Transmog.SetPending(itemLocation, itemPending)
                        end
                    end
                    ItemTransmogInfoList[i] = itemTransmogInfo
                end
			end  

It looks like somehow the else block got used twice, but the else block only works on legacy saved sets, so it breaks loading the new ones. The functions as I pasted above are how they should work for both.

commented

In a few I'll put this through as a pull request so it can be more easily updated

commented

Thanks again. I'll get it updated shortly