Skip to content

Commit

Permalink
Fix to flight form index when druid has neither moonkin or tree forms
Browse files Browse the repository at this point in the history
  • Loading branch information
hypernormalisation committed Nov 24, 2022
1 parent cc7c1ab commit 78a1a92
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 6 additions & 2 deletions classes/druid.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
)
Expand All @@ -118,14 +118,18 @@ 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)
)
return true
end
end

return false

end
2 changes: 2 additions & 0 deletions main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 78a1a92

Please sign in to comment.