From 78a1a92b664f77765eeceb32b45072449b6e42e5 Mon Sep 17 00:00:00 2001 From: hypernormalisation <52763122+hypernormalisation@users.noreply.github.com> Date: Thu, 24 Nov 2022 04:44:26 +0000 Subject: [PATCH] Fix to flight form index when druid has neither moonkin or tree forms --- classes/druid.lua | 8 ++++++-- main.lua | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/classes/druid.lua b/classes/druid.lua index 7aadf7b..2de74ac 100644 --- a/classes/druid.lua +++ b/classes/druid.lua @@ -108,7 +108,7 @@ function ST.DRUID.set_bar_color(self, hand) self:convert_color(db_class.form_color_cat) ) return true - elseif self.form_index == 5 and self.has_moonkin then + elseif self.form_index == 5 and self.has_moonkin then frame.bar:SetVertexColor( self:convert_color(db_class.form_color_moonkin) ) @@ -118,6 +118,11 @@ function ST.DRUID.set_bar_color(self, hand) self:convert_color(db_class.form_color_tree) ) return true + elseif self.form_index == 5 and (not self.has_tree_of_life and not self.has_moonkin) then + frame.bar:SetVertexColor( + self:convert_color(db_class.form_color_flight) + ) + return true elseif self.form_index == 6 then frame.bar:SetVertexColor( self:convert_color(db_class.form_color_flight) @@ -125,7 +130,6 @@ function ST.DRUID.set_bar_color(self, hand) return true end end - return false end diff --git a/main.lua b/main.lua index 00b5a26..2e9180d 100644 --- a/main.lua +++ b/main.lua @@ -749,6 +749,8 @@ function ST:determine_form_visibility_flag() self.should_show_bar_this_form = true elseif i == 5 and db.form_vis_tree and self.has_tree_of_life then self.should_show_bar_this_form = true + elseif i == 5 and (not self.has_moonkin and not self.has_tree_of_life) and db.form_vis_flight then + self.should_show_bar_this_form = true elseif i == 6 and db.form_vis_flight then self.should_show_bar_this_form = true end