Skip to content

Commit

Permalink
Found code fix for Dragon riding error and talent
Browse files Browse the repository at this point in the history
  • Loading branch information
Vae2009 committed Jan 1, 2023
1 parent 9787198 commit 2e367b3
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 37 deletions.
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: 10.0.20
## Version: 10.0.21
## Author: Vae
## Interface: 100002
## SavedVariables: ConROPreferences
Expand Down
97 changes: 61 additions & 36 deletions core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2124,6 +2124,7 @@ function ConRO:OnEnable()
self:RegisterEvent('LOADING_SCREEN_ENABLED');
self:RegisterEvent('LOADING_SCREEN_DISABLED');
self:RegisterEvent('ACTIONBAR_HIDEGRID');
self:RegisterEvent('PLAYER_MOUNT_DISPLAY_CHANGED');
self:RegisterEvent('ACTIONBAR_PAGE_CHANGED');
self:RegisterEvent('LEARNED_SPELL_IN_TAB');
self:RegisterEvent('CHARACTER_POINTS_CHANGED');
Expand All @@ -2145,28 +2146,31 @@ end

function ConRO:ACTIVE_PLAYER_SPECIALIZATION_CHANGED()
--self:Print(self.Colors.Success .. 'Talent');
self:DisableRotation();
self:DisableDefense();
self:LoadModule();
self:EnableRotation();
self:EnableDefense();
C_Timer.After(1, function()
self:DisableRotation();
self:DisableDefense();
self:LoadModule();
self:EnableRotation();
self:EnableDefense();

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

ConRO:ButtonFetch()
ConRO:ButtonFetch()
end);
end

function ConRO:ACTIVE_COMBAT_CONFIG_CHANGED()
--self:Print(self.Colors.Success .. 'Talent');
C_Timer.After(1, function()
self:DisableRotation();
self:DisableDefense();
self:LoadModule();
Expand All @@ -2185,10 +2189,12 @@ function ConRO:ACTIVE_COMBAT_CONFIG_CHANGED()
end

ConRO:ButtonFetch()
end
end);
end

function ConRO:PLAYER_SPECIALIZATION_CHANGED()
--self:Print(self.Colors.Success .. 'Talent');
C_Timer.After(1, function()
self:DisableRotation();
self:DisableDefense();
self:LoadModule();
Expand All @@ -2207,29 +2213,32 @@ function ConRO:PLAYER_SPECIALIZATION_CHANGED()
end

ConRO:ButtonFetch()
end
end);
end

function ConRO:TRAIT_CONFIG_UPDATED()
--self:Print(self.Colors.Success .. 'Talent');
self:DisableRotation();
self:DisableDefense();
self:LoadModule();
self:EnableRotation();
self:EnableDefense();
self:UpdateButtonGlow();
C_Timer.After(1, function()
self:DisableRotation();
self:DisableDefense();
self:LoadModule();
self:EnableRotation();
self:EnableDefense();
self:UpdateButtonGlow();

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

ConRO:ButtonFetch()
ConRO:ButtonFetch()
end);
end

function ConRO:ACTIONBAR_HIDEGRID()
Expand All @@ -2250,6 +2259,22 @@ function ConRO:ACTIONBAR_HIDEGRID()
self:DestroyTauntOverlays();
end

function ConRO:PLAYER_MOUNT_DISPLAY_CHANGED()
C_Timer.After(1, function()
if ConRO:Dragonriding() and self.ModuleLoaded then
self:DisableRotation();
self:DisableDefense();
end

if not ConRO:Dragonriding() then
self:DisableRotation();
self:DisableDefense();
self:EnableRotation();
self:EnableDefense();
end
end);
end

function ConRO:UNIT_ENTERED_VEHICLE(event, unit)
-- self:Print(self.Colors.Success .. 'Vehicle!');
if unit == 'player' and self.ModuleLoaded then
Expand Down Expand Up @@ -2335,7 +2360,7 @@ function ConRO:PLAYER_ENTERING_WORLD()
self:Print(self.Colors.Success .. 'Auto enable on login!');
self:Print(self.Colors.Info .. 'Loading class module');
self:LoadModule();
self:EnableRotation();
self:EnableRotation()
self:EnableDefense();
end
end
Expand Down
1 change: 1 addition & 0 deletions helper.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ function ConRO:SpecName()
end

function ConRO:CheckTalents()
--print("Bing")
self.PlayerTalents = {};

wipe(self.PlayerTalents)
Expand Down

0 comments on commit 2e367b3

Please sign in to comment.