WoWInterface SVN EventEquip

Compare Revisions

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

Rev 8 → Rev 9

trunk/EventEquip/EventEquip.lua
44,7 → 44,9
-- print("equipping...")
for i=1,19 do
if EventEquipDB.previousGear[i] == nil then
EquipmentManager_UnequipItemInSlot(i)
-- EquipmentManager_UnequipItemInSlot(i)
PickupInventoryItem(i)
EquipmentManager_PutItemInInventory()
else
EquipItemByName(EventEquipDB.previousGear[i])
end
151,31 → 153,30
end
end
 
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
--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"])
end
end
 
EventEquip["Primary Talent Spec"] = function()
if EventEquipDB["Primary Talent Spec"] == "None" and EventEquipDB["Secondary Talent Spec"] == "None" then
EventEquip:UnregisterEvent("UNIT_SPELLCAST_SUCCEEDED")
EventEquip:UnregisterEvent("ACTIVE_TALENT_GROUP_CHANGED")
return
else
EventEquip:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED")
EventEquip:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED")
end
end
 
EventEquip["Secondary Talent Spec"] = function()
if EventEquipDB["Secondary Talent Spec"] == "None" and EventEquipDB["Primary Talent Spec"] == "None" then
EventEquip:UnregisterEvent("UNIT_SPELLCAST_SUCCEEDED")
EventEquip:UnregisterEvent("ACTIVE_TALENT_GROUP_CHANGED")
return
else
EventEquip:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED")
EventEquip:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED")
end
end
 
237,6 → 238,7
 
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
251,8 → 253,10
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
 
350,7 → 354,7
local eeButton = CreateFrame("Button", nil, gmd)
eeButton:SetWidth(22)
eeButton:SetHeight(22)
eeButton:SetPoint("BOTTOM", gmd, "BOTTOM", 2,12)
eeButton:SetPoint("TOPLEFT", gmd, "TOPLEFT", 10,-3.5)
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: 30100
## Interface: 30200
## Title: EventEquip
## Author: Seerah
## Version: 0.4.1
## Version: 0.5
## Notes: Equip item sets created by the in-game Equipment Manager based on events.
## SavedVariablesPerCharacter: EventEquipDB