Download
(7Kb)
Download
Updated: 12-25-08 05:57 AM
Updated:12-25-08 05:57 AM
Created:11-02-08 11:13 AM
Downloads:3,496
Favorites:33
MD5:

zBrokerExperience

Version: 1.1
by: Zergreth [More]

An experience plugin for LDB. Displays experience as %.

1.1 - 17th December 2008
- added dataobject type
Post A Reply Comment Options
Unread 01-17-09, 04:21 AM  
Zergreth
A Fallenroot Satyr
 
Zergreth's Avatar
AddOn Author - Click to view AddOns

Forum posts: 24
File comments: 101
Uploads: 12
Re: Rested XP in %

Originally posted by Rainrider
Hi,

I added rested xp in % to core.lua. Here are my changes if you would like to add them.

Code:
...
Best wishes
Rainrider of Aman'Thul EU
Thanks for your suggestion, but I want to keep my LDB plugins as simple as possible, and I don't really feel like adding features I wouldn't need myself.
Last edited by Zergreth : 01-17-09 at 04:22 AM.
Report comment to moderator  
Reply With Quote
Unread 01-15-09, 07:42 PM  
Rainrider
A Firelord
AddOn Author - Click to view AddOns

Forum posts: 454
File comments: 28
Uploads: 2
Rested XP in %

Hi,

I added rested xp in % to core.lua. Here are my changes if you would like to add them.

local pName = "zBrokerExperience"
local f = CreateFrame("frame")
local ldb = LibStub:GetLibrary("LibDataBroker-1.1")
local dataobj = ldb:NewDataObject(pName, {
type = "data source",
text = "0%",
icon = "Interface\\AddOns\\zBrokerExperience\\icon.tga"
})

f:RegisterEvent("PLAYER_XP_UPDATE")
f:RegisterEvent("PLAYER_LOGIN")

f:SetScript("OnEvent", function(_, _, unit)
if (unit and unit == "player") or not unit then
local xp = UnitXP("player") / UnitXPMax("player") * 100

if GetXPExhaustion() ~= nil then
local restedxp = GetXPExhaustion() / UnitXPMax("player") * 100
dataobj.text = format("%.1f%%/%.1f%%", xp, restedxp)
else
dataobj.text = format("%.1f%%", xp)
end
end
end)

Best wishes
Rainrider of Aman'Thul EU
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: