WoWInterface SVN ItemRack

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 36 to Rev 37
    Reverse comparison

Rev 36 → Rev 37

ItemRack/change log.txt
1,3 → 1,7
__ New in 2.98 - By Kharthus __
 
* Fixed items with different enchants
 
__ New in 2.97 - By Kharthus __
 
* TOC update for 6.2 patch
ItemRack/ItemRack.lua
3,7 → 3,7
local disable_delayed_swaps = nil -- temporary. change nil to 1 to stop attempting to delay set swaps while casting
local _
 
ItemRack.Version = 2.97
ItemRack.Version = 2.98
 
ItemRackUser = {
Sets = {}, -- user's sets
465,9 → 465,9
end
 
-- itemrack itemstring updater.
-- takes a saved ItemRack-style ID and returns an updated version with the latest player level injected, which helps us update outdated IDs saved when the player was lower level
-- takes a saved ItemRack-style ID and returns an updated version with the latest player level and spec injected, which helps us update outdated IDs saved when the player was lower level or different spec
function ItemRack.UpdateIRString(itemRackID)
return (string.gsub(itemRackID or "", "^("..strrep("%d+:", 8)..")%d+", "%1"..UnitLevel("player"))) --note: parenthesis to discard 2nd return value (number of substitutions, which will always be 1)
return (string.gsub(itemRackID or "", "^("..strrep("%d+:", 8)..")%d+:%d+", "%1"..UnitLevel("player")..":"..GetInspectSpecialization("player"))) --note: parenthesis to discard 2nd return value (number of substitutions, which will always be 1)
end
 
-- returns the provided ItemRack-style ID string with "item:" prepended, which turns it into a normal itemstring which we can then use for item lookups, itemlink generation and so on.
ItemRack/ItemRackEquip.lua
233,6 → 233,7
-- if this is a special set that stored a setname, set current to that setname
ItemRackUser.CurrentSet = ItemRackUser.Sets[setname].oldset
ItemRackUser.Sets[setname].oldset = nil
ItemRack.UpdateCurrentSet()
end
if ItemRackOptFrame and ItemRackOptFrame:IsVisible() then
ItemRackOpt.ChangeEditingSet()
276,11 → 277,12
local id
for i in pairs(set) do
id = ItemRack.GetID(i)
if (exact and set[i]~=id) or (not exact and not ItemRack.SameID(set[i],ItemRack.GetID(i))) then
return nil
-- if (exact and set[i]~=id) or (not exact and not ItemRack.SameID(set[i],ItemRack.GetID(i))) then
if (ItemRack.UpdateIRString(set[i]) ~= id) then
return false
end
end
return 1
return true
end
end
 
306,8 → 308,10
 
function ItemRack.ToggleSet(setname,exact)
if ItemRack.IsSetEquipped(setname,exact) then
-- print("remove "..setname)
ItemRack.UnequipSet(setname)
else
-- print("equip "..setname)
ItemRack.EquipSet(setname)
end
end