From 7fd6c09c2eadc738165c3c85aab95632b5c51984 Mon Sep 17 00:00:00 2001 From: Hendrik Leppkes Date: Sat, 27 Sep 2008 22:49:11 +0200 Subject: [PATCH] Fix Visibility Configuration for Metamorphosis Metamorphosis is on slot 1 for GetShapeshiftFormInfo(), but when active GetShapeshiftForm() returns 2. Added a hopefully temporary hack to work around the issue. --- Options/Bar.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Options/Bar.lua b/Options/Bar.lua index 53ecb25..50e5ca3 100644 --- a/Options/Bar.lua +++ b/Options/Bar.lua @@ -66,6 +66,8 @@ do end end +local _, class = UnitClass("player") + local function getStanceTable() local num = GetNumShapeshiftForms() @@ -73,6 +75,10 @@ local function getStanceTable() for i = 1, num do tbl[i] = select(2, GetShapeshiftFormInfo(i)) end + -- HACK: Metamorphosis work around, it is on slot 1 in GetShapeshiftFormInfo() but stance:2 is active.. + if class == "WARLOCK" and tbl[1] == GetSpellInfo(59672) then + tbl[2], tbl[1] = tbl[1], nil + end return tbl end