Skip to content

Commit 4cfc0cc

Browse files
committed
v0.9.63
1 parent be274ab commit 4cfc0cc

15 files changed

+82
-32
lines changed

ImproveAny.toc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
## Interface-Cata: 40400
55
## Interface: 100207
66

7-
## Version: 0.9.62
7+
## Version: 0.9.63
88
## Title: ImproveAny by |cff3FC7EBD4KiR |T132115:16:16:0:0|t
99
## Notes: Improve Any Ui or Frame
1010
## Author: D4KiR

ImproveAny_Cata.toc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## Interface: 40400
2-
## Version: 0.9.62
2+
## Version: 0.9.63
33
## Title: ImproveAny |T136033:16:16:0:0|t by |cff3FC7EBD4KiR |T132115:16:16:0:0|t
44
## Notes: Improve Any Ui or Frame
55
## Author: D4KiR

ImproveAny_TBC.toc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## Interface: 20504
2-
## Version: 0.9.62
2+
## Version: 0.9.63
33
## Title: ImproveAny |T136033:16:16:0:0|t by |cff3FC7EBD4KiR |T132115:16:16:0:0|t
44
## Notes: Improve Any Ui or Frame
55
## Author: D4KiR

ImproveAny_Vanilla.toc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## Interface: 11502
2-
## Version: 0.9.62
2+
## Version: 0.9.63
33
## Title: ImproveAny |T136033:16:16:0:0|t by |cff3FC7EBD4KiR |T132115:16:16:0:0|t
44
## Notes: Improve Any Ui or Frame
55
## Author: D4KiR

ImproveAny_Wrath.toc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## Interface: 30403
2-
## Version: 0.9.62
2+
## Version: 0.9.63
33
## Title: ImproveAny |T136033:16:16:0:0|t by |cff3FC7EBD4KiR |T132115:16:16:0:0|t
44
## Notes: Improve Any Ui or Frame
55
## Author: D4KiR

core.lua

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ local warningEnhanceTrainers = false
155155
function ImproveAny:Event(event, ...)
156156
if ImproveAny.Setup == nil then
157157
ImproveAny.Setup = true
158-
if IsAddOnLoaded("D4KiR MoveAndImprove") then
158+
if D4:IsAddOnLoaded("D4KiR MoveAndImprove") then
159159
ImproveAny:MSG("DON'T use MoveAndImprove, when you use ImproveAny")
160160
end
161161

@@ -391,7 +391,7 @@ function ImproveAny:Event(event, ...)
391391
end
392392

393393
if itemId then
394-
local _, _, _, _, _, _, _, itemStackCount, _, _, price, _, _, _, expacID, _, _ = GetItemInfo(itemId)
394+
local _, _, _, _, _, _, _, itemStackCount, _, _, price, _, _, _, expacID, _, _ = D4:GetItemInfo(itemId)
395395
if expacID and ImproveAny:IsEnabled("TOOLTIPEXPANSION", false) then
396396
local textcolor = "|cFFFF1111"
397397
if expacID >= GetExpansionLevel() then
@@ -444,7 +444,7 @@ function ImproveAny:Event(event, ...)
444444
if itemLink then
445445
local itemId = tonumber(strmatch(itemLink, "item:(%d*)"))
446446
if itemId then
447-
local _, _, _, _, _, _, _, itemStackCount, _, _, price, _, _, _, _, _, _ = GetItemInfo(itemId)
447+
local _, _, _, _, _, _, _, itemStackCount, _, _, price, _, _, _, _, _, _ = D4:GetItemInfo(itemId)
448448
if price and tt.shownMoneyFrames == nil and price > 0 and GetItemCount and GetCoinTextureString then
449449
local count = GetItemCount(itemId)
450450
if ImproveAny:IsEnabled("TOOLTIPSELLPRICE", false) then
@@ -696,7 +696,7 @@ function ImproveAny:Event(event, ...)
696696
TradeSkillInvSlotDropDown:SetPoint("TOPLEFT", TradeSkillFrame, "TOPLEFT", 510, -40)
697697
TradeSkillSubClassDropDown:ClearAllPoints()
698698
TradeSkillSubClassDropDown:SetPoint("RIGHT", TradeSkillInvSlotDropDown, "LEFT", 0, 0)
699-
if IsAddOnLoaded("ClassicProfessionFilter") and TradeSkillFrame.SearchBox and TradeSkillFrame.HaveMats and TradeSkillFrame.HaveMats.text and D4:GetWoWBuild() ~= "RETAIL" and D4:GetWoWBuild() ~= "CATA" then
699+
if D4:IsAddOnLoaded("ClassicProfessionFilter") and TradeSkillFrame.SearchBox and TradeSkillFrame.HaveMats and TradeSkillFrame.HaveMats.text and D4:GetWoWBuild() ~= "RETAIL" and D4:GetWoWBuild() ~= "CATA" then
700700
TradeSkillFrame.SearchBox:ClearAllPoints()
701701
TradeSkillFrame.SearchBox:SetPoint("LEFT", TradeSkillRankFrame, "RIGHT", 20, -10)
702702
TradeSkillFrame.HaveMats:ClearAllPoints()
@@ -723,7 +723,7 @@ function ImproveAny:Event(event, ...)
723723
end
724724
end
725725

