11CollectionatorSummaryTMogScannerFrameMixin = CreateFromMixins (CollectionatorSummaryScannerFrameMixin )
22
3- local modelScene
4- modelScene = CreateFrame (" ModelScene" , nil , UIParent , " ModelSceneMixinTemplate" )
5- modelScene :TransitionToModelSceneID (596 , CAMERA_TRANSITION_TYPE_IMMEDIATE , CAMERA_MODIFICATION_TYPE_DISCARD , true )
6- modelScene :Hide ()
7- local frame = CreateFrame (" Frame" )
8- frame :SetScript (" OnUpdate" , function ()
9- if (modelScene :GetPlayerActor ():SetModelByUnit (" player" )) then
10- frame :SetScript (" OnUpdate" , nil )
11- end
12- end )
13-
143function CollectionatorSummaryTMogScannerFrameMixin :OnLoad ()
154 CollectionatorSummaryScannerFrameMixin .OnLoad (self )
165
@@ -34,29 +23,7 @@ function CollectionatorSummaryTMogScannerFrameMixin:GetItem(index, itemKeyInfo,
3423 if itemKeyInfo .appearanceLink ~= nil then
3524 source = tonumber (itemKeyInfo .appearanceLink :match (" transmogappearance:(%d+)" ))
3625 else
37- source = select (2 , C_TransmogCollection .GetItemInfo (scanInfo .itemKey .itemID ))
38- end
39-
40- if not source and C_Item .IsDressableItemByID (scanInfo .itemKey .itemID ) then
41- local pa = modelScene :GetPlayerActor ()
42- local invType = select (4 , C_Item .GetItemInfoInstant (scanInfo .itemKey .itemID ))
43- local mainhandOverride = invType == " INVTYPE_WEAPON" or invType == " INVTYPE_RANGEDRIGHT"
44- local slot = Collectionator .Constants .SlotMap [invType ]
45- if slot then
46- local link = select (2 , C_Item .GetItemInfo (scanInfo .itemKey .itemID ))
47- local result
48- if mainhandOverride then
49- result = pa :TryOn (link , " MAINHANDSLOT" )
50- else
51- result = pa :TryOn (link )
52- end
53- if result == Enum .ItemTryOnReason .Success then
54- local info = pa :GetItemTransmogInfo (slot )
55- if info then
56- source = info .appearanceID
57- end
58- end
59- end
26+ source = Collectionator .Utilities .RecoverTMogSource (scanInfo .itemKey .itemID )
6027 end
6128
6229 if source ~= nil and source > 0 and select (2 , C_TransmogCollection .AccountCanCollectSource (source )) then
0 commit comments