Guest User

Modified MoneyBar v2

a guest
Feb 29th, 2012
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 17.73 KB | None | 0 0
  1. ----------------------------------------------------------------------------------------------------------
  2. -- Author: Montage@Briarcliff
  3. -- Version: 1.4 Beta
  4.  
  5. -- There is no copyright on this code
  6.  
  7. -- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
  8. -- associated documentation files (the "Software"), to deal in the Software without restriction, including
  9. -- without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  10. -- copies of the Software, and to permit persons to whom the Software is furnished to do so.
  11.  
  12. -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
  13. -- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  14. -- NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  15. -- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  16. -- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  17. ----------------------------------------------------------------------------------------------------------
  18.  
  19. -- Make currency filter
  20.  
  21. MoneyBar = {}
  22.  
  23. local defaultSave = {
  24.                     x = 0,
  25.                     y = 1010,
  26.                     alpha = 0.3,
  27.                     scale = 1750,
  28.                     barr = 0,
  29.                     barg = 0,
  30.                     barb = 0,
  31.                     textr = 1,
  32.                     textg = 1,
  33.                     textb = 1,
  34.                     orient = 'horiz',
  35. };
  36.  
  37. local defaultScale = {
  38.                         vert = 1000,
  39.                         horiz = 1750,
  40. };
  41.  
  42. local currency = {}
  43.  
  44. local main = UI.CreateContext("UI")
  45. local bar = UI.CreateFrame("Frame","Bar",main)
  46.  
  47. local plati = UI.CreateFrame("Texture","Platinum",main)
  48. local gold = UI.CreateFrame("Texture","Gold",main)
  49. local silver = UI.CreateFrame("Texture","Silver",main)
  50. local pvp_icon = UI.CreateFrame("Texture","Favor Icon",main)
  51. local master_plaq = UI.CreateFrame("Texture","Master Craftsmen Mark",main)
  52. local art_mark = UI.CreateFrame("Texture","Artisan Mark",main)
  53. local planarite = UI.CreateFrame("Texture","Planarite",main)
  54. local corr_ss = UI.CreateFrame("Texture","Corrupted Sourcestone",main)
  55. local curse_ss = UI.CreateFrame("Texture","Cursed Sourcestone",main)
  56. local vile_ss = UI.CreateFrame("Texture","Vile Sourcestone",main)
  57. local in_ss = UI.CreateFrame("Texture","Inscribed Sourcestone",main)
  58. local luck_coin = UI.CreateFrame("Texture","Lucky Coin",main)
  59. local achieve_plaq = UI.CreateFrame("Texture","Plaque of Achievement",main)
  60. local moa = UI.CreateFrame("Texture","Mark of Ascension",main)
  61. local gmoa = UI.CreateFrame("Texture","Greater Mark of Ascension",main)
  62.    
  63. local plati_text = UI.CreateFrame("Text","Platinum",main)
  64. local gold_text = UI.CreateFrame("Text","Gold",main)
  65. local silver_text = UI.CreateFrame("Text","Silver",main)
  66. local favor = UI.CreateFrame("Text","Favor",main)
  67. local master_plaq_text = UI.CreateFrame("Text","Master Craftsman's Mark",main)
  68. local art_text = UI.CreateFrame("Text","Artisan's Mark",main)
  69. local plan_text = UI.CreateFrame("Text","Planarite",main)
  70. local corr_text = UI.CreateFrame("Text","Corrupted Sourcestone",main)
  71. local curse_text = UI.CreateFrame("Text","Cursed Sourcestone",main)
  72. local vile_text = UI.CreateFrame("Text","Vile Sourcestone",main)
  73. local in_text = UI.CreateFrame("Text","Inscribed Sourcestone",main)
  74. local luck_text = UI.CreateFrame("Text","Lucky Coin",main)
  75. local ap_text = UI.CreateFrame("Text","Plaques of Achievement",main)
  76. local moa_text = UI.CreateFrame("Text","Marks of Ascension",main)
  77. local gmoa_text = UI.CreateFrame("Text","Greater Marks of Ascension",main)
  78.  
  79. local MoneyBarIcons = {
  80.                     plati,
  81.                     gold,
  82.                     silver,
  83.                     pvp_icon,
  84.                     master_plaq,
  85.                     art_mark,
  86.                     planarite,
  87.                     corr_ss,
  88.                     curse_ss,
  89.                     vile_ss,
  90.                     in_ss,
  91.                     luck_coin,
  92.                     achieve_plaq,
  93.                     moa,
  94.                     gmoa,
  95. }
  96.  
  97. local MoneyBarText = {
  98.                     plati_text,
  99.                     gold_text,
  100.                     silver_text,
  101.                     favor,
  102.                     master_plaq_text,
  103.                     art_text,
  104.                     plan_text,
  105.                     corr_text,
  106.                     curse_text,
  107.                     vile_text,
  108.                     in_text,
  109.                     luck_text,
  110.                     ap_text,
  111.                     moa_text,
  112.                     gmoa_text,
  113. }
  114. local MoneyBarLength = table.maxn(MoneyBarText)
  115.  
  116. -- Configure Frames and set initial conditions
  117. function MoneyBar.Initialize(a)
  118.     if a ~= "Money" then
  119.         return
  120.     end
  121.     if not MoneyBarSave then
  122.         MoneyBarSave = defaultSave
  123.     end
  124.     MoneyBar.BuildAll()
  125.     print("Money Bar loaded.")
  126. end
  127.  
  128. function MoneyBar.BuildAll()
  129.     MoneyBar.GetCurrency()
  130.     MoneyBar.BuildBar()
  131.     MoneyBar.BuildIcons()
  132.     MoneyBar.BuildTextFrames()
  133.     MoneyBar.SetText()
  134. end
  135.  
  136. -- Sets the parameters for the bar
  137. function MoneyBar.BuildBar()
  138.     bar:SetPoint("TOPLEFT",main,"TOPLEFT",MoneyBarSave.x,MoneyBarSave.y)
  139.     bar:SetBackgroundColor(MoneyBarSave.barr,MoneyBarSave.barg,MoneyBarSave.barb)
  140.     if MoneyBarSave.orient == "vert" then
  141.         bar:SetHeight(MoneyBarSave.scale)
  142.         bar:SetWidth(75)
  143.     else
  144.         bar:SetWidth(MoneyBarSave.scale)
  145.         bar:SetHeight(15)
  146.     end
  147.     bar:SetAlpha(MoneyBarSave.alpha)
  148.     bar:SetLayer(0)
  149.     bar:SetVisible(true)
  150.     bar.fixedPos = true
  151.     function bar.Event:LeftDown()
  152.         if bar.fixedPos then
  153.             return
  154.         end
  155.         bar.leftDown = true
  156.         local mouse = Inspect.Mouse()
  157.         bar.originalXDiff = mouse.x - bar:GetLeft()
  158.         bar.originalYDiff = mouse.y - bar:GetTop()
  159.         local left, top, right, bottom = bar:GetBounds()
  160.     end
  161.     function bar.Event:LeftUp()
  162.         if bar.fixedPos then
  163.             return
  164.         end
  165.         bar.leftDown = false
  166.     end
  167.     function bar.Event:LeftUpoutside()
  168.         if bar.fixedPos then
  169.             return
  170.         end
  171.         bar.leftDown = false
  172.     end
  173.     function bar.Event:MouseMove(x, y)
  174.         if bar.fixedPos then
  175.             return
  176.         end
  177.         if not bar.leftDown then
  178.             return
  179.         end
  180.         local newX = x - self.originalXDiff
  181.         local newY = y - self.originalYDiff
  182.         bar:SetPoint("TOPLEFT", UIParent, "TOPLEFT", newX, newY)
  183.         MoneyBarSave.x = newX
  184.         MoneyBarSave.y = newY
  185.     end
  186. end
  187.  
  188. -- Sets the parameters for the icons
  189. function MoneyBar.BuildIcons()
  190.     local barScaleWidth = 0
  191.     local barScaleHeight = 0
  192.     if MoneyBarSave.orient == "vert" then
  193.         barScaleHeight = bar:GetHeight()
  194.     else
  195.         barScaleWidth = bar:GetWidth()
  196.     end
  197.  
  198.     plati:SetPoint("TOPLEFT",bar,"TOPLEFT",0,0)
  199.     gold:SetPoint("TOPLEFT",bar,"TOPLEFT",barScaleWidth*0.06,barScaleHeight*0.06)
  200.     silver:SetPoint("TOPLEFT",bar,"TOPLEFT",barScaleWidth*0.12,barScaleHeight*0.12)
  201.     pvp_icon:SetPoint("TOPLEFT",bar,"TOPLEFT",barScaleWidth*0.18,barScaleHeight*0.18)
  202.     planarite:SetPoint("TOPLEFT",bar,"TOPLEFT",barScaleWidth*0.24,barScaleHeight*0.24)
  203.     corr_ss:SetPoint("TOPLEFT",bar,"TOPLEFT",barScaleWidth*0.30,barScaleHeight*0.30)
  204.     curse_ss:SetPoint("TOPLEFT",bar,"TOPLEFT",barScaleWidth*0.36,barScaleHeight*0.36)
  205.     vile_ss:SetPoint("TOPLEFT",bar,"TOPLEFT",barScaleWidth*0.42,barScaleHeight*0.42)
  206.     in_ss:SetPoint("TOPLEFT",bar,"TOPLEFT",barScaleWidth*0.48,barScaleHeight*0.48)
  207.     achieve_plaq:SetPoint("TOPLEFT",bar,"TOPLEFT",barScaleWidth*0.54,barScaleHeight*0.54)
  208.     moa:SetPoint("TOPLEFT",bar,"TOPLEFT",barScaleWidth*0.60,barScaleHeight*0.60)
  209.     gmoa:SetPoint("TOPLEFT",bar,"TOPLEFT",barScaleWidth*0.66,barScaleHeight*0.66)
  210.     luck_coin:SetPoint("TOPLEFT",bar,"TOPLEFT",barScaleWidth*0.72,barScaleHeight*0.72)
  211.     master_plaq:SetPoint("TOPLEFT",bar,"TOPLEFT",barScaleWidth*0.78,barScaleHeight*0.78)
  212.     art_mark:SetPoint("TOPLEFT",bar,"TOPLEFT",barScaleWidth*0.84,barScaleHeight*0.84)
  213.    
  214.     plati:SetTexture("Money","plat.png")
  215.     gold:SetTexture("Money","gold.png")
  216.     silver:SetTexture("Money","silver.png")
  217.     pvp_icon:SetTexture("Rift","item_icons\\trinket5.dds")
  218.     planarite:SetTexture("Rift","item_icons\\planarite_orb_b.dds")
  219.     corr_ss:SetTexture("Rift","item_icons\\sourcestone_04.dds")
  220.     curse_ss:SetTexture("Rift","item_icons\\sourcestone_02z_z.dds")
  221.     vile_ss:SetTexture("Rift","item_icons\\sourcestone_01.dds")
  222.     in_ss:SetTexture("Rift","item_icons\\mystical_stone1.dds")
  223.     achieve_plaq:SetTexture("Rift","item_icons\\plaque_of_achievement.dds")
  224.     moa:SetTexture("Rift","item_icons\\card30c.dds")
  225.     gmoa:SetTexture("Rift","item_icons\\card30a.dds")
  226.     luck_coin:SetTexture("Rift","item_icons\\trinket8.dds")
  227.     master_plaq:SetTexture("Rift","item_icons\\card28a.dds")
  228.     art_mark:SetTexture("Rift","item_icons\\trinket27a.dds")
  229.    
  230.     for i=1,MoneyBarLength,1 do
  231.         MoneyBarIcons[i]:SetHeight(15)
  232.         MoneyBarIcons[i]:SetWidth(15)
  233.         MoneyBarIcons[i]:SetLayer(2)
  234.         MoneyBarIcons[i]:SetVisible(true)
  235.     end
  236. end
  237.  
  238. -- Sets the parameters for the text frames
  239. function MoneyBar.BuildTextFrames()
  240.     for i=1,MoneyBarLength,1 do
  241.         MoneyBarText[i]:SetFontColor(MoneyBarSave.textr,MoneyBarSave.textg,MoneyBarSave.textb,1)
  242.     end
  243.    
  244.     for i=1,MoneyBarLength,1 do
  245.         MoneyBarText[i]:SetLayer(2)
  246.         MoneyBarText[i]:SetVisible(true)
  247.         if MoneyBarSave.orient == "vert" then
  248.             MoneyBarText[i]:SetPoint("TOPLEFT",bar,"TOPLEFT",0,MoneyBarIcons[i]:GetBottom())
  249.         else
  250.             MoneyBarText[i]:SetPoint("TOPLEFT",bar,"TOPLEFT",MoneyBarIcons[i]:GetRight(),0)
  251.         end
  252.     end
  253. end
  254.  
  255. -- Get the table of currencies
  256. function MoneyBar.GetCurrency()
  257.    local list = Inspect.Currency.List()
  258.    for k,j in pairs(list) do
  259.        currency[j] = Inspect.Currency.Detail(k)
  260.    end
  261. end
  262.  
  263. -- Sets the text frames to the amount of each currency
  264. function MoneyBar.SetText()
  265.     MoneyBar.ClearText()
  266.     MoneyBar.TextLoc()
  267.     local len = string.len(MoneyBar.GetStack("Platinum, Gold, Silver"))
  268.     if len <= 4 then
  269.         plati_text:SetText("0")
  270.     else
  271.         plati_text:SetText(string.sub(MoneyBar.GetStack("Platinum, Gold, Silver"),1,len-4))
  272.     end
  273.     gold_text:SetText(string.sub(MoneyBar.GetStack("Platinum, Gold, Silver"),len-3,len-2))
  274.     silver_text:SetText(string.sub(MoneyBar.GetStack("Platinum, Gold, Silver"),len-1,len))
  275.     favor:SetText(MoneyBar.GetStack("Favor"))
  276.     plan_text:SetText(MoneyBar.GetStack("Planarite"))
  277.     master_plaq_text:SetText(MoneyBar.GetStack("Master Craftsman's Mark"))
  278.     art_text:SetText(MoneyBar.GetStack("Artisan's Mark"))
  279.     corr_text:SetText(MoneyBar.GetStack("Corrupted Sourcestone"))
  280.     curse_text:SetText(MoneyBar.GetStack("Cursed Sourcestone"))
  281.     vile_text:SetText(MoneyBar.GetStack("Vile Sourcestone"))
  282.     in_text:SetText(MoneyBar.GetStack("Inscribed Sourcestone"))
  283.     luck_text:SetText(MoneyBar.GetStack("Lucky Coin"))
  284.     ap_text:SetText(MoneyBar.GetStack("Plaque of Achievement"))
  285.     moa_text:SetText(MoneyBar.GetStack("Mark of Ascension"))
  286.     gmoa_text:SetText(MoneyBar.GetStack("Greater Mark of Ascension"))
  287. end
  288.  
  289. -- Should clear text frame to prevent text messiness.
  290. function MoneyBar.ClearText()
  291.     for i=1,MoneyBarLength,1 do
  292.         MoneyBarText[i]:ClearAll()
  293.     end
  294. end
  295.  
  296. -- Change Text Colors
  297. function MoneyBar.ChangeTextColor(mbr,mbg,mbb)
  298.     for i=1,MoneyBarLength,1 do
  299.         MoneyBarText[i]:SetFontColor(mbr,mbg,mbb,1)
  300.     end
  301. end
  302.  
  303. -- Reset the Text Frame's position after ClearAll() has been used
  304. function MoneyBar.TextLoc()
  305.     if MoneyBarSave.orient == "vert" then
  306.         for i=1,MoneyBarLength,1 do
  307.             MoneyBarText[i]:SetPoint("TOPLEFT",bar,"TOPLEFT",0,MoneyBarIcons[i]:GetTop() + 10)
  308.         end
  309.     else
  310.         for i=1,MoneyBarLength,1 do
  311.             MoneyBarText[i]:SetPoint("TOPLEFT",bar,"TOPLEFT",MoneyBarIcons[i]:GetRight(),0)
  312.         end
  313.     end
  314. end
  315.  
  316. -- Gets the current amount of each currency
  317. function MoneyBar.GetStack(a)
  318.     local list = Inspect.Currency.List()
  319.     local stack = -1
  320.     for k,j in pairs(list) do
  321.         currency[j] = Inspect.Currency.Detail(k)
  322.         if currency[j].name == a then
  323.             stack = currency[j].stack
  324.             break
  325.         else
  326.             stack = 0
  327.         end
  328.     end
  329.     if not stack then
  330.         stack = -1
  331.     end
  332.     stack = tostring(stack)
  333.     return stack
  334. end
  335.  
  336. function MoneyBar.Reset()
  337.     bar:ClearAll()
  338.     MoneyBar.BuildAll()
  339. end
  340.  
  341. -- Slash Commands other than scale and Scale currently
  342. function MoneyBar.SlashHandler(args)
  343.     local cmd = {}
  344.     local numargs = 0
  345.     for token in string.gmatch(args, "[^%s]+") do
  346.         cmd[numargs] = token
  347.         numargs = numargs + 1
  348.     end
  349.     if cmd[0] == "default" then
  350.         MoneyBarSave = defaultSave;
  351.         MoneyBar.Reset()
  352.         print("Money Bar successfully reset to default configuration.")
  353.     elseif cmd[0] == "alpha" then
  354.         if numargs ~= 2 then
  355.             print("Incorrect usage. /moneybar alpha <a>")
  356.             return
  357.         end
  358.         MoneyBarSave.alpha = tonumber(cmd[1])/10
  359.         bar:SetAlpha(MoneyBarSave.alpha)
  360.     elseif cmd[0] == "move" then
  361.         bar.fixedPos = not bar.fixedPos
  362.         if bar.fixedPos then
  363.             print("Moving toggled off.")
  364.         else
  365.             print("Moving toggled on. Drag bar to move it to a new position.")
  366.         end
  367.     elseif cmd[0] == "scale" then
  368.         if numargs ~= 2 then
  369.             print("Incorrect usage. /moneybar scale <w>")
  370.             return
  371.         end
  372.         local scale = cmd[1]
  373.         scale = tonumber(scale)
  374.         if not scale then
  375.             print("Enter a number to set the width (or height if vertical) of the bar (Default is 1750)")
  376.         end
  377.        
  378.         if MoneyBarSave.orient == "vert" and (scale > 2000 or scale < 700) then -- Minimum limitation is there because it doesn't align correctly when lower than the minimum. Maximum dimension actually still aligns fine... but I REALLY don't think anyone has a monitor that is > ####x2000 screen resolution. TODO: Remove/change this limitation when currency filtering is implemented.
  379.             print("Invalid scale number. Please choose a number between 700 and 2000.")
  380.             return
  381.         elseif MoneyBarSave.orient == "horiz" and (scale > 2100 or scale < 950) then -- Doesn't position correctly beyond these scales. TODO: Remove/change this limitation when currency filtering is implemented.
  382.             print("Invalid scale number. Please choose a number between 950 and 2100.")
  383.             return
  384.         end
  385.        
  386.         MoneyBarSave.scale = scale
  387.         if not bar.fixedPos then -- We want the bar to still be movable after scaling if it was movable before scaling
  388.             MoneyBar.Reset()
  389.             bar.fixedPos = false
  390.         else
  391.             MoneyBar.Reset()
  392.         end
  393.         print("Money Bar scale successfully set to: " .. scale)
  394.     elseif cmd[0] == "orient" then
  395.         if numargs ~= 2 then
  396.             print("Incorrect usage. /moneybar orient <horiz/vert>")
  397.         end
  398.         if cmd[1] == "vert" then
  399.             MoneyBarSave.orient = "vert"
  400.             MoneyBarSave.scale = defaultScale.vert
  401.             MoneyBarSave.y = 10
  402.             MoneyBar.Reset()
  403.             print("Money Bar orientation successfully set to: vert")
  404.         elseif cmd[1] == "horiz" then
  405.             MoneyBarSave.orient = "horiz"
  406.             MoneyBarSave.scale = defaultScale.horiz
  407.             MoneyBarSave.x = 10
  408.             MoneyBar.Reset()
  409.             print("Money Bar orientation successfully set to: horiz")
  410.         else
  411.             print("Incorrect usage. /moneybar orient <horiz/vert>")
  412.         end
  413.        
  414.     elseif cmd[0] == "help" then
  415.         print("/moneybar move toggles the bar to be movable. When toggled on, the bar is movable by dragging with your mouse.")
  416.         print("/moneybar default sets the bar to the default position,width, orientation, and colors")
  417.         print("/moneybar alpha <a> sets the bar's transparency. 'a' is a number between 0 and 10 with 10 being solid and 0 being invisible")
  418.         print("/moneybar scale <w> allows you to change the width of the bar (default setting is 1750)")
  419.         print("/moneybar orient <horiz/vert> sets the bar to horizontal or vertical")
  420.         print("/moneybarcolor bar <r g b/color> takes in colors or RGB numbers as r g b where r, g, and b are between 0 and 255")
  421.         print("/moneybarcolor text <r g b/color> takes in colors or RGB numbers as r g b where r, g, and b are between 0 and 255")
  422.         print("Current color options are black, red, green, blue, brown, white, orange, and purple")
  423.     else
  424.         print("Not a valid command.  Use /moneybar help to see a list of commands")
  425.     end
  426. end
  427.  
  428. -- Handles slash commands to change colors for the bar and text
  429. function MoneyBar.Colors(arg)
  430.     local a,r,g,b = arg:match("(%a+) (%d+) (%d+) (%d+)")
  431.     if not r then
  432.         a,r = arg:match("(%a+) (%a+)")
  433.     end
  434.     if a == "bar" then
  435.         if r == "black" then
  436.             bar:SetBackgroundColor(0,0,0)
  437.         elseif r == "red" then
  438.             bar:SetBackgroundColor(1,0,0)
  439.         elseif r == "green" then
  440.             bar:SetBackgroundColor(0,1,0)
  441.         elseif r == "blue" then
  442.             bar:SetBackgroundColor(0,0,1)
  443.         elseif r == "brown" then
  444.             bar:SetBackgroundColor(0.54,0.36,0.36)
  445.         elseif r == "orange" then
  446.             bar:SetBackgroundColor(1,0.65,0)
  447.         elseif r == "white" then
  448.             bar:SetBackgroundColor(1,1,1)
  449.         elseif r == "purple" then
  450.             bar:SetBackgroundColor(0.61,0.19,1)
  451.         elseif r and g and b then
  452.             r = tonumber(r)/255
  453.             g = tonumber(g)/255
  454.             b = tonumber(b)/255
  455.             bar:SetBackgroundColor(r,g,b)
  456.         end
  457.     elseif a == "text" then
  458.         if r == "black" then
  459.             ChangeTextColor(0,0,0)
  460.         elseif r == "red" then
  461.             ChangeTextColor(1,0,0)
  462.         elseif r == "green" then
  463.             ChangeTextColor(0,1,0)
  464.         elseif r == "blue" then
  465.             ChangeTextColor(0,0,1)
  466.         elseif r == "brown" then
  467.             ChangeTextColor(0.54,0.36,0.36)
  468.         elseif r == "orange" then
  469.             ChangeTextColor(1,0.65,0)
  470.         elseif r == "white" then
  471.             ChangeTextColor(1,1,1)
  472.         elseif r == "purple" then
  473.             ChangeTextColor(0.61,0.19,1)
  474.         elseif r and g and b then
  475.             r = tonumber(r)/255
  476.             g = tonumber(g)/255
  477.             b = tonumber(b)/255
  478.             bar:SetBackgroundColor(r,g,b)
  479.         end
  480.     else
  481.         print("The command is /moneybarcolor <bar/text> <color/rgb>")
  482.         print("Current color options are black, red, green, blue, brown, white, orange, and purple")
  483.     end
  484. end
  485.  
  486. table.insert(Command.Slash.Register("moneybar"),{MoneyBar.SlashHandler,"Money","Slash Commands"})
  487. table.insert(Command.Slash.Register("moneybarcolor"),{MoneyBar.Colors,"Money","Color Slash Commands"})
  488. table.insert(Event.Addon.Load.End,{MoneyBar.Initialize,"Money","Create UI"})
  489. table.insert(Event.Currency,{MoneyBar.SetText,"Money","Update"})
  490. table.insert(Event.Unit.Available,{MoneyBar.GetCurrency,"Money","Get Currency"}) -- May remove later, especially once bug is fixed on Units not being available when loading
Add Comment
Please, Sign In to add comment