View Single Post
10-29-20, 05:28 PM   #7
DahkCeles
A Cliff Giant
 
DahkCeles's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2020
Posts: 73
And I got the WoD map working too. The nodes start at "TaxiButton1" and keep increasing from there.

If you don't mind, I might include this in my own addon as well. It seems like a handy feature to keep refining.


Lua Code:
  1. -------------------
  2. -- TaxiFrame in WoD
  3.  
  4. local hooked = 0
  5. TaxiFrame:HookScript("OnShow", function()
  6.     local i = 1
  7.     local button = _G["TaxiButton"..i]
  8.     while (button) do
  9.         button:SetShown(true)
  10.         if (i > hooked) then
  11.             hooked = hooked + 1
  12.             button.Hide = button.Show
  13.         end
  14.         i = i + 1
  15.         button = _G["TaxiButton"..i]
  16.     end
  17. end)
  18.  
  19.  
  20. TaxiFrame:HookScript("OnHide", function()
  21.     local i = 1
  22.     local button = _G["TaxiButton"..i]
  23.     while (button) do
  24.         button:SetShown(false)
  25.         i = i + 1
  26.         button = _G["TaxiButton"..i]
  27.     end
  28. end)
  Reply With Quote