Download
(7 Kb)
Download
Updated: 12-25-08 04:57 AM
Updated:12-25-08 04:57 AM
Created:11-02-08 10:13 AM
Downloads:2,984
Favorites:35
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
Old 01-17-09, 03:21 AM  
Zergreth
A Fallenroot Satyr
 
Zergreth's Avatar
AddOn Author - Click to view AddOns

Forum posts: 24
File comments: 101
Uploads: 13
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 03:22 AM.
Zergreth is offline Report comment to moderator  
Reply With Quote
Old 01-15-09, 06:42 PM  
Rainrider
A Rage Talon Dragon Guard

Forum posts: 314
File comments: 91
Uploads: 0
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
Rainrider is offline Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: