Compare commits

...

1 Commits

Author SHA1 Message Date
Bluewhale1337 a1295449d2 fix(tooltip): resolve global ID nil crash across all Tooltip functions 2026-07-27 00:09:29 +02:00
2 changed files with 37 additions and 36 deletions
+36 -36
View File
@@ -273,7 +273,7 @@ function TT:SetItemRef(link)
if find(link, "^item:") then
if E.db.tooltip.spellID then
local id = tonumber(match(link, "(%d+)"))
ItemRefTooltip:AddLine(format("|cFFCA3C3C%s|r %d", ID, id))
ItemRefTooltip:AddLine(format("|cFFCA3C3C%s|r %d", (ID or "ID"), id))
end
end
ItemRefTooltip:Show()
@@ -312,8 +312,8 @@ function TT:SetAction(tt, buttonID)
self:SetPrice(tt, id, count)
end
if E.db.tooltip.spellID then
tt:AddLine(format("|cFFCA3C3C%s|r %d", ID, id))
if E.db.tooltip.spellID and id then
tt:AddLine(format("|cFFCA3C3C%s|r %d", (ID or "ID"), id))
end
tt:Show()
end
@@ -329,8 +329,8 @@ function TT:SetAuctionItem(tt, type, index)
self:SetPrice(tt, id, count)
end
if E.db.tooltip.spellID then
tt:AddLine(format("|cFFCA3C3C%s|r %d", ID, id))
if E.db.tooltip.spellID and id then
tt:AddLine(format("|cFFCA3C3C%s|r %d", (ID or "ID"), id))
end
tt:Show()
end
@@ -346,8 +346,8 @@ function TT:SetAuctionSellItem(tt)
self:SetPrice(tt, id, count)
end
if E.db.tooltip.spellID then
tt:AddLine(format("|cFFCA3C3C%s|r %d", ID, id))
if E.db.tooltip.spellID and id then
tt:AddLine(format("|cFFCA3C3C%s|r %d", (ID or "ID"), id))
end
tt:Show()
end
@@ -362,8 +362,8 @@ function TT:SetBagItem(tt, bag, slot)
local _, count = GetContainerItemInfo(bag, slot)
self:SetPrice(tt, id, count)
end
if E.db.tooltip.spellID then
tt:AddLine(format("|cFFCA3C3C%s|r %d", ID, id))
if E.db.tooltip.spellID and id then
tt:AddLine(format("|cFFCA3C3C%s|r %d", (ID or "ID"), id))
end
tt:Show()
end
@@ -382,8 +382,8 @@ function TT:SetCraftItem(tt, skill, slot)
self:SetPrice(tt, id, count)
end
if E.db.tooltip.spellID then
tt:AddLine(format("|cFFCA3C3C%s|r %d", ID, id))
if E.db.tooltip.spellID and id then
tt:AddLine(format("|cFFCA3C3C%s|r %d", (ID or "ID"), id))
end
tt:Show()
end
@@ -394,8 +394,8 @@ function TT:SetCraftSpell(tt, id)
local id = tonumber(match(link, "enchant:(%d+)"))
if E.db.tooltip.spellID then
tt:AddLine(format("|cFFCA3C3C%s|r %d", ID, id))
if E.db.tooltip.spellID and id then
tt:AddLine(format("|cFFCA3C3C%s|r %d", (ID or "ID"), id))
end
tt:Show()
end
@@ -422,7 +422,7 @@ function TT:SetHyperlink(tt, link, count)
if tt:GetName() == "GameTooltip" then
if E.db.tooltip.spellID and id then
tt:AddLine(format("|cFFCA3C3C%s|r %d", ID, id))
tt:AddLine(format("|cFFCA3C3C%s|r %d", (ID or "ID"), id))
end
end
@@ -440,8 +440,8 @@ function TT:SetInboxItem(tt, index, attachmentIndex)
self:SetPrice(tt, id, count)
end
if E.db.tooltip.spellID then
tt:AddLine(format("|cFFCA3C3C%s|r %d", ID, id))
if E.db.tooltip.spellID and id then
tt:AddLine(format("|cFFCA3C3C%s|r %d", (ID or "ID"), id))
end
tt:Show()
end
@@ -463,8 +463,8 @@ function TT:SetInventoryItem(tt, unit, slot)
self:SetPrice(tt, id, count)
end
if E.db.tooltip.spellID then
tt:AddLine(format("|cFFCA3C3C%s|r %d", ID, id))
if E.db.tooltip.spellID and id then
tt:AddLine(format("|cFFCA3C3C%s|r %d", (ID or "ID"), id))
end
tt:Show()
end
@@ -479,8 +479,8 @@ function TT:SetLootItem(tt, slot)
local _, _, count = GetLootSlotInfo(slot)
self:SetPrice(tt, id, count)
end
if E.db.tooltip.spellID then
tt:AddLine(format("|cFFCA3C3C%s|r %d", ID, id))
if E.db.tooltip.spellID and id then
tt:AddLine(format("|cFFCA3C3C%s|r %d", (ID or "ID"), id))
end
tt:Show()
end
@@ -495,8 +495,8 @@ function TT:SetLootRollItem(tt, rollID)
local _, _, count = GetLootRollItemInfo(rollID)
self:SetPrice(tt, id, count)
end
if E.db.tooltip.spellID then
tt:AddLine(format("|cFFCA3C3C%s|r %d", ID, id))
if E.db.tooltip.spellID and id then
tt:AddLine(format("|cFFCA3C3C%s|r %d", (ID or "ID"), id))
end
tt:Show()
end
@@ -511,8 +511,8 @@ function TT:SetMerchantItem(tt, slot)
local _, _, _, count = GetMerchantItemInfo(slot)
self:SetPrice(tt, id, count)
end
if E.db.tooltip.spellID then
tt:AddLine(format("|cFFCA3C3C%s|r %d", ID, id))
if E.db.tooltip.spellID and id then
tt:AddLine(format("|cFFCA3C3C%s|r %d", (ID or "ID"), id))
end
tt:Show()
end
@@ -527,8 +527,8 @@ function TT:SetQuestItem(tt, type, slot)
local _, _, count = GetQuestItemInfo(type, slot)
self:SetPrice(tt, id, count)
end
if E.db.tooltip.spellID then
tt:AddLine(format("|cFFCA3C3C%s|r %d", ID, id))
if E.db.tooltip.spellID and id then
tt:AddLine(format("|cFFCA3C3C%s|r %d", (ID or "ID"), id))
end
tt:Show()
end
@@ -543,8 +543,8 @@ function TT:SetQuestLogItem(tt, type, index)
local _, _, count = GetQuestLogRewardInfo(index)
self:SetPrice(tt, id, count)
end
if E.db.tooltip.spellID then
tt:AddLine(format("|cFFCA3C3C%s|r %d", ID, id))
if E.db.tooltip.spellID and id then
tt:AddLine(format("|cFFCA3C3C%s|r %d", (ID or "ID"), id))
end
tt:Show()
end
@@ -560,8 +560,8 @@ function TT:SetSendMailItem(tt, index)
self:SetPrice(tt, id, count)
end
if E.db.tooltip.spellID then
tt:AddLine(format("|cFFCA3C3C%s|r %d", ID, id))
if E.db.tooltip.spellID and id then
tt:AddLine(format("|cFFCA3C3C%s|r %d", (ID or "ID"), id))
end
tt:Show()
end
@@ -577,8 +577,8 @@ function TT:SetTradePlayerItem(tt, index)
self:SetPrice(tt, id, count)
end
if E.db.tooltip.spellID then
tt:AddLine(format("|cFFCA3C3C%s|r %d", ID, id))
if E.db.tooltip.spellID and id then
tt:AddLine(format("|cFFCA3C3C%s|r %d", (ID or "ID"), id))
end
tt:Show()
end
@@ -599,8 +599,8 @@ function TT:SetTradeSkillItem(tt, skill, slot)
self:SetPrice(tt, id, count)
end
if E.db.tooltip.spellID then
tt:AddLine(format("|cFFCA3C3C%s|r %d", ID, id))
if E.db.tooltip.spellID and id then
tt:AddLine(format("|cFFCA3C3C%s|r %d", (ID or "ID"), id))
end
tt:Show()
end
@@ -616,8 +616,8 @@ function TT:SetTradeTargetItem(tt, index)
self:SetPrice(tt, id, count)
end
if E.db.tooltip.spellID then
tt:AddLine(format("|cFFCA3C3C%s|r %d", ID, id))
if E.db.tooltip.spellID and id then
tt:AddLine(format("|cFFCA3C3C%s|r %d", (ID or "ID"), id))
end
tt:Show()
end
+1
View File
@@ -6,6 +6,7 @@
# This repository is actively being fixed and maintained by Bluewhale.
## Changelog
- **Fix:** Fixed global ID Lua 5.0 varargs crash across all Tooltip functions.
- **Fix:** Fixed a Lua 5.0 syntax error in `AceConfigDialog-3.0.lua` where the `#` length operator was used instead of `table.getn`, preventing ElvUI_Config from loading.
- **Fix:** Fixed nil ID formatting crash in Tooltip's SetHyperlink.
- **Fix:** Removed implicit `arg` table memory leaks in high-frequency oUF element updates by replacing varargs (`...`) with static parameters.