Skip to content

Instantly share code, notes, and snippets.

@Mystler
Created February 26, 2020 11:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mystler/f8197597d932fe989ac7775e4d2756d3 to your computer and use it in GitHub Desktop.
Save Mystler/f8197597d932fe989ac7775e4d2756d3 to your computer and use it in GitHub Desktop.
Broker Everything Equipment Set Fixes
--- Line 51, in if numEquipSets>0
local equipName, iconFile, setID, isEquipped, _, _, _, numMissing;
local i = 0;
local processedSets = 0;
while processedSets < numEquipSets do
equipName, iconFile, setID, isEquipped, _, _, _, numMissing = C_EquipmentSet.GetEquipmentSetInfo(i);
if equipName then
local pending = (equipPending and C("orange",equipPending)) or false;
if isEquipped then
iconCoords = {0.05,0.95,0.05,0.95}
icon = iconFile;
tinsert(text,pending~=false and pending or equipName);
end
processedSets = processedSets + 1;
end
i = i + 1;
end
if(#text==0)then
local txt = L["Unknown set"];
if ns.profile[name].showShorterInfo then
txt = L["Set?"];
end
tinsert(text,pending~=false and pending or C("red",txt));
end
-- Lines 225-251 within else block
local numEquipSets = C_EquipmentSet.GetNumEquipmentSets()
if (numEquipSets>0) then
local eName, icon, setID, isEquipped, numMissing, _;
local i = 0;
local processedSets = 0;
while processedSets < numEquipSets do
eName, icon, setID, isEquipped, _, _, _, numMissing = C_EquipmentSet.GetEquipmentSetInfo(i);
if eName then
local color = (equipPending and equipPending==i and "orange") or (numMissing>0 and "red") or (isEquipped and "ltyellow") or false
local formatName = color~=false and C(color,eName) or eName;
local line = ns.AddSpannedLine(tt, "|T"..(icon or ns.icon_fallback)..":0|t "..formatName);
tt:SetLineScript(line, "OnMouseUp", equipOnClick,setID);
tt:SetLineScript(line, "OnEnter", equipOnEnter,setID);
tt:SetLineScript(line, "OnLeave", equipOnLeave);
processedSets = processedSets + 1;
end
i = i + 1
end
if (ns.profile.GeneralOptions.showHints) then
tt:AddSeparator();
ns.AddSpannedLine(tt, C("ltblue",L["MouseBtn"]).." "..C("green",L["to equip"]) .." - ".. C("ltblue",L["ModKeyC"].."+"..L["MouseBtn"]).." "..C("green",L["to delete"]));
ns.AddSpannedLine(tt, C("ltblue",L["ModKeyS"].."+"..L["MouseBtn"]).." "..C("green",L["to update/save"]));
end
else
ns.AddSpannedLine(tt,L["No equipment sets found"]);
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment