@@ -2124,6 +2124,7 @@ function ConRO:OnEnable()
2124
2124
self :RegisterEvent (' LOADING_SCREEN_ENABLED' );
2125
2125
self :RegisterEvent (' LOADING_SCREEN_DISABLED' );
2126
2126
self :RegisterEvent (' ACTIONBAR_HIDEGRID' );
2127
+ self :RegisterEvent (' PLAYER_MOUNT_DISPLAY_CHANGED' );
2127
2128
self :RegisterEvent (' ACTIONBAR_PAGE_CHANGED' );
2128
2129
self :RegisterEvent (' LEARNED_SPELL_IN_TAB' );
2129
2130
self :RegisterEvent (' CHARACTER_POINTS_CHANGED' );
@@ -2145,28 +2146,31 @@ end
2145
2146
2146
2147
function ConRO :ACTIVE_PLAYER_SPECIALIZATION_CHANGED ()
2147
2148
-- 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 ();
2153
2155
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
2164
2166
2165
- ConRO :ButtonFetch ()
2167
+ ConRO :ButtonFetch ()
2168
+ end );
2166
2169
end
2167
2170
2168
2171
function ConRO :ACTIVE_COMBAT_CONFIG_CHANGED ()
2169
2172
-- self:Print(self.Colors.Success .. 'Talent');
2173
+ C_Timer .After (1 , function ()
2170
2174
self :DisableRotation ();
2171
2175
self :DisableDefense ();
2172
2176
self :LoadModule ();
@@ -2185,10 +2189,12 @@ function ConRO:ACTIVE_COMBAT_CONFIG_CHANGED()
2185
2189
end
2186
2190
2187
2191
ConRO :ButtonFetch ()
2188
- end
2192
+ end );
2193
+ end
2189
2194
2190
2195
function ConRO :PLAYER_SPECIALIZATION_CHANGED ()
2191
2196
-- self:Print(self.Colors.Success .. 'Talent');
2197
+ C_Timer .After (1 , function ()
2192
2198
self :DisableRotation ();
2193
2199
self :DisableDefense ();
2194
2200
self :LoadModule ();
@@ -2207,29 +2213,32 @@ function ConRO:PLAYER_SPECIALIZATION_CHANGED()
2207
2213
end
2208
2214
2209
2215
ConRO :ButtonFetch ()
2210
- end
2216
+ end );
2217
+ end
2211
2218
2212
2219
function ConRO :TRAIT_CONFIG_UPDATED ()
2213
2220
-- 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 ();
2220
2228
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
2231
2239
2232
- ConRO :ButtonFetch ()
2240
+ ConRO :ButtonFetch ()
2241
+ end );
2233
2242
end
2234
2243
2235
2244
function ConRO :ACTIONBAR_HIDEGRID ()
@@ -2250,6 +2259,22 @@ function ConRO:ACTIONBAR_HIDEGRID()
2250
2259
self :DestroyTauntOverlays ();
2251
2260
end
2252
2261
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
+
2253
2278
function ConRO :UNIT_ENTERED_VEHICLE (event , unit )
2254
2279
-- self:Print(self.Colors.Success .. 'Vehicle!');
2255
2280
if unit == ' player' and self .ModuleLoaded then
@@ -2335,7 +2360,7 @@ function ConRO:PLAYER_ENTERING_WORLD()
2335
2360
self :Print (self .Colors .Success .. ' Auto enable on login!' );
2336
2361
self :Print (self .Colors .Info .. ' Loading class module' );
2337
2362
self :LoadModule ();
2338
- self :EnableRotation ();
2363
+ self :EnableRotation ()
2339
2364
self :EnableDefense ();
2340
2365
end
2341
2366
end
0 commit comments