WoWInterface SVN Broker_ClassHall

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 4 to Rev 5
    Reverse comparison

Rev 4 → Rev 5

trunk/Broker_ClassHall/Broker_ClassHall.toc
1,7 → 1,7
## Interface: 70300
## Title: Broker_ClassHall
## Author: Seerah
## Version: 1.0.2
## Version: 1.1
## Notes: Hides the class hall command bar and moves its data to a LibDataBroker plugin.
 
Broker_ClassHall.lua
\ No newline at end of file
trunk/Broker_ClassHall/Broker_ClassHall.lua
1,3 → 1,7
----OPTIONS----
local shortenNumbers = true
---------------
 
local _, class, classID = UnitClass("player")
local garType = LE_GARRISON_TYPE_7_0
local pName = UnitName("player")
98,9 → 102,26
end
end
 
local numMap = {[3] = "k", [6] = "m", [9] = "b", [12] = "t"}
local function FormatNumber(num)
if shortenNumbers and num > 1000 then
local multiplier, divideBy
for i = 3, 12, 3 do
if num > 10^i then
multiplier = numMap[i]
divideBy = 10^i
end
end
return strformat("%.2f%s", num/divideBy, multiplier)
else
return buln(num)
end
end
 
local function ShowArtifactPower(tt)
tt:AddLine(ARTIFACT_POWER)
tt:AddLine(strformat(ARTIFACT_POWER_TOOLTIP_TITLE, buln(artwb.totalXP), buln(artwb.xp), buln(artwb.xpForNextPoint)), 1, 1, 1)
--tt:AddLine(strformat(ARTIFACT_POWER_TOOLTIP_TITLE, buln(artwb.totalXP), buln(artwb.xp), buln(artwb.xpForNextPoint)), 1, 1, 1)
tt:AddLine(strformat(ARTIFACT_POWER_TOOLTIP_TITLE, FormatNumber(artwb.totalXP), FormatNumber(artwb.xp), FormatNumber(artwb.xpForNextPoint)), 1, 1, 1)
if artwb.numPointsAvailableToSpend > 0 then
tt:AddLine(strformat(ARTIFACT_POWER_TOOLTIP_BODY, artwb.numPointsAvailableToSpend), 0, .95, 0, true)
end