WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Legion Beta archived threads (https://www.wowinterface.com/forums/forumdisplay.php?f=177)
-   -   TemporaryEnchantFrame_Hide only hiding 2 out of 3 TempEnchant buttons (https://www.wowinterface.com/forums/showthread.php?t=54743)

zork 10-28-16 08:31 AM

TemporaryEnchantFrame_Hide only hiding 2 out of 3 TempEnchant buttons
 
function TemporaryEnchantFrame_Hide
Lua Code:
  1. function TemporaryEnchantFrame_Hide()
  2.     if ( BuffFrame.numEnchants > 0 ) then
  3.         BuffFrame.numEnchants = 0;
  4.         BuffFrame_Update();    
  5.     end
  6.     TempEnchant1:Hide();
  7.     TempEnchant1Duration:Hide();
  8.     TempEnchant2:Hide();
  9.     TempEnchant2Duration:Hide();
  10. end
https://github.com/tomrus88/Blizzard...Frame.lua#L346

The function is missing the third button.
https://github.com/tomrus88/Blizzard...Frame.xml#L149

When the player is in a vehicle the TempEnchant3 button will pop up because TemporaryEnchantFrame_Update() is not called.

Function should look like this
Lua Code:
  1. function TemporaryEnchantFrame_Hide()
  2.     if ( BuffFrame.numEnchants > 0 ) then
  3.         BuffFrame.numEnchants = 0;
  4.         BuffFrame_Update();    
  5.     end
  6.     --Hide enchants
  7.     for i=1, NUM_TEMP_ENCHANT_FRAMES do
  8.         _G["TempEnchant"..i]:Hide();
  9.         _G["TempEnchant"..i.."Duration"]:Hide();
  10.     end
  11. end


All times are GMT -6. The time now is 07:25 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI