@@ -243,11 +243,11 @@ local function GearScoreGetQuality(ItemScore)
243243 for i = 0 , 6 do
244244 if ((ItemScore > i * 1000 ) and (ItemScore <= ((i + 1 ) * 1000 ))) then
245245 local Red = gsQuality [(i + 1 ) * 1000 ].Red [" A" ] +
246- (((ItemScore - gsQuality [(i + 1 ) * 1000 ].Red [" B" ]) * gsQuality [(i + 1 ) * 1000 ].Red [" C" ]) * gsQuality [(i + 1 ) * 1000 ].Red [" D" ])
246+ (((ItemScore - gsQuality [(i + 1 ) * 1000 ].Red [" B" ]) * gsQuality [(i + 1 ) * 1000 ].Red [" C" ]) * gsQuality [(i + 1 ) * 1000 ].Red [" D" ])
247247 local Blue = gsQuality [(i + 1 ) * 1000 ].Green [" A" ] +
248- (((ItemScore - gsQuality [(i + 1 ) * 1000 ].Green [" B" ]) * gsQuality [(i + 1 ) * 1000 ].Green [" C" ]) * gsQuality [(i + 1 ) * 1000 ].Green [" D" ])
248+ (((ItemScore - gsQuality [(i + 1 ) * 1000 ].Green [" B" ]) * gsQuality [(i + 1 ) * 1000 ].Green [" C" ]) * gsQuality [(i + 1 ) * 1000 ].Green [" D" ])
249249 local Green = gsQuality [(i + 1 ) * 1000 ].Blue [" A" ] +
250- (((ItemScore - gsQuality [(i + 1 ) * 1000 ].Blue [" B" ]) * gsQuality [(i + 1 ) * 1000 ].Blue [" C" ]) * gsQuality [(i + 1 ) * 1000 ].Blue [" D" ])
250+ (((ItemScore - gsQuality [(i + 1 ) * 1000 ].Blue [" B" ]) * gsQuality [(i + 1 ) * 1000 ].Blue [" C" ]) * gsQuality [(i + 1 ) * 1000 ].Blue [" D" ])
251251 -- we swap up blue and green because for some reason the coloring of level power works like that
252252 return Red , Blue , Green , gsQuality [(i + 1 ) * 1000 ].Description
253253 end
@@ -293,7 +293,7 @@ local function GearScoreGetItemScore(ItemLink)
293293 end
294294 if (ItemRarity >= 2 ) and (ItemRarity <= 4 ) then
295295 GearScore = floor (((ItemLevel - Table [ItemRarity ].A ) / Table [ItemRarity ].B ) *
296- gsItemTypes [ItemEquipLoc ].SlotMOD * Scale * QualityScale )
296+ gsItemTypes [ItemEquipLoc ].SlotMOD * Scale * QualityScale )
297297
298298 if (ItemLevel == 187.05 ) then
299299 ItemLevel = 0
@@ -479,20 +479,26 @@ local function UpdateEquip(charInfo, ...)
479479 if isEmpty then
480480 charInfo .equippedItems [equipmentSlot ] = nil
481481 else
482- local itemLink = GetInventoryItemLink (" player" , equipmentSlot )
483- if itemLink then
484- local itemID = GetInventoryItemID (" player" , equipmentSlot )
485- local itemName , _ , itemQuality , _ , _ , _ , _ , _ , itemEquipLoc = C_Item .GetItemInfo (itemLink )
486-
487- charInfo .equippedItems [equipmentSlot ] = {
488- itemTexture = GetInventoryItemTexture (" player" , equipmentSlot ),
489- itemLevel = C_Item .GetDetailedItemLevelInfo (itemLink ),
490- itemName = itemName ,
491- itemQuality = itemQuality ,
492- itemID = itemID ,
493- itemLink = itemLink ,
494- itemSlot = _G [itemEquipLoc ],
495- }
482+ local itemID = GetInventoryItemID (" player" , equipmentSlot )
483+ if itemID then
484+ local itemObject = Item :CreateFromItemID (itemID )
485+ itemObject :ContinueOnItemLoad (function ()
486+ local itemLink = GetInventoryItemLink (" player" , equipmentSlot )
487+ local itemName = itemObject :GetItemName ()
488+ local itemQuality = itemObject :GetItemQuality ()
489+ local itemEquipLoc = itemObject :GetInventoryTypeName ()
490+
491+ charInfo .equippedItems [equipmentSlot ] = {
492+ equipmentSlot = equipmentSlot ,
493+ itemTexture = GetInventoryItemTexture (" player" , equipmentSlot ),
494+ itemLevel = C_Item .GetDetailedItemLevelInfo (itemLink ),
495+ itemName = itemName ,
496+ itemQuality = itemQuality ,
497+ itemID = itemID ,
498+ itemLink = itemLink ,
499+ itemSlot = _G [itemEquipLoc ],
500+ }
501+ end )
496502 else
497503 charInfo .equippedItems [equipmentSlot ] = nil
498504 end
@@ -687,7 +693,7 @@ function PermoksAccountManager:HighestKeyTooltip_OnEnter(button, alt_data)
687693 for _ , info in ipairs (alt_data .mythicPlusHistory ) do
688694 runPerDungeon [info .mapChallengeModeID ] = runPerDungeon [info .mapChallengeModeID ] or {}
689695 runPerDungeon [info .mapChallengeModeID ][info .level ] = (runPerDungeon [info .mapChallengeModeID ][info .level ] or 0 ) +
690- 1
696+ 1
691697
692698 tinsert (runs , info .level )
693699 end
@@ -726,7 +732,7 @@ function PermoksAccountManager:HighestKeyTooltip_OnEnter(button, alt_data)
726732 tooltip :Show ()
727733end
728734
729- local equipmentSlotOrdered = {1 , 2 , 3 , 15 , 5 , 4 , 19 , 9 , 10 , 6 , 7 , 8 , 11 , 12 , 13 , 14 , 16 , 17 , 18 }
735+ local equipmentSlotOrdered = { 1 , 2 , 3 , 15 , 5 , 4 , 19 , 9 , 10 , 6 , 7 , 8 , 11 , 12 , 13 , 14 , 16 , 17 , 18 }
730736
731737function PermoksAccountManager :CustomEquippedItemsTooltip_OnEnter (button , altData , labelRow )
732738 if not altData or not altData .equippedItems then
@@ -742,7 +748,34 @@ function PermoksAccountManager:CustomEquippedItemsTooltip_OnEnter(button, altDat
742748 for _ , equipmentSlot in ipairs (equipmentSlotOrdered ) do
743749 local item = altData .equippedItems [equipmentSlot ]
744750 if item then
745- tooltip :AddLine (string.format (" %s:" , item .itemSlot ), string.format (" |T%d:0|t|c%s[%s]|r [%d]" , item .itemTexture , ITEM_QUALITY_COLORS [item .itemQuality ].color :GenerateHexColor (), item .itemName , item .itemLevel ))
751+ if (not item .itemName or not item .itemTexture or not item .itemQuality or not item .itemLink or not item .itemSlot ) and item .itemID then
752+ local itemObject = Item :CreateFromItemID (item .itemID )
753+ local y , x = tooltip :AddLine ()
754+ itemObject :ContinueOnItemLoad (function ()
755+ item .itemLink = itemObject :GetItemLink ()
756+ item .itemQuality = itemObject :GetItemQuality ()
757+ item .itemName = itemObject :GetItemName ()
758+ item .itemSlot = _G [itemObject :GetInventoryTypeName ()]
759+ item .itemTexture = itemObject :GetItemIcon ()
760+
761+ if tooltip :IsAcquiredBy (addonName .. ' Tooltip' ) then
762+ tooltip :SetCell (y , 1 , string.format (" %s:" , item .itemSlot ))
763+ tooltip :SetCell (y , 2 ,
764+ string.format (" |T%d:0|t|c%s[%s]|r [%s]" , item .itemTexture ,
765+ ITEM_QUALITY_COLORS [item .itemQuality ].color :GenerateHexColor (), item .itemName ,
766+ item .itemLevel or " N/A" ))
767+ end
768+ end )
769+ else
770+ if not item .itemLevel and altData .GUID == UnitGUID (" player" ) then
771+
772+ end
773+
774+ tooltip :AddLine (string.format (" %s:" , item .itemSlot ),
775+ string.format (" |T%d:0|t|c%s[%s]|r [%s]" , item .itemTexture ,
776+ ITEM_QUALITY_COLORS [item .itemQuality ].color :GenerateHexColor (), item .itemName ,
777+ item .itemLevel or " N/A" ))
778+ end
746779 end
747780 end
748781
0 commit comments