Download
(29Kb)
Download
Updated: 07-01-11 08:24 AM
Pictures
File Info
Updated:07-01-11 08:24 AM
Created:02-28-09 11:25 AM
Downloads:12,670
Favorites:133
MD5:

Broker EquipSwitch  Popular! (More than 5000 hits)

Version: 4.2.0
by: lloydbates [More]

What is this?
Broker: EquipSwitch is an Addon using the LibDataBroker Data Display Specifications.

Data display addons provide a LDB “feed” for an always-up addon to display. These addons can be thought of like RSS feeds, where the display addon is similar to an RSS reader. Display addons could include FuBar, Titan Panel, StatBlocks, LegoBlocks, or any other design out there.
What does it do?
With the PTR Patch 3.1.0 Blizzard introduced a new feature, the Equipemt Manager. It was pulled back for the release of 3.1.0 but released shortly after, in a minor content patch.
This Addon tries to increase the accessibility by providing means to switch predefined equipment sets by just a few clicks.

Features:
- Shows currently used Equipment Set with icon and text
- Shows a list of all defined Equipment Sets with icon and text
- Clicking a Set will equip it, in combat swaping is provided by Blizzard
- Right clicking the plugin will open the Blizzard GearManager

Broker: EquipSwitch also comes with Broker: EquipSwitchUI.
It is a small display addon that provides a minimap button, it's completly optional.
If you don't have a display addon, maybe this is just for you!
If you don't want a minimap button, don't load Broker: EquipSwitchUI or delete the folder manually.

What it won't do
This addon will not allow you to add, edit or delete equipment sets.
Use the Blizzard UI for this, it's a one-time task anyway.

Feature request are welcome, but don't hold your breath for it.

Some Display Addons
There are some nice display addons, for a list see http://wiki.github.com/tekkub/libdat...dons-using-ldb

- 4.2.0:
TOC Bump
- 4.1.2:
Fixed showing the Equipment Manager on right clicking the broker
- 4.1.1:
Fixed right clicking on the broker to open the gear manager
Known bug: the first time you open the character window, the manager will be empty
- 4.1.0:
TOC Bump
- 4.0.0:
Big version jump without any new functions, I'm keeping it minimal because I don't need more features.
Updated libraries

- 1.4.1:
Fixed an nil error that happend when no previously saved set was saved for the current character.

- 1.4.0:
Right clicking on the plugin will open the Blizzard GearManager
Now uses the table that is passed by blizzard
Event handling simplyfied, more stuff is moved to the time the addon actualy is loaded
Added support for MMOUI Minion

- 1.3.9:
TOC Bump for patch 3.3
Next release will be refactored for the new parameters blizzard passes to addons

- 1.3.5:
Nobody told me .. it's esES and not enES! :sadface:

- 1.3.4:
Fixed enES translation, thanks PatoDaia
As always, if a translation displays wrong for your local or you want one added/edited, please
submit a lua file.

- 1.3.3:
Added enES, thanks PatoDaia
As always, if a translation displays wrong for your local or you want one added/edited, please
submit a lua file.

- 1.3.2:
Added ruRU, thanks kolod
This translation was c&p from a website, it may not display correct for you if you are on ruRU local.
If this happens, please supply a lua file that I can download to add it again.

- 1.3.1
Added koKR, thanks chkid

- 1.3.0
Updated TOC

- 1.2.0:
Broker_EquipSwitch:
Added zhTW, thanks a9012456
Switched to AceLocal-3.0 for localization, to make it easier for the translators to send me new translations.

Broker_EquipSwitchUI:
Simplyfied the code and removed a redundant callback

- 1.1.0:
If equiping a set fails, the icon will not update.
This happenes when you are on taxi or are casting a spell and try
to switch to a different set.

- 1.0.0:
Release, removed some debug output

- 0.12.0:
TOC Update
Changed VARIABLES_LOADED to ADDON_LOADED
Changed PLAYER_ENTERING_WORLD to PLAYER_LOGIN

- 0.11.1:
Fixed table recycling and some tweaks.

- 0.11.0:
Added Broker_EquipSwitchUI to the package, this provides a minimap icon.
If you don't want a minimap icon, don't load this as an addon.

- 0.10.0:
Feature complete for 3.1.0, waiting for GetEquipmentSetInfoByName API fix

- 0.9.9658-3:
Small update for workaround introduced in 0.9.9658-2
New default icon
Removed redundant queue for switching equipment while in combat,
therefore allowing switching of mainhand, offhand and
ranged weapons. This is handlede by Blizzard within
EquipmentManager_AddPendingEquip(itemId, inventorySlot, location).

- 0.9.9658-2:
Added workaround for Blizzard API bug.

- 0.9.9658:
Some code clean up and tweaks.
Improved table handling and reusing.
Improved the way the items in the menu are created.

- 0.9.9637:
Updated Version
Added german local

- 0.9.9626:
Initial upload
Post A Reply Comment Options
Unread 08-22-09, 10:06 AM  
lloydbates
A Kobold Labourer
 
lloydbates's Avatar
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 48
Uploads: 3
Re: ruRU locale

Originally posted by kolod
Broker_EquipSwitch\locales\ruRU.lua
Code:
local L = LibStub("AceLocale-3.0"):NewLocale("Broker_EquipSwitch", "ruRU")
if not L then return end

L["Current set: %s"] = "Текущий комплект: %s"
L["No set"] = "Без комплекта"
Thanks for your help, but could you please upload it as a ziped textfile?
Copy&Paste from the webpage does not work for me when using a different character encoding than my default ISO-8859.
I don't know if the copied text would display correctly for you ingame.
__________________
Gentlemen, you can't fight in here! This is the War Room!
Report comment to moderator  
Reply With Quote
Unread 08-19-09, 10:51 AM  
kolod
A Kobold Labourer
 
kolod's Avatar

Forum posts: 0
File comments: 1
Uploads: 0
ruRU locale

Broker_EquipSwitch\locales\ruRU.lua
Code:
local L = LibStub("AceLocale-3.0"):NewLocale("Broker_EquipSwitch", "ruRU")
if not L then return end

L["Current set: %s"] = "Текущий комплект: %s"
L["No set"] = "Без комплекта"
__________________
Report comment to moderator  
Reply With Quote
Unread 06-21-09, 04:19 AM  
Frayol
A Deviate Faerie Dragon
 
Frayol's Avatar
AddOn Author - Click to view AddOns

Forum posts: 10
File comments: 127
Uploads: 4
Originally posted by lloydbates
Also, how often do you find yourself editing a set?
Fairly often when levelling. However I do see your point.

Originally posted by lloydbates
This is a valid request, but it's out of scope of what I want this addon to be. As you mentioned, there are already addons that react to these events (swapping a dagger) and that work very well.
Fair enough, but it can be annoying to hit stealth, have it broken and then find out part way through the fight that your dagger hasn't swapped back. Still, it is something that I can work around.
Report comment to moderator  
Reply With Quote
Unread 06-20-09, 01:52 AM  
lloydbates
A Kobold Labourer
 
lloydbates's Avatar
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 48
Uploads: 3
Originally posted by Frayol
The issue is that when a set is updated the display reverts to "No Set".
This behavior is intentional. The reasoning behind it is the following:
If you add, edit or delete a set, an event (EQUIPMENT_SETS_CHANGED) is fired. It's the same event for all these three actions.
I can't say for sure what action triggered this event, add, edit or delete.
  • When you add a set, you are in the newly created set. Not resetting the display to "No Set" would still display the old set that was equiped when you changed your items and added them as a new set.
  • When you delete a set, not resetting the display would still display the set that is now gone.
  • Editing a set is the only case where the old and the new set are identical. But it could be posible that you just changed the name or the icon. It still would display the old name and icon.
This is why I reset the diplay to "No Set" when the event is fired. It's not optimal but at least it does nothing wrong. Also, how often do you find yourself editing a set?

Originally posted by Frayol
Now for the feature request, and please bear with me on this. On several of my characters I did use the scripts for event based swapping (i.e. on my rogue equipping a dagger when entering stealth and back to whatever when leaving). There are a couple of addons and macros that achieve the same functionality so I am not asking for this to be added, but is it possible for display to detect this change of equipment and update the display name with the relevant set name if a set is created or perhaps "Unknown Set" if it hasn't? If it helps, of the 3 addons I've been testing Mokhtar's is the only one that detects this change.
This is a valid request, but it's out of scope of what I want this addon to be. As you mentioned, there are already addons that react to these events (swapping a dagger) and that work very well.
__________________
Gentlemen, you can't fight in here! This is the War Room!
Report comment to moderator  
Reply With Quote
Unread 06-19-09, 09:25 AM  
Frayol
A Deviate Faerie Dragon
 
