Skip to content

Commit 4a25095

Browse files
committed
Various libs changes
* Use HeroDBC for enums * Store libs in libs subfolder * Rename Enum folder to Data * Fix item base simDPS
1 parent 4c8aee5 commit 4a25095

58 files changed

Lines changed: 29 additions & 61263 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.pkgmeta

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package-as: MoreTooltipInfo
2+
3+
required-dependencies:
4+
- 410191-herodbc
5+
6+
enable-nolib-creation: no
7+
8+
license-output: LICENSE

Core.lua

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
local addonName, MTI = ...;
22
MoreTooltipInfo = MTI
3-
MoreTooltipInfo.Enum = {}
3+
MoreTooltipInfo.Data = {}
44

55
local _G = _G
66
local ACD = LibStub("AceConfigDialog-3.0")
77
local ACR = LibStub("AceConfigRegistry-3.0")
88
local IUI = LibStub("LibItemUpgradeInfo-1.0")
99
local AGUI= LibStub("AceGUI-3.0")
10+
local DBC = HeroDBC.DBC
1011

1112
local dataVersion = "9.0.2.35854"
1213
local dataDate = "2020-09-10_08:47"
@@ -291,14 +292,14 @@ function MoreTooltipInfo.getGemString(self,itemLink)
291292
end
292293

293294
function 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
298299
end
299300

300301
function 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
@@ -365,8 +366,8 @@ end
365366

366367
function 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

Enum/ItemDPS.lua renamed to Data/ItemDPS.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
-- itemID -> class -> spec -> itemlevel
2-
MoreTooltipInfo.Enum.ItemDPS = {
2+
MoreTooltipInfo.Data.ItemDPS = {
33
[158712] = {
44
[6] = {
55
[250] = {
@@ -17969,7 +17969,7 @@ MoreTooltipInfo.Enum.ItemDPS = {
1796917969
},
1797017970
[174103] = {
1797117971
[8] = {
17972-
[63] = {
17972+
[64] = {
1797317973
[125] = 1234
1797417974
}
1797517975
}

0 commit comments

Comments
 (0)