Now let's talk about the weapon enchant.
The system is still buggy and Blizzard has not finished it.
- Rightclick on the weapon enchant is not working (bug blizzard SecureTemplates.lua:395: attempt to call global 'CancelItemTempEnchant' (a nil value)).
- The gametooltip of the second enchant always show the main hand. (file SecureGroupHeaders.lua, line 777, local slot = GetInventorySlotInfo("MainHandSlot");, replace MainHandSlot by SecondaryHandSlot)
- The third weapon enchant button is not implemented yet in the new securedauraheader
Add this in the header :
Code:
headerAura:SetAttribute("includeWeapons", 1);
headerAura:SetAttribute("weaponTemplate", "RDXAB30x30Template");
In the style function :
Code:
local tempEnchant1 = headerAura:GetAttribute("tempEnchant1");
if tempEnchant1 then
if not tempEnchant1.tex then
-- create your style
end
local hasMainHandEnchant, mainHandExpiration, mainHandCharges = GetWeaponEnchantInfo();
if hasMainHandEnchant then
local slotid = GetInventorySlotInfo("MainHandSlot");
local icon = GetInventoryItemTexture("player", slotid);
tempEnchant1.tex:SetTexture(icon);
if mainHandCharges > 1 then tempEnchant1.txt:SetText(mainHandCharges); else tempEnchant1.txt:SetText("");end
tempEnchant1.tex:Show();
tempEnchant1.txt:Show();
else
tempEnchant1.tex:Hide();
tempEnchant1.txt:Hide();
end
end