Thread Tools Display Modes
05-24-09, 01:21 PM   #1
Asmalya
A Murloc Raider
Join Date: May 2009
Posts: 9
Blizzard Equipment Manager

Hi WoWInterface Community,
I want to ask, if there is a function in the WoW API to determinate, whether the EquipmentManager is enabled or not. In addition, does a function exist to enable or disable the Manager.
Last but not least, is there a function, which shows/hides the EquipmentManager?
regards
  Reply With Quote
05-24-09, 01:28 PM   #2
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,941
Yes there is an in game option to disable and enable the equipment manager.

Options > Interface > Controls and at the bottom of the page there.
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818
  Reply With Quote
05-24-09, 01:29 PM   #3
Asmalya
A Murloc Raider
Join Date: May 2009
Posts: 9
a lua-function*
  Reply With Quote
05-24-09, 01:34 PM   #4
jaliborc
A Chromatic Dragonspawn
 
jaliborc's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2007
Posts: 196
I'm not sure, but I advice you to look into the InterfaceOptions code and look for CVar functions: one of them should determine if it is enabled or disabled.
  Reply With Quote
05-24-09, 01:34 PM   #5
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,941
And looking at wowcompares it looks like the following code is how you test for whether it is active or not.

Code:
+		if ( GetCVarBool("equipmentManager") ) then
+			GearManagerToggleButton:Show();
+		end
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818
  Reply With Quote
05-24-09, 01:35 PM   #6
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,941
Originally Posted by Asmalya View Post
a lua-function*
My apologies .. I thought the first questions were regarding lua and the last an in game option.
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818
  Reply With Quote
05-24-09, 01:36 PM   #7
Macniel
A Fallenroot Satyr
 
Macniel's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2007
Posts: 26
I had search config.wtf and found a Config Value called equipmentManager

so you can check with GetCVarBool("equipmentManager") if the Equipment Manager is active or not (but the equipset slash command works even if this value is not set)

to Show the Equipment Manager you have to reparent it since it would not be visible if the PaperdollFrame is not visible.

To actually show it then use this code :

Code:
 
GearManagerDialog:SetParent("UIParent")
GearManagerDialog:Show()
  Reply With Quote
05-24-09, 01:45 PM   #8
Asmalya
A Murloc Raider
Join Date: May 2009
Posts: 9
Oh, very nice, thank you all! :)
  Reply With Quote
05-24-09, 02:18 PM   #9
Asmalya
A Murloc Raider
Join Date: May 2009
Posts: 9
An additional question, is there an event, which is fired, when an equipment set is equipped?
  Reply With Quote
05-24-09, 02:46 PM   #10
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,941
Originally Posted by Asmalya View Post
An additional question, is there an event, which is fired, when an equipment set is equipped?
This is the GearManagers Event function. It looks like the first one could be what you want to check for.

Code:
function GearManagerDialog_OnEvent (self, event, ...)
	if ( event == "EQUIPMENT_SETS_CHANGED" ) then
		if ( self.selectedSet ) then
			self.selectedSet:SetChecked(0);
			self.selectedSet = nil;
		end
		GearManagerDialog_Update();
	elseif ( event == "UNIT_INVENTORY_CHANGED" ) then
		-- if ( self.selectedSet ) then
			-- self.selectedSet:SetChecked(0);
			-- self.selectedSet = nil;
		-- end
	elseif ( event == "VARIABLES_LOADED" ) then
		if ( GetCVarBool("equipmentManager") ) then
			GearManagerToggleButton:Show();
		end
	end
end
This might also be useful to know as well:

Code:
function GearManagerDialog_Update ()
	local numSets = GetNumEquipmentSets();
 
	local dialog = GearManagerDialog;
	local buttons = dialog.buttons;
 
	local name, texture;
	for i = 1, numSets do
		name, texture = GetEquipmentSetInfo(i);
		dialog.buttons[i]:Enable();
		dialog.buttons[i].name = name;
		dialog.buttons[i].text:SetText(name);
		if (texture) then
			dialog.buttons[i].icon:SetTexture(texture);
		else
			dialog.buttons[i].icon:SetTexture("Interface\\Icons\\INV_Misc_QuestionMark");
		end
	end
 
	for i = numSets + 1, MAX_EQUIPMENT_SETS_PER_PLAYER do
		dialog.buttons[i]:Disable();
		dialog.buttons[i].name = nil;
		dialog.buttons[i].text:SetText("");
		dialog.buttons[i].icon:SetTexture("");
	end
end
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818

Last edited by Xrystal : 05-24-09 at 02:51 PM.
  Reply With Quote
05-25-09, 06:32 AM   #11
Asmalya
A Murloc Raider
Join Date: May 2009
Posts: 9
EQUIPMENT_SETS_CHANGED is fired, when a new equipment set is created, an existing set deleted or an equipment set is changed. So it's not that thing, what i am looking for.
  Reply With Quote
05-25-09, 07:45 AM   #12
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
try UNIT_INVENTORY_CHANGED
  Reply With Quote
05-25-09, 09:24 AM   #13
Asmalya
A Murloc Raider
Join Date: May 2009
Posts: 9
Originally Posted by p3lim View Post
try UNIT_INVENTORY_CHANGED
Not that, for what I'm looking for:


Fired when the player equips or unequips an item. This can also be called if your target, mouseover or party member changes equipment (untested for hostile targets).

This event is also raised when a new item is placed in the player's containers, taking up a new slot. If the new item(s) are placed onto an existing stack or when two stacks already in the containers are merged, the event is not raised. When an item is moved inside the container or to the bank, the event is not raised. The event is raised when an existing stack is split inside the player's containers.

This event is also raised when a temporary enhancement (poison, lure, etc..) is applied to the player's weapon (untested for other units). It will again be raised when that enhancement is removed, including by manual cancellation or buff expiration.

If multiple slots are equipped/unequipped at once it only fires once now. However it still fires many times (potentially hundreds) while zoning or logging in.

arg1
the UnitID of the entity
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Blizzard Equipment Manager


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off