Skip to content

Commit

Permalink
Fixed some Healer Spec targeting.
Browse files Browse the repository at this point in the history
  • Loading branch information
Vae2009 committed Jan 30, 2025
1 parent eb54b68 commit edfd501
Show file tree
Hide file tree
Showing 7 changed files with 87 additions and 10 deletions.
1 change: 0 additions & 1 deletion .gitignore

This file was deleted.

2 changes: 1 addition & 1 deletion ConRO.toc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Title:-|cffFFFFFFConRO|r- Conflict Rotation Optimizer
## Notes: Rotation helper framework.
## Version: 11.0.15
## Version: 11.0.16
## Author: Vae
## Interface: 110007
## SavedVariables: ConROPreferences
Expand Down
2 changes: 1 addition & 1 deletion Libs/AceGUI-3.0/widgets/AceGUIContainer-ScrollFrame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ local methods = {
end,

["LayoutFinished"] = function(self, width, height)
self.content:SetHeight(height or 0 + 20)
self.content:SetHeight((height or 0) + 20)

-- update the scrollframe
self:FixScroll()
Expand Down
2 changes: 1 addition & 1 deletion Libs/AceTab-3.0/AceTab-3.0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ function AceTab:OnTabPressed(this)
if next(matches) then
-- Replace the original string with the greatest common substring of all valid completions.
this.at3curMatch = 1
this.at3origWord = strsub(text_precursor, this.at3matchStart, this.at3matchStart + pmolengths[desc] - 1) .. allGCBS or ""
this.at3origWord = strsub(text_precursor, this.at3matchStart, this.at3matchStart + pmolengths[desc] - 1) .. (allGCBS or "")
this.at3origMatch = allGCBS or ""
this.at3lastWord = this.at3origWord
this.at3lastMatch = this.at3origMatch
Expand Down
2 changes: 1 addition & 1 deletion buttons.lua
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ function ConROTTOnEnter(self)
GameTooltip:AddLine('"This can be toggled during combat as phases change."', 1, 1, 0, true)
end

if ttFrameName == "ConROWindow" or ttFrameName == "ConROWindow2" then
if ttFrameName == "ConROWindow" or ttFrameName == "ConROWindow2" or ttFrameName == "ConROWindow3" then
GameTooltip:SetText("ConRO Window") -- This sets the top line of text, in gold.
GameTooltip:AddLine("", .2, 1, .2)
GameTooltip:AddLine("This window displays up to the next three(3) suggested abilities in your rotation.", 1, 1, 1, true)
Expand Down
78 changes: 76 additions & 2 deletions core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -303,10 +303,16 @@ local options = {

if ConRO:HealSpec() then
ConROWindow:Hide();
ConROWindow2:Hide();
ConROWindow3:Hide();
elseif ConRO.db.profile.enableWindow and not ConRO.db.profile.combatWindow then
ConROWindow:Show();
ConROWindow2:Show();
ConROWindow3:Show();
else
ConROWindow:Hide();
ConROWindow2:Hide();
ConROWindow3:Hide();
end
end,
get = function(info) return ConRO.db.profile._Spec_1_Enabled end
Expand All @@ -328,10 +334,16 @@ local options = {

if ConRO:HealSpec() then
ConROWindow:Hide();
ConROWindow2:Hide();
ConROWindow3:Hide();
elseif ConRO.db.profile.enableWindow and not ConRO.db.profile.combatWindow then
ConROWindow:Show();
ConROWindow2:Show();
ConROWindow3:Show();
else
ConROWindow:Hide();
ConROWindow2:Hide();
ConROWindow3:Hide();
end
end,
get = function(info) return ConRO.db.profile._Spec_2_Enabled end
Expand All @@ -354,10 +366,16 @@ local options = {

if ConRO:HealSpec() then
ConROWindow:Hide();
ConROWindow2:Hide();
ConROWindow3:Hide();
elseif ConRO.db.profile.enableWindow and not ConRO.db.profile.combatWindow then
ConROWindow:Show();
ConROWindow2:Show();
ConROWindow3:Show();
else
ConROWindow:Hide();
ConROWindow2:Hide();
ConROWindow3:Hide();
end
end,
get = function(info) return ConRO.db.profile._Spec_3_Enabled end
Expand All @@ -380,10 +398,16 @@ local options = {

if ConRO:HealSpec() then
ConROWindow:Hide();
ConROWindow2:Hide();
ConROWindow3:Hide();
elseif ConRO.db.profile.enableWindow and not ConRO.db.profile.combatWindow then
ConROWindow:Show();
ConROWindow2:Show();
ConROWindow3:Show();
else
ConROWindow:Hide();
ConROWindow2:Hide();
ConROWindow3:Hide();
end
end,
get = function(info) return ConRO.db.profile._Spec_4_Enabled end
Expand Down Expand Up @@ -1827,8 +1851,12 @@ local options = {
ConRO.db.profile.enableWindow = val;
if val == true and not ConRO:HealSpec() then
ConROWindow:Show();
ConROWindow2:Show();
ConROWindow3:Show();
else
ConROWindow:Hide();
ConROWindow2:Hide();
ConROWindow3:Hide();
end
end,
get = function(info) return ConRO.db.profile.enableWindow end
Expand All @@ -1843,9 +1871,13 @@ local options = {
ConRO.db.profile.combatWindow = val;
if val == true then
ConROWindow:Hide();
ConROWindow2:Hide();
ConROWindow3:Hide();
ConRODefenseWindow:Hide();
else
ConROWindow:Show();
ConROWindow2:Show();
ConROWindow3:Show();
ConRODefenseWindow:Show();
end
end,
Expand Down Expand Up @@ -1908,9 +1940,13 @@ local options = {
ConRO.db.profile.enableWindowKeybinds = val;
if val == true then
ConROWindow.fontkey:Show();
ConROWindow2.fontkey:Show();
ConROWindow3.fontkey:Show();
ConRODefenseWindow.fontkey:Show();
else
ConROWindow.fontkey:Hide();
ConROWindow2.fontkey:Hide();
ConROWindow3.fontkey:Hide();
ConRODefenseWindow.fontkey:Hide();
end
end,
Expand Down Expand Up @@ -2373,10 +2409,16 @@ function ConRO:ACTIVE_PLAYER_SPECIALIZATION_CHANGED()

if ConRO:HealSpec() then
ConROWindow:Hide();
ConROWindow2:Hide();
ConROWindow3:Hide();
elseif ConRO.db.profile.enableWindow and not ConRO.db.profile.combatWindow then
ConROWindow:Show();
ConROWindow2:Show();
ConROWindow3:Show();
else
ConROWindow:Hide();
ConROWindow2:Hide();
ConROWindow3:Hide();
end

ConRO:ButtonFetch()
Expand All @@ -2394,10 +2436,16 @@ function ConRO:ACTIVE_COMBAT_CONFIG_CHANGED()

if ConRO:HealSpec() then
ConROWindow:Hide();
ConROWindow2:Hide();
ConROWindow3:Hide();
elseif ConRO.db.profile.enableWindow and not ConRO.db.profile.combatWindow then
ConROWindow:Show();
ConROWindow2:Show();
ConROWindow3:Show();
else
ConROWindow:Hide();
ConROWindow2:Hide();
ConROWindow3:Hide();
end

ConRO:ButtonFetch()
Expand All @@ -2415,10 +2463,16 @@ function ConRO:PLAYER_SPECIALIZATION_CHANGED()

if ConRO:HealSpec() then
ConROWindow:Hide();
ConROWindow2:Hide();
ConROWindow3:Hide();
elseif ConRO.db.profile.enableWindow and not ConRO.db.profile.combatWindow then
ConROWindow:Show();
ConROWindow2:Show();
ConROWindow3:Show();
else
ConROWindow:Hide();
ConROWindow2:Hide();
ConROWindow3:Hide();
end

ConRO:ButtonFetch()
Expand All @@ -2437,10 +2491,16 @@ function ConRO:TRAIT_CONFIG_UPDATED()

if ConRO:HealSpec() then
ConROWindow:Hide();
ConROWindow2:Hide();
ConROWindow3:Hide();
elseif ConRO.db.profile.enableWindow and not ConRO.db.profile.combatWindow then
ConROWindow:Show();
ConROWindow2:Show();
ConROWindow3:Show();
else
ConROWindow:Hide();
ConROWindow2:Hide();
ConROWindow3:Hide();
end

ConRO:ButtonFetch()
Expand Down Expand Up @@ -2505,6 +2565,8 @@ function ConRO:PET_BATTLE_OPENING_START()
self:DisableRotation();
self:DisableDefense();
ConROWindow:Hide();
ConROWindow2:Hide();
ConROWindow3:Hide();
ConRODefenseWindow:Hide();
end

Expand All @@ -2518,10 +2580,16 @@ function ConRO:PET_BATTLE_OVER()

if ConRO.db.profile.enableWindow and (ConRO.db.profile.combatWindow or ConRO:HealSpec()) and ConRO:TarHostile() then
ConROWindow:Show();
ConROWindow2:Show();
ConROWindow3:Show();
elseif ConRO.db.profile.enableWindow and not (ConRO.db.profile.combatWindow or ConRO:HealSpec()) then
ConROWindow:Show();
ConROWindow2:Show();
ConROWindow3:Show();
else
ConROWindow:Hide();
ConROWindow2:Hide();
ConROWindow3:Hide();
end

if ConRO.db.profile.enableDefenseWindow and ConRO.db.profile.combatWindow and ConRO:TarHostile() then
Expand Down Expand Up @@ -2570,8 +2638,8 @@ end

function ConRO:LOADING_SCREEN_ENABLED()
-- self:Print(self.Colors.Success .. 'Lost Control!');
self:DisableRotation();
self:DisableDefense();
self:DisableRotation();
self:DisableDefense();
end

function ConRO:LOADING_SCREEN_DISABLED()
Expand Down Expand Up @@ -2602,10 +2670,16 @@ function ConRO:PLAYER_TARGET_CHANGED()

if ConRO.db.profile.enableWindow and (ConRO.db.profile.combatWindow or ConRO:HealSpec()) and ConRO:TarHostile() then
ConROWindow:Show();
ConROWindow2:Show();
ConROWindow3:Show();
elseif ConRO.db.profile.enableWindow and not (ConRO.db.profile.combatWindow or ConRO:HealSpec()) then
ConROWindow:Show();
ConROWindow2:Show();
ConROWindow3:Show();
else
ConROWindow:Hide();
ConROWindow2:Hide();
ConROWindow3:Hide();
end

if ConRO.db.profile.enableDefenseWindow and ConRO.db.profile.combatWindow and ConRO:TarHostile() then
Expand Down
10 changes: 7 additions & 3 deletions helper.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1414,10 +1414,14 @@ function ConRO:AbilityReady(spellCheck, timeShift, spelltype)
if have then
known = true;
end
if known and usable and _CD <= 0 and not notEnough then
rdy = true;
if spelltype == 'known' then
if known and _CD <= 0 then
rdy = true;
end
else
rdy = false;
if known and usable and _CD <= 0 and not notEnough then
rdy = true;
end
end
if castTimeMilli ~= nil then
castTime = castTimeMilli/1000;
Expand Down

0 comments on commit edfd501

Please sign in to comment.