Category: Data Broker
Addon Information
Download Latest Version.
To add favorites please register for a free account. If you already have one you need to login. How do I install this? (FAQ)
Author:
Version:
1.1
Date:
12-25-2008 06:57 AM
Size:
7.36 Kb
Downloads:
1,645
Favorites:
39
MD5:
zBrokerExperience
An experience plugin for LDB. Displays experience as %.
  Change Log - zBrokerExperience
1.1 - 17th December 2008
- added dataobject type
  Comments - zBrokerExperience
Post A Reply Comment Options
Old 01-17-2009, 05:21 AM  
Zergreth
A Deviate Faerie Dragon
 
Zergreth's Avatar
Interface Author - Click to view interfaces

Forum posts: 15
File comments: 80
Uploads: 12
Re: Rested XP in %

Quote:
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-2009 at 05:22 AM.
Zergreth is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 01-15-2009, 08:42 PM  
Rainrider
A Kobold Labourer

Forum posts: 0
File comments: 21
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   Edit/Delete Message Reply With Quote
Post A Reply



Category Jump:




The Network:
EQInterface | EQ2Interface | LoTROInterface | MMOInterface | War.MMOUI | WoWInterface | VGInterface | Allakhazam | Thottbot | Wowhead | Zam


©2009 MMOUI / ZAM Network
vBulletin - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.