Frayol's Avatar
AddOn Author - Click to view AddOns

Forum posts: 10
File comments: 127
Uploads: 4
Have been testing this, P3lim's Broker Equipment and Mokhtar's Broker BlizzEquipmentSet out with a view to switching away from Outfitter as it does far more that I really need. I've noticed one issue and have a feature request. The issue is that when a set is updated the display reverts to "No Set".

Now for the feature request, and please bear with me on this. On several of my characters I did use the scripts for event based swapping (i.e. on my rogue equipping a dagger when entering stealth and back to whatever when leaving). There are a couple of addons and macros that achieve the same functionality so I am not asking for this to be added, but is it possible for display to detect this change of equipment and update the display name with the relevant set name if a set is created or perhaps "Unknown Set" if it hasn't? If it helps, of the 3 addons I've been testing Mokhtar's is the only one that detects this change.
Report comment to moderator  
Reply With Quote
Unread 06-10-09, 08:13 AM  
lloydbates
A Kobold Labourer
 
lloydbates's Avatar
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 48
Uploads: 3
Code:
LDBIcon:Refresh("Broker_EquipSwitch", db)
This line was there to update the icon when switching a set.
If I remember correctly, it did not update without it.
I'll test it and remove the function and the callback if it still works.

** Edit:
Looks like it updates the icon, even without the function call.
I removed the function and the callback it in the new version (1.2.0).
__________________
Gentlemen, you can't fight in here! This is the War Room!
Last edited by lloydbates : 06-10-09 at 09:20 AM.
Report comment to moderator  
Reply With Quote
Unread 06-08-09, 07:22 AM  
Spellshaper
A Murloc Raider
 
Spellshaper's Avatar
AddOn Author - Click to view AddOns

Forum posts: 8
File comments: 70
Uploads: 2
Like it. Does what is direly needed for easy access, works like a charm, does nothing more than needed.

There is just one thing that bugs me: I am using a small script to align my minimap buttons into neat rows.
Whenever I swap to another equipment set though, the minimap icon of EquipSwitch bounces off to somewhere else before being snatched back by my script.

Is it necessary to update the postion of the icon each time sets are swapped? I can imagine this messes up other addons that rearrange minimap buttons also.

Editing out line 32 of Broker_EquipSwitchUI\Core.lua seems to fix that without any detrimental effects.
__________________
"We shaman don't command the magic we wield. As mages and warlocks strain and sweat to produce a tiny flame, I ask for the elements to lend me their strength."
Last edited by Spellshaper : 06-08-09 at 07:22 AM.
Report comment to moderator  
Reply With Quote
Unread 05-25-09, 04:59 AM  
lloydbates
A Kobold Labourer
 
lloydbates's Avatar
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 48
Uploads: 3
The Blizzard UI uses EquipmentManager_EquipSet("SetName") to switch the saved sets.
From the EquipmentManager.lua
Code:
function EquipmentManager_EquipSet (name)
    if ( EquipmentSetContainsLockedItems(name) or UnitOnTaxi("player") or UnitCastingInfo("player") ) then
        UIErrorsFrame:AddMessage(ERR_CLIENT_LOCKED_OUT, 1.0, 0.1, 0.1, 1.0);
        return;
    end
 
    UseEquipmentSet(name);
end
You should not be using UseEquipmentSet, but I think you already know that now.
'Not a Bug' but I'll think about changing the detection to use UseEquipmentSet.
If you cast a spell and try to switch a set, the icon will updated even if the set could not be switched.
__________________
Gentlemen, you can't fight in here! This is the War Room!
Last edited by lloydbates : 05-25-09 at 05:01 AM.
Report comment to moderator  
Reply With Quote
Unread 05-24-09, 06:23 AM  
ereth
A Murloc Raider
AddOn Author - Click to view AddOns

Forum posts: 7
File comments: 44
Uploads: 5
Have found a "bug".
If you use UseEquipmentSet the display addon wont be updated.

/run UseEquipmentSet("SetName1")

I use that one to test it.

This is a problem becuase I use a macro to swap my gear according to the spec I use and I use this addon to display my current gear/spec.

Thanks for reading

edit: found a solution. now uses EquipmentManager_EquipSet("SetName1")
Last edited by ereth : 05-24-09 at 09:45 AM.
Report comment to moderator  
Reply With Quote
Unread 05-20-09, 08:01 AM  
lloydbates
A Kobold Labourer
 
lloydbates's Avatar
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 48
Uploads: 3
Originally posted by Logan1981
Does this addon automatically switch to a set based on stance? For example, if I have a set for when I activate stealth, it equips that set, then unequips it when stealth is broken?
It does not switch to a set when you enter a stance. It does not react on any player event like this.
It is just a frontend for the newly introduced equipment manager.

As long as Blizzard does not do this, this addon will not do it either.
__________________
Gentlemen, you can't fight in here! This is the War Room!
Last edited by lloydbates : 05-20-09 at 08:04 AM.
Report comment to moderator  
Reply With Quote
Unread 05-20-09, 04:28 AM  
Logan1981
A Murloc Raider

Forum posts: 5
File comments: 10
Uploads: 0
Hello

Does this addon automatically switch to a set based on stance? For example, if I have a set for when I activate stealth, it equips that set, then unequips it when stealth is broken?

Thanks!
Report comment to moderator  
Reply With Quote
Unread 03-26-09, 02:57 PM  
lloydbates
A Kobold Labourer
 
lloydbates's Avatar
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 48
Uploads: 3
I just wanted to keep 'Broker_EquipSwitch' as it is, just a plugin and nothing more.
The need for an optional minimap icon led to 'Broker_EquipSwitchUI'.
Personally, I don't mind the extra addon. It is very basic and it is completly optional.

Point taken, it's also possible to integrate it into 'Broker_EquipSwitch' directly, but then it would offer options nobody would expect of just an LibDataBroker plugin.
Having it seperated allows greater customisation and, what is more important, to just load the plugin.
If one does not need an extra minimap button, just don't load Broker_EquipSwitchUI and there is no downside.

What is bothering me, it clutters up the addon directory.
__________________
Gentlemen, you can't fight in here! This is the War Room!
Report comment to moderator  
Reply With Quote
Unread 03-26-09, 11:26 AM  
Tristanian
Andúril
AddOn Author - Click to view AddOns

Forum posts: 279
File comments: 262
Uploads: 3
Originally posted by lloydbates
I'll think about integrating it into the 'main' addon.
You are right, it's not much additional code.

A guildy of mine did not have a display addon for libdatabroker based plugins, that's why this one exists.
I just threw it into the zip in case anyone would want a minimap icon, I didn't thought it would do any harm to have it seperated.
But it doesn't do any harm ! On the contrary it is a good idea. I just (personally) didn't see the purpose in the different addon, since the same thing can be accomplished through the 'main' addon and may be easier for you to manage, code wise. Ultimately it's your work and the decision is 100% yours
__________________
Report comment to moderator  
Reply With Quote
Unread 03-26-09, 09:56 AM  
lloydbates
A Kobold Labourer
 
lloydbates's Avatar
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 48
Uploads: 3
I'll think about integrating it into the 'main' addon.
You are right, it's not much additional code.

A guildy of mine did not have a display addon for libdatabroker based plugins, that's why this one exists.
I just threw it into the zip in case anyone would want a minimap icon, I didn't thought it would do any harm to have it seperated.
__________________
Gentlemen, you can't fight in here! This is the War Room!
Report comment to moderator  
Reply With Quote
Unread 03-26-09, 03:26 AM  
Tristanian
Andúril
AddOn Author - Click to view AddOns

Forum posts: 279
File comments: 262
Uploads: 3
With all do respect, what is the point of Broker EquipSwitchUI ? It's code and basically LibDBIcon-1.0 can easily be integrated into the main addon and by using a simple savedvar and perhaps a slash command, you can provide the option to a user to show or hide the minimap icon. Basically you achieve the same thing, without the need to create a new addon. Just a suggestion/observation.
__________________
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: