Download
(151Kb)
Download
Updated: 08-03-10 03:18 AM
Pictures
File Info
Updated:08-03-10 03:18 AM
Created:04-09-10 08:35 AM
Downloads:4,728
Favorites:38
MD5:

Broker H3DungeonCooldowns

Version: r017
by: SuranthianH3 [More]

All users with revision 10 or under, delete it before you install a newer version

***IMPORTANT***
This requires a databroker addon such as
Chocolate Bar or TitanPanel.

Broker_H3DungeonCooldown is only available in English and was designed for enUS. If you aren't enUS, the only thing that should break is expansion sorting. Just disable expansion headers.

Broker H3 DungeonCooldowns started out as a quick "Hello World" test to start out coding Lua in WoW and eventually turned into this. It is a somewhat simple DataBroker Display that shows what dungeons you are saved to and how long until they unlock.

Please provide feedback in comments. Also provide suggestions for more features. I will update with a list of features I plan on adding when there are enough.

It is important that if you find a bug that you please a comment here, otherwise the bug will not be fixed.

Features
Self explanatory section title is self explanatory.

  • Showing data on any/every character on your account (current server). (Note: Requires you to log in atleast once so the addon can register the toon's data into the database.)
  • *NEW* Time for dungeon deserter and random dungeon queue cooldown.
  • Customizing the look of your tooltip with options such as:
    • 2 optional columns for the save's ID and the unlock's date and time (rounded to the nearest 15 minutes, based off of local time)
    • Enabling and disabling the display of expansion content
    • Enabling and disabling the icon's text.
    • *NEW* Adding whitespaces or expansion names between expansion content.
    • Toggling showing unlocked dungeons.
    • Changing the maximum height of the tooltip before it uses a scrollbar.
    • Font options:
      • Change tooltip's text font using shared media (Default Friz Quadrata TT)
      • Change tooltip text sizes (Header, name, hints, text)
    • Change colors of:
      • Dungeon Names
      • Dungeon Difficulties
      • Unlock time remaining (Gradually changes colors as the time expires. So, assuming you are on the default settings and it's a heroic, it will be red at 24 hours, orange at 18, yellow at 12, lime at 6, and green when it's a few minutes.)
      • Class colors (for name display)
      • The separators (Horizontal lines in the tooltip)

  • *NEW* Dungeon Finder Information Including:
    • The average time and average time for every role
    • The role(s) you are queued as in the dungeon finder.
    • *NEW* The time left to accept the invite and what role you are assigned in the group.
    • The roles for the group that have been found (also shows beside the icon, regardless of icon only)
    • Who has accepted the invitation (when the group has been made), even before you accept it!
    • *NEW* Hiding the minimap icon (if wanted)
  • Clicking Line Scripts:
    • Clicking a line to report its info to chat (Doesn't matter what type of click, as long as it isn't a shift click on a current toon's line)
    • Shift-Clicking a line to toggle lock extensions


Known Issues
Issues that are.. Known...
The chat report feature inserts the text without enabling text input, so pressing enter opens the edit box (sets it to full opacity), and clears what was in it.
I am aware of this issue but I do not have a solution at the moment. I am not very experienced in handling widgets. Before, I was using ChatFrameEditBox:Show() and ChatFrameEditBox:Insert(string), but with the new chatbox, the now "ChatFrame1EditBox" is already shown, but doesn't input text unless you hit enter. So I will have to find another way.

Just click the edit box after clicking the line then hit enter, or hit enter, click the line, then hit enter again.

Revision 016 - Bugfix (3.3.5)
- Uploaded a fix by spAnser for the random dungeon cooldown and dungeon deserter.

Revision 016 - Bugfix (3.3.5)
- Forgot for a second that some functions return nil instead of 0 sometimes. Quick fix. Only need this update if you got revision 15.

Revision 015 - FEATURES (Minor) (3.3.5)
- Added Dungeon Deserter and Random Queue Cooldown
- Fixed a minor typo. Removed brackets from dungeon invite roles, but not on the queue. They are now removed from both.
Sorry for the wait, been busy

Revision 014 - FEATURES (3.3.5)
- Removed brackets from LFD roles to preserve space
- Added whitespaces between expansions (none, whitespace, or expansion name)
- Made seperators customizable (color and height)
- Added showing time left and your role on the icon when an invite is avaliable.
- Added a teleport in and out button at the top of the tooltip (EXPERIMENTAL: Only shows if you have a role assigned)
- Added the ability to hide the minimap icon for the LFD system, since this does everything it does

Revision 013 - FEATURES (3.3.3)
- Added dungeon sorting (Expansion, then name, then difficulty)
- Made current character display at the top of the character list instead of where it is alphabetically.
- Added dungeon finder information! Shows average time for every role, average time in general, what you are queued as, what your currently forming group has so far, who accepted the invitation (even before you accept it!)

Revision 012 - BUGFIX (3.3.3)
- Readded AceLocale-3.0


Revision 011 - MAJOR VERSION (3.3.3)
- Rerelease. Remade the entire addon because I know more about Lua now. The nil table bug is now 100% gone without using garbage collection. Delete your old version before installing this new one. It's a "new" addon (different folder name).


Revision 010 fix (3.3.3)
- Nothing important or new, just makes it appear in the addons list next to all of my other mods instead of alone.


Revision 010 - BUGFIX (3.3.3)
- Added garbage collection. No more random nil tables! :D


Revision 009 - BUGFIX (3.3.3)
- Sometimes, if you crash or disconnect, a characters data will go nil (usually the one you're on when you DC). Now, it will notify you upon login/reload that it happened and clear the toon's data, turning it into an empty table with 3 more empty tables (Vanilla, BC, WotLK) instead of getting an error that breaks the addon's tooltip display altogether by leaving it nil. TL;DR - No more table errors.


Revision 008 - BUGFIX (3.3.3)
- Formatting on the chat report had a bug with the name with some settings configured in certain ways (it was either considered nil or it was the wrong character, depended on your character selection setting).


Revision 007 - BUGFIX (3.3.3)
- The report did not have the correct character name and server. It instead reported the last saved character's name.


Revision 006 - FRIDAY-FEATURES (3.3.3)
- Added 2 new columns (optional) for ID and unlock date/time and save ID. Allows toggling expansion headers and whitespaces, setting column alignment, toggling instance extensions for your current toon, and even sending a lines data to chat! I also updated the libraries and showed how long until the addon will load on the icon (when you change options or logon), and made it update the data on rollover instead of every 20 seconds.


Revision 005 - BUGFIX (3.3.3)
- Fixed a bug for people who don't have any other addons that use LibQTip (minor spelling error in the .toc file caused it to not be included). This patch is only needed if you are experiencing a certain error regarding LibQTip in the comments.


Revision 004 - BUGFIX (3.3.3)
- Instances that are unlocked not being registered as an unlocked dungeon if you aren't on that character.


Revision 003 - FRIDAY-FEATURES (3.3.3)
- Allows the showing of date on every single character on your account that you have logged onto with the addon installed.


Revision 002 - BUGFIX (3.3.3)
- Addon's variable tables being invalid on characters that have never done a savable dungeon.


Revision 001 - Initial release (3.3.3)
- Had a bug for toons that have never been in an instance that is savable, so a new version was released less than 30 minutes later.
Post A Reply Comment Options
Unread 06-01-10, 03:49 PM  
SuranthianH3
A Murloc Raider
 
SuranthianH3's Avatar
AddOn Author - Click to view AddOns

Forum posts: 8
File comments: 41
Uploads: 4
Originally posted by Gsusnme
<AceLocale-3.0 not being in the addon>
Fixed and uploaded.
Report comment to moderator  
Reply With Quote
Unread 06-01-10, 03:14 PM  
Gsusnme
A Wyrmkin Dreamwalker
AddOn Author - Click to view AddOns

Forum posts: 55
File comments: 199
Uploads: 1
Getting these two errors after updating:

Code:
Message: ...ce\AddOns\Broker_H3DungeonCooldowns\Locales\enUS.lua:2: Cannot find a library instance of "AceLocale-3.0".
Time: 06/01/10 17:11:14
Count: 1
Stack: [C]: ?
[C]: in function `error'
Interface\AddOns\AddonLoader\LibStub\LibStub.lua:23: in function `GetLibrary'
...ce\AddOns\Broker_H3DungeonCooldowns\Locales\enUS.lua:2: in main chunk

Locals: self = <table> {
 NewLibrary = <function> defined @Interface\AddOns\AddonLoader\LibStub\LibStub.lua:11
 minors = <table> {
 }
 minor = 2
 IterateLibraries = <function> defined @Interface\AddOns\AddonLoader\LibStub\LibStub.lua:28
 GetLibrary = <function> defined @Interface\AddOns\AddonLoader\LibStub\LibStub.lua:21
 libs = <table> {
 }
}
major = "AceLocale-3.0"
silent = nil
&

Code:
Message: ...ker_H3DungeonCooldowns\Broker_H3DungeonCooldowns.lua:15: Cannot find a library instance of "AceLocale-3.0".
Time: 06/01/10 17:11:14
Count: 1
Stack: [C]: ?
[C]: in function `error'
Interface\AddOns\AddonLoader\LibStub\LibStub.lua:23: in function `GetLibrary'
...ker_H3DungeonCooldowns\Broker_H3DungeonCooldowns.lua:15: in main chunk

Locals: self = <table> {
 NewLibrary = <function> defined @Interface\AddOns\AddonLoader\LibStub\LibStub.lua:11
 minors = <table> {
 }
 minor = 2
 IterateLibraries = <function> defined @Interface\AddOns\AddonLoader\LibStub\LibStub.lua:28
 GetLibrary = <function> defined @Interface\AddOns\AddonLoader\LibStub\LibStub.lua:21
 libs = <table> {
 }
}
major = "AceLocale-3.0"
silent = nil
Yes I did as instructed and removed the old add-on first, as well as the extra step of remove the old saved variables.

The add-on appears on my display just fine, however when hovering over it, it simply tells me it's name and no other information is displayed.
Report comment to moderator  
Reply With Quote
Unread 06-01-10, 02:05 PM  
SuranthianH3
A Murloc Raider
 
SuranthianH3's Avatar
AddOn Author - Click to view AddOns

Forum posts: 8
File comments: 41
Uploads: 4
Re: On deleting

Originally posted by Xylan Trueheart
Make sure in addition to deleting the old file version also delete the Saved Variables portion of this addon as well to insure there well be a painless transition. Good work.
Actually, I changed the name of the Lua file, too. Not deleting the saved Variables portion won't have any effect on the addon, it will just take away a few kb of memory. :P I made sure to do this so it would be able to be a simple delete and install for those who don't know about the WTF folder.

For those who do want to get rid of it anyways, though. It's:
Code:
World of Warcraft\\WTF\\Account\\<Account Name>\\SavedVariables\\Broker_H3DungeonCooldown.lua
World of Warcraft\\WTF\\Account\\<Account Name>\\SavedVariables\\Broker_H3DungeonCooldown.lua.bak
Last edited by SuranthianH3 : 06-01-10 at 02:10 PM.
Report comment to moderator  
Reply With Quote
Unread 06-01-10, 02:02 PM  
Xylan Trueheart
Premium Member
Premium Member

Forum posts: 64
File comments: 166
Uploads: 0
On deleting

Make sure in addition to deleting the old file version also delete the Saved Variables portion of this addon as well to insure there well be a painless transition. Good work.
Report comment to moderator  
Reply With Quote
Unread 05-31-10, 11:35 PM  
flaicher
A Cyclonian
 
flaicher's Avatar

Forum posts: 46
File comments: 30
Uploads: 0
Another simple and very useful addon by you. Thanks
Report comment to moderator  
Reply With Quote
Unread 05-31-10, 08:57 PM  
SuranthianH3
A Murloc Raider
 
SuranthianH3's Avatar
AddOn Author - Click to view AddOns

Forum posts: 8
File comments: 41
Uploads: 4
Rerelease

Remade the entire addon. Would have taken less time and effort to just remake it instead of trying to fix it. The nil table bug is now completely gone and the addon takes up less memory. Enjoy! :P

EDIT: Make sure to delete the old version.
Last edited by SuranthianH3 : 05-31-10 at 08:57 PM.
Report comment to moderator  
Reply With Quote
Unread 05-27-10, 05:14 AM  
SuranthianH3
A Murloc Raider
 
SuranthianH3's Avatar
AddOn Author - Click to view AddOns

Forum posts: 8
File comments: 41
Uploads: 4
Originally posted by Zidomo
If you are generating so many variables and/or garbage that it causes errors, your code definitely needs reworking/improvement.

In a mod like this where the user should never need to reset anything in standard usage, there really is no proper time for the mod to be calling collectgarbage(). There is no way for a mod to collect garbage on its own in a "right way". The solution is to not generate so much garbage (or as you put it here, variables) in the first place. Or avoiding generating variables which "cause" the errors.

I'm a professional software beta/QA tester for a company in RL, haven't ever bothered to learn LUA thoroughly...heh. Good places to ask on what you can change in the mod to get rid of those nil table errors without resorting to manual garbage collection (or rewriting the mod from scratch): here on WowI in the General Authoring Discussion Forum and/or Lua script help forums. And on WowAce in the Lua Code Discussion forum. Be sure to include the offending code that's generating the error(s).
Ok, thanks for the help. My code in this addon is very messy, so I'm thinking of rewriting it either way. Not sure how i can limit the use of variables, I think the main thing is using locals in loops.. I think I will define them before the loops or even in the beginning of the code to make them local to the file and not just the loop.
Report comment to moderator  
Reply With Quote
Unread 05-27-10, 05:03 AM  
Zidomo
A Cliff Giant
 
Zidomo's Avatar

Forum posts: 76
File comments: 1046
Uploads: 0
Originally posted by SuranthianH3
Maybe a proper usage like when WOULD be a proper time to use the function or a code snippet showing a proper way to do what garbage collect does without "halting" your computer?

It just seems the default way isn't deleting the variables fast enough, and this nil table is very frustrating. I've reviewed the code and I see no reason why it's doing this. I REALLY don't want to remake an entire addon just to get rid of one bug and remove 1 line.
If you are generating so many variables and/or garbage that it causes errors, your code definitely needs reworking/improvement.

In a mod like this where the user should never need to reset anything in standard usage, there really is no proper time for the mod to be calling collectgarbage(). There is no way for a mod to collect garbage on its own in a "right way". The solution is to not generate so much garbage (or as you put it here, variables) in the first place. Or avoiding generating variables which "cause" the errors.

I'm a professional software beta/QA tester for a company in RL, haven't ever bothered to learn LUA thoroughly...heh. Good places to ask on what you can change in the mod to get rid of those nil table errors without resorting to manual garbage collection (or rewriting the mod from scratch): here on WowI in the General Authoring Discussion Forum and/or Lua script help forums. And on WowAce in the Lua Code Discussion forum. Be sure to include the offending code that's generating the error(s).
Report comment to moderator  
Reply With Quote
Unread 05-26-10, 12:13 PM  
SuranthianH3
A Murloc Raider
 
SuranthianH3's Avatar
AddOn Author - Click to view AddOns

Forum posts: 8
File comments: 41
Uploads: 4
Originally posted by Zidomo
Saying garbage collect shouldn't be called automatically through the addon
Any tips on another solution for this bug, then? Because after I added this the random nil tables seemed to go away and I haven't noticed any kind of performance loss. If there is absolutely no solution, I guess the only thing I can do is completely remake the addon in hopes that I know more about Lua and won't make any small mistakes that end up snowballing without being noticed.

Maybe a proper usage like when WOULD be a proper time to use the function or a code snippet showing a proper way to do what garbage collect does without "halting" your computer?

It just seems the default way isn't deleting the variables fast enough, and this nil table is very frustrating. I've reviewed the code and I see no reason why it's doing this. I REALLY don't want to remake an entire addon just to get rid of one bug and remove 1 line.
Last edited by SuranthianH3 : 05-26-10 at 12:21 PM.
Report comment to moderator  
Reply With Quote
Unread 05-26-10, 11:41 AM  
Zidomo
A Cliff Giant
 
Zidomo's Avatar

Forum posts: 76
File comments: 1046
Uploads: 0
Your revision 010 change--BUGFIX - Added garbage collection--is not a good move at all. Addons should never be arbitrarily calling garbage collection on their own (without being prompted by a specific user action in the mod), as is being done in this revision.

For expert discussion on the matter, take a look at this thread: Garbage Collection on UI Load.... Some highlights:

From Jerry (author of Talented, Grid2 and others):
--"There is no reason for any addon to call this function without user input."
--"An addon can not and should not call collectgarbage() because it possibly created a lot of memory that needs collection. There is no addon that is by himself important enough to force the full lua heap to be traversed just to clean up its mess."
--"You should understand that garbage memory will be reclaimed by the system even if no addon ever calls collectgarbage() ever. This process is done in small steps, while executing other instructions. It's called the "incremental garbage collection cycle""
--"But the mistake that is made by all the addons (that automatically call collectgarbage() as part of their loading/execution process) is that they assume they know what the user lua heap is and that they are important enough to allow themselves to hang your computer while they do their cleanup."

From Xbeeps (author of LibHealComm-3.0 & 4.0, VisualHeal & others):
--"Calling collectgarbage deprives the interpreter engine from sensibly collecting the garbage incrementally and slowly in a low priority thread (i.e. it never disturbs the thread that runs the addons), and only forcible running a blocking garbage collect if it really needs to (which does disturb the thread running the addons). The memory released during garbage collection is returned to the pool used by the interpreter only, so you achieve exactly nothing by doing it, except that you always keep more memory idle than you have to, and you expend more high priority cycles collecting garbage than you have to.

Addons that collect garbage usually does so because they pretend to think that they know when it is opportune to do so, and they think that if they do it at this oppertune time it will not happen later at a bad time. This way of thought is flawed, because a single addon does not know when it is a good time to spend cycles doing this, and the incremental garbage collection used by Lua is never noticable (as it was in the early days of wow, where the garbage collection was invoked as a blocking call when it ran out of addon memory).
"
Report comment to moderator  
Reply With Quote
Unread 05-03-10, 11:20 AM  
SuranthianH3
A Murloc Raider
 
SuranthianH3's Avatar
AddOn Author - Click to view AddOns

Forum posts: 8
File comments: 41
Uploads: 4
Originally posted by darni
its 0kb... somehow broken...
K, rezipped and reuploaded.. It's pending at the time I made this comment.
Report comment to moderator  
Reply With Quote
Unread 05-03-10, 09:43 AM  
darni
A Kobold Labourer

Forum posts: 0
File comments: 8
Uploads: 0
Originally posted by SuranthianH3
What do you mean?
its 0kb... somehow broken...
Report comment to moderator  
Reply With Quote
Unread 05-03-10, 09:36 AM  
SuranthianH3
A Murloc Raider
 
SuranthianH3's Avatar
AddOn Author - Click to view AddOns

Forum posts: 8
File comments: 41
Uploads: 4
Originally posted by ffcloud2000
thanks for the quick update.. um im not sure if im just too early in trying to update but the zip file doesn't seem to be working when i download :S
What do you mean?
Report comment to moderator  
Reply With Quote
Unread 05-03-10, 07:46 AM  
ffcloud2000
A Fallenroot Satyr

Forum posts: 24
File comments: 98
Uploads: 0
thanks for the quick update.. um im not sure if im just too early in trying to update but the zip file doesn't seem to be working when i download :S
__________________
Report comment to moderator  
Reply With Quote
Unread 05-03-10, 07:13 AM  
SuranthianH3
A Murloc Raider
 
SuranthianH3's Avatar
AddOn Author - Click to view AddOns

Forum posts: 8
File comments: 41
Uploads: 4
Originally posted by ffcloud2000
well i have the most recent version but it seems the lua is all double spaced for whatever reason

redownloaded the most update to date version from here.. but in the toc it says 006 anyways still get the error

Code:
Message: ...roker_H3DungeonCooldown\Broker_H3DungeonCooldown.lua:2147: bad argument #3 to 'format' (string expected, got nil)
<buglog>
Went to that line, it has the local variable for that "nil value" defined in the incorrect spot. I'll upload a fix in a sec.
Last edited by SuranthianH3 : 05-03-10 at 07:36 AM.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump:

Support AddOn Development!

You have just downloaded by the author . If you like this AddOn why not consider supporting the author? This author has set up a donation account. Donations ensure that authors can continue to develop useful tools for everyone.