notes for wrath

equipment sets are back


local activeTalentGroup = GetActiveTalentGroup()  -- active talent spec
local numTalentGroups = GetNumTalentGroups() -- total talent specs

---------------------------------------------------------------------------------------------------------

update .toc file for Classic Wrath

with

## Interface: 30400
## Title: Button Forge |cff69ccf0(Classic-Wrath)|r
## Version: 1.0.6-classic-Wrath


Const.lua -----------------------------------------------------------------

changed ----------------------------------------------------------------------------
Const.VersionMinor			= 0.5;
to ---------------------------------------------------------------------------------
Const.VersionMinor			= 0.6;


button.lua -----------------------------------------------------------------

changed ----------------------------------------------------------------------------
local IsUsable, NotEnoughMana = IsUsableSpell(self.SpellNameRank);
to ---------------------------------------------------------------------------------
local IsUsable, NotEnoughMana = IsUsableSpell(self.SpellName);


Bar.lua -----------------------------------------------------------------

changed ----------------------------------------------------------------------------
		--	local NumSpecs = GetNumSpecializations() -- DOESN'T EXIST IN CLASSIC
		local NumSpecs = 1;
to ---------------------------------------------------------------------------------
		local NumSpecs = GetNumTalentGroups()

change
		if (self.BarSave["HSpec1"]) then
		  Text = Text.."[spec:1] hide; ";
		end
		if (self.BarSave["HSpec2"]) then
 			Text = Text.."[spec:2] hide; ";
		end
to
		if self.BarSave["Enabled"] then
		  if (self.BarSave["HSpec1"]) and Util_GetCurspec() == 1 then
			   -- Text = Text.."[spec:1] hide; ";
			   Text = Text.."hide; ";
		  end
		  if (self.BarSave["HSpec2"]) and Util_GetCurspec() == 2 then
  		   -- Text = Text.."[spec:2] hide; ";
  			 Text = Text.."hide; ";
      end
      if not strfind(Text, "hide;",1,true) then
        if self.BarSave["VDriver"] ~= nil then
          if strfind(self.BarSave["VDriver"], "[spec:1]",1,true) and Util_GetCurspec() == 1 then
		        Text = Text.."hide; ";
		      end
  		    if strfind(self.BarSave["VDriver"], "[spec:2]",1,true) and Util_GetCurspec() == 2 then
	    	    Text = Text.."hide; ";
	  	    end
	  	  end
		  end
	  end



EventManager.lua -----------------------------------------------------------------


changed ----------------------------------------------------------------------------
  --Conditional:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED");	--spec:
to ---------------------------------------------------------------------------------
  Conditional:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED");	--spec:

added
  Misc:RegisterEvent("EQUIPMENT_SETS_CHANGED");		--resync equip sets
after
  Misc:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED");


changed ----------------------------------------------------------------------------
  --	elseif (Event =="ACTIVE_TALENT_GROUP_CHANGED") then
		  --Set the talentswap flag so we know not to auto promote any spells
  --		self.RefreshSpells = true;
  --		self.TalentSwap = true;
  --		self:SetScript("OnUpdate", self.OnUpdate);
to ---------------------------------------------------------------------------------
	elseif (Event =="ACTIVE_TALENT_GROUP_CHANGED") then
		-- Set the talentswap flag so we know not to auto promote any spells
		self.RefreshSpells = true;
		self.TalentSwap = true;
		Util.VDriverOverride(); -- refreshes bars after talent group change, so don't need to hit buttonforge config to refresh.
		self:SetScript("OnUpdate", self.OnUpdate);		



EventManager.lua -----------------------------------------------------------------


changed ----------------------------------------------------------------------------
  Misc:RegisterEvent("CURSOR_UPDATE");	
to ---------------------------------------------------------------------------------
  Misc:RegisterEvent("CURSOR_CHANGED");	



UILibDragIcon.lua -----------------------------------------------------------------


changed all ------------------------------------------------------------------------
  DragIcon:RegisterEvent("CURSOR_UPDATE")
to ---------------------------------------------------------------------------------
  DragIcon:RegisterEvent("CURSOR_CHANGED")

changed all ------------------------------------------------------------------------
  DragIcon:UnregisterEvent("CURSOR_UPDATE");
to ---------------------------------------------------------------------------------
  DragIcon:UnregisterEvent("CURSOR_CHANGED");
  

Util.lua -----------------------------------------------------------------


changed ----------------------------------------------------------------------------
  local _, _, offset, numSlots = GetSpellTabInfo(i)
to ---------------------------------------------------------------------------------
  local _, _, offset, numSlots, isGuild, offspecID  = GetSpellTabInfo(i)

	
added to end of Util.lua

function Util_GetCurspec()
  local curspec = 1
  if  GetActiveTalentGroup() ~= nil then
    curspec = GetActiveTalentGroup()
  end
  return(curspec)
end

