Download
(7Kb)
Download
Updated: 11-28-08 02:07 AM
Pictures
File Info
Updated:11-28-08 02:07 AM
Created:11-10-08 10:52 PM
Downloads:4,300
Favorites:11
MD5:

DBM LDB

Version: r4
by: Slashee the Cow [More]

Deadly Boss Mods 4 is out, and there is an official LDB plugin written by Tandanu available for it here. I'll keep this around for those not interested in upgrading.

DBM LDB
by
Slashee the Cow

This is for Deadly Boss Mods version 3 only. If you are using DBM 4 you want this.

All it does is add a LibDataBroker feed to open Deadly Boss Mods. There's no config for this, although you'll have to remove the minimap button for DBM manually (assuming you want to, although it IS the reason I created this mod.)

Simple, two button operation: Left click opens DBM normally, and right click opens DBM options.

There aren't any slash commands (I said earlier, no config). If you want to enable or disable this I guess you have two options... log out and use the addon manager on the character select screen, or just don't get whatever you use to display your LDB feeds to display this one.

Thanks to:
Tandanu and Nitram (authors of DBM), without you this would be kind of pointless.
Tekkub (author of various mods), you have great documentation on LDB.

r4 | 28-11-2008 | Slashee the Cow
Changed the way the feed loads so as to avoid many possible problems and use less memory (not that the latter was a problem, but always nice).
In case you're just joining us, there was an r3 but it bombed severly and is now considered to be heresy.

r2.1 | 12-11-2008 | Slashee the Cow
Still didn't have files in correct order. D'oh!
Addon name changed in TOC (will no longer show up with underscores in addon list).

r2 | 12-11-2008 | Slashee the Cow
Right click on button now opens DBM options (updated tooltip to reflect this).
Changed feed name to "Deadly Boss Mods" (some people might be using labels).
Files now loaded in correct order (my bad, sorry).
Mod is now loaded by using an invisible frame (simpler and should cause less problems).

r1 | 11-11-2008 | Slashee the Cow
This is the first release (not that I see a long series of updates in this mod's future).
Post A Reply Comment Options
Unread 11-12-08, 02:48 AM  
Slashee the Cow
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 6
Uploads: 4
Re: DBM 4 beta Support?

Originally posted by Greymonkey
Wondering if this will work with the new 4.x beta?
No, it won't. It shouldn't take me long to make a 4.x compatible version though (now I know that the need exists, which is why I just love people who comment).

Edit: and here it is.
Last edited by Slashee the Cow : 11-12-08 at 04:57 AM.
Report comment to moderator  
Reply With Quote
Unread 11-12-08, 02:18 AM  
Greymonkey
A Kobold Labourer

Forum posts: 1
File comments: 12
Uploads: 0
DBM 4 beta Support?

Wondering if this will work with the new 4.x beta?
Report comment to moderator  
Reply With Quote
Unread 11-12-08, 01:09 AM  
Briandre
A Kobold Labourer

Forum posts: 0
File comments: 14
Uploads: 0
LOL Thanks again!

OMG! Are you a mind reader? The last thing on my minimap is DBM
Again I'll test out this lil addon, and My minimap will be clean except for the find herbs circle (I know I can hide it if necessary but it's not a big deal) and deuce commander

Report comment to moderator  
Reply With Quote
Unread 11-11-08, 03:01 PM  
Slashee the Cow
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 6
Uploads: 4
Originally posted by Phanx
Load order is important! Files are loaded in the order specified in your TOC file. You should always list files in the right order so that as each one loads, any other files it depends on have been loaded before it. While what you're doing now might work for you, it won't work for a user who doesn't have another addon that embeds LDB loading before yours. The files should be listed in this order:

LibStub.lua
CallbackHandler-1.0.lua (depends on LibStub)
LibDataBroker-1.1.lua (depends on LibStub and CallbackHandler)
DBM_LDB.lua (depends on LibDataBroker)

As for the code itself, it's important to note that ADDON_LOADED fires not only when your addon loads, but when every other addon that loads afterward. Since your ADDON_LOADED function doesn't do any checks (to only execute if the loading addon is yours, for instance) and doesn't unregister itself after it executes, you're creating a new LDB object every time an addon loads. Since they are all identical, they're just overwriting each other and shouldn't cause any functional issues, but it's a lot of garbage being generated for no reason.

The event handler isn't really necessary either, and just adds overhead by creating a frame, registering for an event, and creating some function closures. Stripping things down to just the LDB object creation would get rid of this overhead, and solve the problem with your undiscriminating ADDON_LOADED.
I told you I was new at this . Thanks for all the input, I'll see what I can do.
Report comment to moderator  
Reply With Quote
Unread 11-11-08, 07:03 AM  
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view AddOns

Forum posts: 5617
File comments: 2321
Uploads: 54
Load order is important! Files are loaded in the order specified in your TOC file. You should always list files in the right order so that as each one loads, any other files it depends on have been loaded before it. While what you're doing now might work for you, it won't work for a user who doesn't have another addon that embeds LDB loading before yours. The files should be listed in this order:

LibStub.lua
CallbackHandler-1.0.lua (depends on LibStub)
LibDataBroker-1.1.lua (depends on LibStub and CallbackHandler)
DBM_LDB.lua (depends on LibDataBroker)

As for the code itself, it's important to note that ADDON_LOADED fires not only when your addon loads, but when every other addon that loads afterward. Since your ADDON_LOADED function doesn't do any checks (to only execute if the loading addon is yours, for instance) and doesn't unregister itself after it executes, you're creating a new LDB object every time an addon loads. Since they are all identical, they're just overwriting each other and shouldn't cause any functional issues, but it's a lot of garbage being generated for no reason.

The event handler isn't really necessary either, and just adds overhead by creating a frame, registering for an event, and creating some function closures. Stripping things down to just the LDB object creation would get rid of this overhead, and solve the problem with your undiscriminating ADDON_LOADED.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: