Skip to content

Commit 2e367b3

Browse files
committed
Found code fix for Dragon riding error and talent
1 parent 9787198 commit 2e367b3

File tree

3 files changed

+63
-37
lines changed

3 files changed

+63
-37
lines changed

ConRO.toc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Title:-|cffFFFFFFConRO|r- Conflict Rotation Optimizer
22
## Notes: Rotation helper framework.
3-
## Version: 10.0.20
3+
## Version: 10.0.21
44
## Author: Vae
55
## Interface: 100002
66
## SavedVariables: ConROPreferences

core.lua

Lines changed: 61 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2124,6 +2124,7 @@ function ConRO:OnEnable()
21242124
self:RegisterEvent('LOADING_SCREEN_ENABLED');
21252125
self:RegisterEvent('LOADING_SCREEN_DISABLED');
21262126
self:RegisterEvent('ACTIONBAR_HIDEGRID');
2127+
self:RegisterEvent('PLAYER_MOUNT_DISPLAY_CHANGED');
21272128
self:RegisterEvent('ACTIONBAR_PAGE_CHANGED');
21282129
self:RegisterEvent('LEARNED_SPELL_IN_TAB');
21292130
self:RegisterEvent('CHARACTER_POINTS_CHANGED');
@@ -2145,28 +2146,31 @@ end
21452146

21462147
function ConRO:ACTIVE_PLAYER_SPECIALIZATION_CHANGED()
21472148
--self:Print(self.Colors.Success .. 'Talent');
2148-
self:DisableRotation();
2149-
self:DisableDefense();
2150-
self:LoadModule();
2151-
self:EnableRotation();
2152-
self:EnableDefense();
2149+
C_Timer.After(1, function()
2150+
self:DisableRotation();
2151+
self:DisableDefense();
2152+
self:LoadModule();
2153+
self:EnableRotation();
2154+
self:EnableDefense();
21532155

2154-
if ConRO:HealSpec() then
2155-
ConROWindow:Hide();
2156-
ConRONextWindow:Hide();
2157-
elseif ConRO.db.profile.enableWindow and not ConRO.db.profile.combatWindow then
2158-
ConROWindow:Show();
2159-
ConRONextWindow:Show();
2160-
else
2161-
ConROWindow:Hide();
2162-
ConRONextWindow:Hide();
2163-
end
2156+
if ConRO:HealSpec() then
2157+
ConROWindow:Hide();
2158+
ConRONextWindow:Hide();
2159+
elseif ConRO.db.profile.enableWindow and not ConRO.db.profile.combatWindow then
2160+
ConROWindow:Show();
2161+
ConRONextWindow:Show();
2162+
else
2163+
ConROWindow:Hide();
2164+
ConRONextWindow:Hide();
2165+
end
21642166

2165-
ConRO:ButtonFetch()
2167+
ConRO:ButtonFetch()
2168+
end);
21662169
end
21672170

21682171
function ConRO:ACTIVE_COMBAT_CONFIG_CHANGED()
21692172
--self:Print(self.Colors.Success .. 'Talent');
2173+
C_Timer.After(1, function()
21702174
self:DisableRotation();
21712175
self:DisableDefense();
21722176
self:LoadModule();
@@ -2185,10 +2189,12 @@ function ConRO:ACTIVE_COMBAT_CONFIG_CHANGED()
21852189
end
21862190

21872191
ConRO:ButtonFetch()
2188-
end
2192+
end);
2193+
end
21892194

21902195
function ConRO:PLAYER_SPECIALIZATION_CHANGED()
21912196
--self:Print(self.Colors.Success .. 'Talent');
2197+
C_Timer.After(1, function()
21922198
self:DisableRotation();
21932199
self:DisableDefense();
21942200
self:LoadModule();
@@ -2207,29 +2213,32 @@ function ConRO:PLAYER_SPECIALIZATION_CHANGED()
22072213
end
22082214

22092215
ConRO:ButtonFetch()
2210-
end
2216+
end);
2217+
end
22112218

22122219
function ConRO:TRAIT_CONFIG_UPDATED()
22132220
--self:Print(self.Colors.Success .. 'Talent');
2214-
self:DisableRotation();
2215-
self:DisableDefense();
2216-
self:LoadModule();
2217-
self:EnableRotation();
2218-
self:EnableDefense();
2219-
self:UpdateButtonGlow();
2221+
C_Timer.After(1, function()
2222+
self:DisableRotation();
2223+
self:DisableDefense();
2224+
self:LoadModule();
2225+
self:EnableRotation();
2226+
self:EnableDefense();
2227+
self:UpdateButtonGlow();
22202228

2221-
if ConRO:HealSpec() then
2222-
ConROWindow:Hide();
2223-
ConRONextWindow:Hide();
2224-
elseif ConRO.db.profile.enableWindow and not ConRO.db.profile.combatWindow then
2225-
ConROWindow:Show();
2226-
ConRONextWindow:Show();
2227-
else
2228-
ConROWindow:Hide();
2229-
ConRONextWindow:Hide();
2230-
end
2229+
if ConRO:HealSpec() then
2230+
ConROWindow:Hide();
2231+
ConRONextWindow:Hide();
2232+
elseif ConRO.db.profile.enableWindow and not ConRO.db.profile.combatWindow then
2233+
ConROWindow:Show();
2234+
ConRONextWindow:Show();
2235+
else
2236+
ConROWindow:Hide();
2237+
ConRONextWindow:Hide();
2238+
end
22312239

2232-
ConRO:ButtonFetch()
2240+
ConRO:ButtonFetch()
2241+
end);
22332242
end
22342243

22352244
function ConRO:ACTIONBAR_HIDEGRID()
@@ -2250,6 +2259,22 @@ function ConRO:ACTIONBAR_HIDEGRID()
22502259
self:DestroyTauntOverlays();
22512260
end
22522261

2262+
function ConRO:PLAYER_MOUNT_DISPLAY_CHANGED()
2263+
C_Timer.After(1, function()
2264+
if ConRO:Dragonriding() and self.ModuleLoaded then
2265+
self:DisableRotation();
2266+
self:DisableDefense();
2267+
end
2268+
2269+
if not ConRO:Dragonriding() then
2270+
self:DisableRotation();
2271+
self:DisableDefense();
2272+
self:EnableRotation();
2273+
self:EnableDefense();
2274+
end
2275+
end);
2276+
end
2277+
22532278
function ConRO:UNIT_ENTERED_VEHICLE(event, unit)
22542279
-- self:Print(self.Colors.Success .. 'Vehicle!');
22552280
if unit == 'player' and self.ModuleLoaded then
@@ -2335,7 +2360,7 @@ function ConRO:PLAYER_ENTERING_WORLD()
23352360
self:Print(self.Colors.Success .. 'Auto enable on login!');
23362361
self:Print(self.Colors.Info .. 'Loading class module');
23372362
self:LoadModule();
2338-
self:EnableRotation();
2363+
self:EnableRotation()
23392364
self:EnableDefense();
23402365
end
23412366
end

helper.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ function ConRO:SpecName()
1313
end
1414

1515
function ConRO:CheckTalents()
16+
--print("Bing")
1617
self.PlayerTalents = {};
1718

1819
wipe(self.PlayerTalents)

0 commit comments

Comments
 (0)