WoWInterface SVN OneCompanion

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 30 to Rev 31
    Reverse comparison

Rev 30 → Rev 31

OneCompanion/frames/templates.lua
197,13 → 197,23
btn[i] = slot
OneCompanionOptions:ToggleShowTooltips(nil, spellID, btn[i])
slot:SetScript("OnClick", function()
local creatureID, creatureName, spellID, icon, active = GetCompanionInfo("MOUNT", i);
if active then
DismissCompanion("MOUNT", i)
PlaySound("igMainMenuOptionCheckBoxOn")
if IsModifiedClick("CHATLINK") then
if MacroFrame and MacroFrame:IsShown() then
local spellName = GetSpellInfo(spellID);
ChatEdit_InsertLink(spellName);
else
local spellLink = GetSpellLink(spellID)
ChatEdit_InsertLink(spellLink);
end
else
CallCompanion("MOUNT", i)
PlaySound("igMainMenuOptionCheckBoxOff")
local creatureID, creatureName, spellID, icon, active = GetCompanionInfo("MOUNT", i);
if active then
DismissCompanion("MOUNT", i)
PlaySound("igMainMenuOptionCheckBoxOn")
else
CallCompanion("MOUNT", i)
PlaySound("igMainMenuOptionCheckBoxOff")
end
end
end)
end
218,13 → 228,23
btn[id] = slot
OneCompanionOptions:ToggleShowTooltips(nil, spellID, btn[id])
slot:SetScript("OnClick", function()
local creatureID, creatureName, spellID, icon, active = GetCompanionInfo("CRITTER", i)
if active then
DismissCompanion("CRITTER", i)
PlaySound("igMainMenuOptionCheckBoxOn")
if IsModifiedClick("CHATLINK") then
if MacroFrame and MacroFrame:IsShown() then
local spellName = GetSpellInfo(spellID);
ChatEdit_InsertLink(spellName);
else
local spellLink = GetSpellLink(spellID)
ChatEdit_InsertLink(spellLink);
end
else
CallCompanion("CRITTER", i)
PlaySound("igMainMenuOptionCheckBoxOff")
local creatureID, creatureName, spellID, icon, active = GetCompanionInfo("CRITTER", i)
if active then
DismissCompanion("CRITTER", i)
PlaySound("igMainMenuOptionCheckBoxOn")
else
CallCompanion("CRITTER", i)
PlaySound("igMainMenuOptionCheckBoxOff")
end
end
end)
end