11local addonName , MTI = ... ;
22MoreTooltipInfo = MTI
3- MoreTooltipInfo .Enum = {}
3+ MoreTooltipInfo .Data = {}
44
55local _G = _G
66local ACD = LibStub (" AceConfigDialog-3.0" )
77local ACR = LibStub (" AceConfigRegistry-3.0" )
88local IUI = LibStub (" LibItemUpgradeInfo-1.0" )
99local AGUI = LibStub (" AceGUI-3.0" )
10+ local DBC = HeroDBC .DBC
1011
1112local dataVersion = " 9.0.2.35854"
1213local dataDate = " 2020-09-10_08:47"
@@ -291,14 +292,14 @@ function MoreTooltipInfo.getGemString(self,itemLink)
291292end
292293
293294function MoreTooltipInfo .GetItemSpellID (itemID )
294- local spellID = MoreTooltipInfo . Enum .ItemSpell [itemID ]
295+ local spellID = DBC .ItemSpell [itemID ]
295296 if spellID then
296297 return spellID
297298 end
298299end
299300
300301function MoreTooltipInfo .GetRPPM (spellID )
301- local rppmtable = MoreTooltipInfo . Enum . RPPM [spellID ]
302+ local rppmtable = DBC . SpellRPPM [spellID ]
302303 if not rppmtable then
303304 return nil
304305 end
365366
366367function MoreTooltipInfo .GetGCD (spellID )
367368 local gcd = 0
368- if MoreTooltipInfo . Enum . TriggerGCD [spellID ] ~= nil then
369- gcd = MoreTooltipInfo . Enum . TriggerGCD [spellID ]
369+ if DBC . SpellGCD [spellID ] ~= nil then
370+ gcd = DBC . SpellGCD [spellID ]
370371 else
371372 return nil
372373 end
@@ -377,9 +378,10 @@ function MoreTooltipInfo.GetDPS(itemLink,itemID,tooltip)
377378 local dps
378379 local specID = MoreTooltipInfo .GetSpecID ()
379380 local classID = MoreTooltipInfo .GetClassID ()
380- if MoreTooltipInfo .Enum .ItemDPS [itemID ] then
381- local itemData = MoreTooltipInfo .Enum .ItemDPS [itemID ]
381+ if MoreTooltipInfo .Data .ItemDPS [itemID ] then
382+ local itemData = MoreTooltipInfo .Data .ItemDPS [itemID ]
382383 local itemlevel = IUI :GetUpgradedItemLevel (itemLink ) or 0
384+ print (itemlevel ,specID ,classID )
383385 if itemlevel and specID and classID then
384386 if itemData [classID ] and itemData [classID ][specID ] and itemData [classID ][specID ][itemlevel ] then
385387 dps = MoreTooltipInfo .FormatSpace (itemData [classID ][specID ][itemlevel ])
@@ -419,8 +421,7 @@ function MoreTooltipInfo.ItemDPSTooltip(destination, itemLink, itemID, personnal
419421 local InfoType
420422 local specID = MoreTooltipInfo .GetSpecID ()
421423 local classID = MoreTooltipInfo .GetClassID ()
422-
423- if personnalData == " Base" then
424+ if personnalData == " base" then
424425 if itemEquipLoc == " INVTYPE_TRINKET" then -- trinkets
425426 InfoType = " trinket"
426427 local dps = MoreTooltipInfo .GetDPS (itemLink , itemID , destination )
@@ -443,7 +444,6 @@ function MoreTooltipInfo.ItemDPSTooltip(destination, itemLink, itemID, personnal
443444 end
444445 elseif personnalData == " legendary" then
445446 if itemRarity == 5 then -- legendaries
446- --[[ elseif itemRarity == 5 then --legendaries ]]
447447 InfoType = " legendary"
448448 local itemSplit = MoreTooltipInfo .GetItemSplit (itemLink )
449449 local bonusIDs = MoreTooltipInfo .GetItemBonusID (itemSplit )
@@ -684,7 +684,7 @@ function MoreTooltipInfo.ItemTooltipOverride(self)
684684 local enchantID = itemSplit [2 ]
685685 if enchantID > 0 then
686686 if cfg .enableItemEnchantID then MoreTooltipInfo .TooltipLine (self , enchantID , " EnchantID" ) end
687- local enchantSpellID = MoreTooltipInfo . Enum .SpellEnchants [enchantID ]
687+ local enchantSpellID = DBC .SpellEnchants [enchantID ]
688688 if enchantSpellID then -- enchant, we put enchant spellid and rppm
689689 if cfg .enableItemEnchantSpellID then MoreTooltipInfo .TooltipLine (self , enchantSpellID , " Enchant SpellID" ) end
690690 if cfg .enableItemEnchantSpellRPPM then MoreTooltipInfo .RPPMTooltip (self , enchantSpellID , " Enchant RPPM" ) end
0 commit comments