726-
if IsAddOnLoaded("Blizzard_TradeSkillUI") then
726+
if D4:IsAddOnLoaded("Blizzard_TradeSkillUI") then
727727
TradeSkillFunc("TradeSkill")
728728
else
729729
local waitFrame = CreateFrame("FRAME")
@@ -848,7 +848,7 @@ function ImproveAny:Event(event, ...)
848848
end
849849
)
850850

851-
if IsAddOnLoaded("ClassicProfessionFilter") and CraftFrame.SearchBox and CraftFrame.HaveMats and CraftFrame.HaveMats.text and CraftFrame.SearchMats and CraftFrame.SearchMats.text then
851+
if D4:IsAddOnLoaded("ClassicProfessionFilter") and CraftFrame.SearchBox and CraftFrame.HaveMats and CraftFrame.HaveMats.text and CraftFrame.SearchMats and CraftFrame.SearchMats.text then
852852
CraftFrame.SearchBox:ClearAllPoints()
853853
CraftFrame.SearchBox:SetPoint("LEFT", CraftRankFrame, "RIGHT", 20, -10)
854854
CraftFrame.HaveMats:ClearAllPoints()
@@ -875,7 +875,7 @@ function ImproveAny:Event(event, ...)
875875
end
876876
end
877877

878-
if IsAddOnLoaded("Blizzard_CraftUI") then
878+
if D4:IsAddOnLoaded("Blizzard_CraftUI") then
879879
CraftFunc()
880880
else
881881
local waitFrame = CreateFrame("FRAME")
@@ -998,7 +998,7 @@ function ImproveAny:Event(event, ...)
998998
ClassTrainerGreetingText:Hide()
999999
end
10001000

1001-
if IsAddOnLoaded("Blizzard_TrainerUI") then
1001+
if D4:IsAddOnLoaded("Blizzard_TrainerUI") then
10021002
TrainerFunc()
10031003
else
10041004
local waitFrame = CreateFrame("FRAME")
@@ -1136,7 +1136,7 @@ function ImproveAny:Event(event, ...)
11361136
)
11371137
end
11381138

1139-
if IsAddOnLoaded("Blizzard_TradeSkillUI") then
1139+
if D4:IsAddOnLoaded("Blizzard_TradeSkillUI") then
11401140
InitTSF()
11411141
else
11421142
local waitFrame = CreateFrame("FRAME")

ele/bags.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ function ImproveAny:InitBags()
122122
end
123123

124124
IABagBar = CreateFrame("FRAME", "IABagBar", BagsBar or UIParent)
125-
if IsAddOnLoaded("Dominos") and ImproveAny:GV("BAGMODE", "RETAIL") ~= "DISABLED" then
125+
if D4:IsAddOnLoaded("Dominos") and ImproveAny:GV("BAGMODE", "RETAIL") ~= "DISABLED" then
126126
ImproveAny:MSG(format("Dominos is enabled, BAGMODE: %s may can break Domonis moving the bag bar.", ImproveAny:GV("BAGMODE", "RETAIL")))
127127
end
128128

@@ -326,4 +326,4 @@ function ImproveAny:InitBags()
326326
end
327327
end
328328
)
329-
end
329+
end

ele/chat.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ function ImproveAny:InitChat()
469469
local typ, id = string.match(itemString, "|H(.-):(.-)|h")
470470
if typ == "item" then
471471
id = string.match(id, "(%d+)")
472-
local itemName, _, _, _, _, _, _, _, _, itemTexture = GetItemInfo(id)
472+
local itemName, _, _, _, _, _, _, _, _, itemTexture = D4:GetItemInfo(id)
473473
if itemName and itemTexture then
474474
if ImproveAny:IsEnabled("CHATITEMICONS", false) then
475475
return "|T" .. itemTexture .. ":0|t" .. itemString
@@ -644,4 +644,4 @@ function ImproveAny:InitChat()
644644
ChatFrame_AddMessageEventFilter(typ, ImproveAny.ConvertMessage)
645645
end
646646
end
647-
end
647+
end

