WoWInterface SVN EventEquip

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 9 to Rev 8
    Reverse comparison

Rev 9 → Rev 8

trunk/EventEquip/EventEquip.lua
44,9 → 44,7
-- print("equipping...")
for i=1,19 do
if EventEquipDB.previousGear[i] == nil then
-- EquipmentManager_UnequipItemInSlot(i)
PickupInventoryItem(i)
EquipmentManager_PutItemInInventory()
EquipmentManager_UnequipItemInSlot(i)
else
EquipItemByName(EventEquipDB.previousGear[i])
end
153,30 → 151,31
end
end
 
--NEW EVENT! - ACTIVE_TALENT_GROUP_CHANGED - arg1 = active talent index, arg2 = previous talent index
function EventEquip.ACTIVE_TALENT_GROUP_CHANGED(spec)
if spec == 1 and EventEquipDB["Primary Talent Spec"] ~= "None" then
EquipmentManager_EquipSet(EventEquipDB["Primary Talent Spec"])
elseif spec == 2 and EventEquipDB["Secondary Talent Spec"] ~= "None" then
EquipmentManager_EquipSet(EventEquipDB["Secondary Talent Spec"])
function EventEquip.UNIT_SPELLCAST_SUCCEEDED(unit, spell)
if unit == "player" then
if spell == "Activate Primary Spec" and EventEquipDB["Primary Talent Spec"] ~= "None" then
EquipmentManager_EquipSet(EventEquipDB["Primary Talent Spec"])
elseif spell == "Activate Secondary Spec" and EventEquipDB["Secondary Talent Spec"] ~= "None" then
EquipmentManager_EquipSet(EventEquipDB["Secondary Talent Spec"])
end
end
end
 
EventEquip["Primary Talent Spec"] = function()
if EventEquipDB["Primary Talent Spec"] == "None" and EventEquipDB["Secondary Talent Spec"] == "None" then
EventEquip:UnregisterEvent("ACTIVE_TALENT_GROUP_CHANGED")
EventEquip:UnregisterEvent("UNIT_SPELLCAST_SUCCEEDED")
return
else
EventEquip:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED")
EventEquip:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED")
end
end
 
EventEquip["Secondary Talent Spec"] = function()
if EventEquipDB["Secondary Talent Spec"] == "None" and EventEquipDB["Primary Talent Spec"] == "None" then
EventEquip:UnregisterEvent("ACTIVE_TALENT_GROUP_CHANGED")
EventEquip:UnregisterEvent("UNIT_SPELLCAST_SUCCEEDED")
return
else
EventEquip:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED")
EventEquip:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED")
end
end
 
238,7 → 237,6
 
local function SetTooltips(self)
local set = GetEquipmentSetInfo(strsub(self:GetName(),14))
local saved = false
OnEnter(self, set)
local items = GetEquipmentSetLocations(set)
for k,v in pairs(items) do --do a check for
253,10 → 251,8
for k,v in pairs(EventEquipDB) do
if v == set then
GameTooltip:AddDoubleLine(" ", k,1,1,1,1,1,1)
saved = true
end
end
if not saved then GameTooltip:AddDoubleLine(" ", "Not assigned", 1,1,1,1,1,1) end
GameTooltip:Show()
end
 
354,7 → 350,7
local eeButton = CreateFrame("Button", nil, gmd)
eeButton:SetWidth(22)
eeButton:SetHeight(22)
eeButton:SetPoint("TOPLEFT", gmd, "TOPLEFT", 10,-3.5)
eeButton:SetPoint("BOTTOM", gmd, "BOTTOM", 2,12)
eeButton:SetNormalTexture("Interface\\Minimap\\Tracking\\Repair.blp")
eeButton:SetHighlightTexture("Interface\\Buttons\\UI-Panel-Button-Highlight.blp")
eeButton:GetHighlightTexture():SetTexCoord(0,.64,0,.64)
trunk/EventEquip/EventEquip.toc
1,7 → 1,7
## Interface: 30200
## Interface: 30100
## Title: EventEquip
## Author: Seerah
## Version: 0.5
## Version: 0.4.1
## Notes: Equip item sets created by the in-game Equipment Manager based on events.
## SavedVariablesPerCharacter: EventEquipDB