WoWInterface SVN EventEquip

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 5 to Rev 6
    Reverse comparison

Rev 5 → Rev 6

trunk/EventEquip/EventEquip.lua
82,7 → 82,7
end
end
 
function EventEquip.PLAYER_FLAGS_CHANGED(unit)
function EventEquip.PLAYER_FLAGS_CHANGED(unit) --decide if I want pvp set on in-town - also about mounted set while pvp
if unit == "player" then
if UnitIsPVP("player") then
-- print("is pvp flagged")
90,6 → 90,7
-- print("just pvp flagged")
if not wasResting then
CollectPrevious()
-- EquipmentManager_EquipSet(EventEquipDB["PvP"])
end
EquipmentManager_EquipSet(EventEquipDB["PvP"])
wasPvP = true
171,6 → 172,8
-- print("mounted: "..tostring(wasMounted))
if wasMounted and EventEquipDB["Mounted"] ~= "None" then
EquipmentManager_EquipSet(EventEquipDB["Mounted"])
-- elseif wasPvP and EventEquipDB["PvP"] ~= "None" then
-- EquipmentManager_EquipSet(EventEquipDB["PvP"])
else
EquipPrevious()
end
234,7 → 237,7
end
 
local function OnEnter(self, text)
GameTooltip:SetOwner(self, "ANCHOR_TOPRIGHT")
GameTooltip:SetOwner(self, "ANCHOR_BOTTOMRIGHT")
GameTooltip:SetText(text)
GameTooltip:Show()
end
243,6 → 246,25
GameTooltip:Hide()
end
 
local function SetTooltips(self)
local set = GetEquipmentSetInfo(strsub(self:GetName(),14))
OnEnter(self, set)
local items = GetEquipmentSetLocations(set)
for k,v in pairs(items) do
local _,item = EquipmentManager_GetItemInfoByLocation(v)
if item then
GameTooltip:AddLine(" - "..item,1,1,1)
end
end
GameTooltip:AddLine("\nCurrently saved to...")
for k,v in pairs(EventEquipDB) do
if v == set then
GameTooltip:AddDoubleLine(" ", k,1,1,1,1,1,1)
end
end
GameTooltip:Show()
end
 
local function SetUpOptions()
local eeOpts = CreateFrame("Frame", "EEOptions", gmd)
eeOpts:SetPoint("TOPLEFT", gmd, "BOTTOMLEFT", 3, 4)
413,6 → 435,11
EEOptions:Hide()
end
end)
for i=1,10 do
button = _G["GearSetButton"..i]
SetScriptHook(button, "OnEnter", function(self) SetTooltips(self) end)
SetScriptHook(button, "OnLeave", OnLeave)
end
 
EventEquip:UnregisterEvent("PLAYER_ENTERING_WORLD")
end
trunk/EventEquip/EventEquip.toc
1,7 → 1,7
## Interface: 30100
## Title: EventEquip
## Author: Seerah
## Version: 0.2
## Version: 0.3
## Notes: Equip item sets created by the in-game Equipment Manager based on events.
## SavedVariablesPerCharacter: EventEquipDB