ele/itemlevel.lua

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ function ImproveAny:PDUpdateItemInfos()
5151
if SLOT and SLOT.iatext ~= nil and GetInventoryItemLink and SLOT.GetID and SLOT:GetID() then
5252
local ItemID = GetInventoryItemLink("PLAYER", SLOT:GetID()) or GetInventoryItemID("PLAYER", SLOT:GetID())
5353
if ItemID ~= nil and GetDetailedItemLevelInfo then
54-
local _, _, rarity = GetItemInfo(ItemID)
54+
local _, _, rarity = D4:GetItemInfo(ItemID)
5555
local ilvl, _, _ = GetDetailedItemLevelInfo(ItemID)
5656
local color = ITEM_QUALITY_COLORS[rarity]
5757
local current, maximum = GetInventoryItemDurability(i)
@@ -136,7 +136,7 @@ function ImproveAny:PDUpdateItemInfos()
136136
if count > 0 then
137137
local max = 16 -- when only IAnhand
138138
if GetInventoryItemID("PLAYER", 17) then
139-
local t1 = GetItemInfo(GetInventoryItemLink("PLAYER", 17))
139+
local t1 = D4:GetItemInfo(GetInventoryItemLink("PLAYER", 17))
140140
-- when 2x 1handed
141141
if t1 then
142142
max = 17
@@ -226,7 +226,7 @@ function ImproveAny:InitItemLevel()
226226
if SLOT and SLOT.iatext ~= nil and GetInventoryItemLink then
227227
local ItemID = GetInventoryItemLink("TARGET", SLOT:GetID()) --GetInventoryItemID("PLAYER", SLOT:GetID())
228228
if ItemID and GetDetailedItemLevelInfo then
229-
local _, _, rarity = GetItemInfo(ItemID)
229+
local _, _, rarity = D4:GetItemInfo(ItemID)
230230
local ilvl, _, _ = GetDetailedItemLevelInfo(ItemID)
231231
local color = ITEM_QUALITY_COLORS[rarity]
232232
if ImproveAny:IsEnabled("ITEMLEVEL", false) and ilvl and color then
@@ -270,7 +270,7 @@ function ImproveAny:InitItemLevel()
270270
local max = 16 -- when only IAnhand
271271
local ItemID = GetInventoryItemLink("TARGET", 17)
272272
if GetItemInfo and GetInventoryItemID and ItemID ~= nil then
273-
local t1 = GetItemInfo(ItemID)
273+
local t1 = D4:GetItemInfo(ItemID)
274274
-- when 2x 1handed
275275
if t1 then
276276
max = 17
@@ -351,7 +351,7 @@ function ImproveAny:InitItemLevel()
351351
local slotLink = ImproveAny:GetContainerItemLink(bagID, slotID)
352352
ImproveAny:AddIlvl(SLOT, slotID)
353353
if slotLink and GetDetailedItemLevelInfo then
354-
local _, _, rarity, _, _, _, _, _, _, _, _, classID, subclassID = GetItemInfo(slotLink)
354+
local _, _, rarity, _, _, _, _, _, _, _, _, classID, subclassID = D4:GetItemInfo(slotLink)
355355
local ilvl, _, _ = GetDetailedItemLevelInfo(slotLink)
356356
local color = ITEM_QUALITY_COLORS[rarity]
357357
if ilvl and color then
@@ -489,4 +489,4 @@ function ImproveAny:InitItemLevel()
489489
end
490490
)
491491
end
492-
end
492+
end

ele/repbar.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ C_Timer.After(
2323
)
2424

