Skip to content

Commit

Permalink
Fix a few bugs in SLDataText
Browse files Browse the repository at this point in the history
  • Loading branch information
azuraji committed Nov 19, 2022
1 parent 852ef84 commit dc4d0f0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions Elements/bag.lua
Original file line number Diff line number Diff line change
Expand Up @@ -82,21 +82,21 @@ local tags = {
["T"] = function()
local total = 0
for i = 0, NUM_BAG_SLOTS do
total = total + GetContainerNumSlots(i)
total = total + C_Container.GetContainerNumSlots(i)
end
return string.format("|cffffffff%s|r|cff%s", total, SLDT.db.profile.cCol and SLDT.classColor or "ffffff")
end,
["U"] = function()
local rem, total = 0, 0
for i = 0, NUM_BAG_SLOTS do
rem, total = rem + GetContainerNumFreeSlots(i), total + GetContainerNumSlots(i)
rem, total = rem + C_Container.GetContainerNumFreeSlots(i), total + C_Container.GetContainerNumSlots(i)
end
return string.format("|cffffffff%s|r|cff%s", total-rem, SLDT.db.profile.cCol and SLDT.classColor or "ffffff")
end,
["R"] = function()
local rem = 0
for i = 0, NUM_BAG_SLOTS do
rem = rem + GetContainerNumFreeSlots(i)
rem = rem + C_Container.GetContainerNumFreeSlots(i)
end
return string.format("|cffffffff%s|r|cff%s", rem, SLDT.db.profile.cCol and SLDT.classColor or "ffffff")
end,
Expand Down Expand Up @@ -170,4 +170,4 @@ local function OnInit()
end

SLDT.Bag:RegisterEvent("PLAYER_ENTERING_WORLD")
SLDT.Bag:SetScript("OnEvent", OnInit)
SLDT.Bag:SetScript("OnEvent", OnInit)
4 changes: 2 additions & 2 deletions Elements/mail.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ local function SetupToolTip()
end

local function UpdateDisplay()
if ( MiniMapMailFrame:IsVisible() ) then MiniMapMailFrame:Hide() end
if ( MailFrame:IsVisible() ) then MailFrame:Hide() end

if ( db["ahAlert"] ) then
-- Change icon to AHAlert icon
Expand Down Expand Up @@ -228,4 +228,4 @@ local function OnInit()
end

SLDT.Mail:RegisterEvent("PLAYER_ENTERING_WORLD")
SLDT.Mail:SetScript("OnEvent", OnInit)
SLDT.Mail:SetScript("OnEvent", OnInit)
4 changes: 2 additions & 2 deletions SLDataText.toc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
## Interface: 100000
## Interface: 100002
## Title: SLDataText
## Author: Taffu
## Notes: Simple Light Data Text! Special thanks to Suicidal Katt & snichols1122
## Version: 10.0.0
## Version: 10.0.2.1
## SavedVariables: SLDTDB

Libs\Libstub\Libstub.lua
Expand Down
2 changes: 1 addition & 1 deletion core.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--[[ Simple Light Data Text ]]
--[[ Author: Taffu RevDate: 01/21/18 Version: 7.3.1 ]]
--[[ Author: Taffu, azuraji RevDate: 11/19/22 Version: 10.0.2.1 ]]

-- Rev Notes:
-- Reviewed Code
Expand Down

0 comments on commit dc4d0f0

Please sign in to comment.