2525
if ImproveAny:IsEnabled("REPHIDEARTWORK", false) then
26-
if not IsAddOnLoaded("MoveAny") then
26+
if not D4:IsAddOnLoaded("MoveAny") then
2727
hooksecurefunc(
2828
ReputationWatchBar,
2929
"SetHeight",

ele/skillbars.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ function ImproveAny:GetWeaponSkillData(id)
6060
if subTypes[item] then
6161
itemname, itemcur, itemmax = ImproveAny:GetSkillData(subTypes[item])
6262
else
63-
local _, _, _, _, _, _, itemSubType = GetItemInfo(item)
63+
local _, _, _, _, _, _, itemSubType = D4:GetItemInfo(item)
6464
if itemSubType then
6565
if AUCTION_SUBCATEGORY_ONE_HANDED then
6666
local s1, e1 = string.find(itemSubType, AUCTION_SUBCATEGORY_ONE_HANDED, 1, true)
@@ -194,4 +194,4 @@ function ImproveAny:InitSkillBars()
194194
ImproveAny:AddStatusBar(ImproveAny.GetSkillData, string.lower(PROFESSIONS_FISHING))
195195
ImproveAny:SkillsThink()
196196
end
197-
end
197+
end

ele/worldmapframe.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function ImproveAny:InitWorldMapFrame()
2626
WorldMapFrame.ScrollContainer.GetCursorPosition = function(fr)
2727
local x, y = MapCanvasScrollControllerMixin.GetCursorPosition(fr)
2828
local scale = WorldMapFrame:GetScale()
29-
if not IsAddOnLoaded("Mapster") and not IsAddOnLoaded("GW2_UI") then
29+
if not D4:IsAddOnLoaded("Mapster") and not D4:IsAddOnLoaded("GW2_UI") then
3030
return x / scale, y / scale
3131
else
3232
local reverseEffectiveScale = 1 / UIParent:GetEffectiveScale()
@@ -229,4 +229,4 @@ function ImproveAny:InitWorldMapFrame()
229229

230230
curCoords:IAUpdate()
231231
end
232-
end
232+
end

ele/xpbar.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ function ImproveAny:InitXPBar()
299299
end
300300

301301
if MainMenuExpBar then
302-
if not IsAddOnLoaded("MoveAny") then
302+
if not D4:IsAddOnLoaded("MoveAny") then
303303
MainMenuExpBar:SetHeight(15)
304304
end
305305

libs/D4Lib/D4Lib.lua

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,56 @@ local ICON_TAG_LIST_EN = {
7979
["skull"] = 8,
8080
}
8181

82+
function D4:GetCVar(name)
83+
if C_CVar and C_CVar.GetCVar then return C_CVar.GetCVar(name) end
84+
if GetCVar then return GetCVar(name) end
85+
print("[D4][GetCVar] FAILED")
86+
87+
return nil
88+
end
89+
90+
function D4:GetItemInfo(itemID)
91+
if itemID == nil then return nil end
92+
if C_Item and C_Item.GetItemInfo then return C_Item.GetItemInfo(itemID) end
93+
if GetItemInfo then return GetItemInfo(itemID) end
94+
print("[D4][GetItemInfo] FAILED")
95+
96+
return nil
97+
end
98+
99+
function D4:GetSpellInfo(spellID)
100+
if spellID == nil then return nil end
101+
if C_Spell and C_Spell.GetSpellInfo then return C_Spell.GetSpellInfo(spellID) end
102+
if GetSpellInfo then return GetSpellInfo(spellID) end
103+
print("[D4][GetSpellInfo] FAILED")
104+
105+
return nil
106+
end
107+
108+
function D4:GetMouseFocus()
109+
if GetMouseFoci then return GetMouseFoci() end
110+
if GetMouseFocus then return GetMouseFocus() end
111+
print("[D4][GetMouseFocus] FAILED")
112+
113+
return nil
114+
end
115+
116+
function D4:LoadAddOn(name)
117+
if C_AddOns and C_AddOns.LoadAddOn then return C_AddOns.LoadAddOn(name) end
118+
if LoadAddOn then return LoadAddOn(name) end
119+
print("[D4][LoadAddOn] FAILED")
120+
121+
return nil
122+
end
123+
124+
function D4:IsAddOnLoaded(name)
125+
if C_AddOns and C_AddOns.IsAddOnLoaded then return C_AddOns.IsAddOnLoaded(name) end
126+
if IsAddOnLoaded then return IsAddOnLoaded(name) end
127+
print("[D4][IsAddOnLoaded] FAILED")
128+
129+
return nil
130+
end
131+
82132
local function FixIconChat(self, event, message, author, ...)
83133
if ICON_LIST then
84134
for tag in string.gmatch(message, "%b{}") do

settings.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,8 +420,8 @@ function ImproveAny:InitIASettings()
420420
IASettings:Hide()
421421
end
422422

423-
D4:SetVersion(AddonName, 136033, "0.9.62")
424-
IASettings.TitleText:SetText(format("ImproveAny |T136033:16:16:0:0|t v|cff3FC7EB%s", "0.9.62"))
423+
D4:SetVersion(AddonName, 136033, "0.9.63")
424+
IASettings.TitleText:SetText(format("ImproveAny |T136033:16:16:0:0|t v|cff3FC7EB%s", "0.9.63"))
425425
IASettings.CloseButton:SetScript(
426426
"OnClick",
427427
function()

0 commit comments

Comments
 (0)